I have a server in go using gRPC and on the react client I'm using grpc web with grpcwebproxy and I've been trying to connect my client to the server but constantly get error Code 2, with the message: Response closed without headers. Has anybody else encountered this issue? I'm currently using improbable-eng implementation of grpc-web.
Asked
Active
Viewed 2,835 times
2 Answers
2
grpcwebproxy: might have read/write timeout and close your longPolling connection by timeout. Relevant for all client-server streaming calls.
server_http_max_read_timeout
– HTTP server config, max read duration (default 10s).
server_http_max_write_timeout
– HTTP server config, max write duration (default 10s).

am0wa
- 7,724
- 3
- 38
- 33
-
This was my culprit. I have a long-running scraper grabbing information every hour or so. And I've never had issues with CORS on the endpoint. It only pops up very rarely and usually after weeks of uptime – bbuck May 02 '23 at 17:09
1
-
For my local development server adding `--allowed_origins=localhost:4200` helped me. – Philippe Mar 23 '22 at 14:51