You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a gRPC service (.Net core 3.1) with gRPC-Web middleware added to the pipeline. The client is a SPA written in Javascript (React) and the JS files are auto-generated with protoc tool.
When the response from this gRPC service is “GZip” compressed, the browser is not able to decompress the data. The gRPC-Web calls are failing with the below error: Error seen in browser console: net::ERR_CONTENT_DECODING_FAILED 200 (Tried in both new Edge and Chrome)
Request-headers (specific to this issue):
accept-encoding: gzip, deflate, br
grpc-accept-encoding : gzip
content-type: application/grpc-web+proto (Tried with application/grpc-web-text also)
Response-headers (specific to this issue):
content-type: application/grpc-web
content-encoding: gzip
grpc-encoding: gzip
Question:
Does gRPC-Web in .Net supports GZIP with client written in JavaScript (JS files generated with protoc tool)? Any other additional changes to be done to support this compression?
JS files are generated from protoc tool. Even, with the greeter service provided in .net examples, we are facing the same issue.
We did a response size comparison between REST and gRPC calls from the client application and, due to this issue, we could see that GZIP JSON size is lesser than non-GZIP gRPC response.
We are not able to use the gzip compression in .Net service due to this issue.
Sounds like grpc-web JS client doesn't support compression - grpc/grpc-web#561. I don't know why grpc-web client includes grpc-accept-encoding: gzip when gzip compression is not supported.
We have a gRPC service (.Net core 3.1) with gRPC-Web middleware added to the pipeline. The client is a SPA written in Javascript (React) and the JS files are auto-generated with protoc tool.
When the response from this gRPC service is “GZip” compressed, the browser is not able to decompress the data. The gRPC-Web calls are failing with the below error:
Error seen in browser console: net::ERR_CONTENT_DECODING_FAILED 200 (Tried in both new Edge and Chrome)
Request-headers (specific to this issue):
accept-encoding: gzip, deflate, br
grpc-accept-encoding : gzip
content-type: application/grpc-web+proto (Tried with application/grpc-web-text also)
Response-headers (specific to this issue):
content-type: application/grpc-web
content-encoding: gzip
grpc-encoding: gzip
Question:
Does gRPC-Web in .Net supports GZIP with client written in JavaScript (JS files generated with protoc tool)? Any other additional changes to be done to support this compression?
JS files are generated from protoc tool. Even, with the greeter service provided in .net examples, we are facing the same issue.
We did a response size comparison between REST and gRPC calls from the client application and, due to this issue, we could see that GZIP JSON size is lesser than non-GZIP gRPC response.
We are not able to use the gzip compression in .Net service due to this issue.
cc: @shirhatti
The text was updated successfully, but these errors were encountered: