Open maja42 opened 9 months ago
@maja42 Thanks for the detailed report!
To help rule out any nginx issue, do you mind checking if you could reproduce the exact problem using our echo demo in docker?
https://github.com/grpc/grpc-web#advanced-demo-browser-echo-app
If you're able to reproduce there, it would be easier for us to debug and create a fix for you!
Thanks!
We are using long-running server-streams where the server pushes updates to the frontend. If the user's network connections change (e.g. due to entering / leaving a VPN), these long-running streams immediately stop - so far so good.
The Browser shows these streams as "failed" inside the network tab:![image](https://github.com/grpc/grpc-web/assets/2649265/c39c3091-3974-45ca-bc70-2b73e7cbafa5)
In addition to that, the console tab also shows the failed request:![image](https://github.com/grpc/grpc-web/assets/2649265/f4a1adbd-d351-4529-938b-32c367e1f262)
Note though that the HTTP Status is 200.
The issue: grpc-web does not propagate the error to our application. I'd expect both the "error" and "end"-callbacks to be triggered. Maybe even the "status"-callback. (Or, at least, the "end"-callback). They are not. As a consequence, these background-streams silently stop, and we can't inform the user or restart the streams.
Simplified code example:
Setup: We are using Google Chrome, but it also happens for other browsers. The backend starts with an nginX-server, that forwards all grpc-web calls to an enovy proxy. Envoy then translates to grpc and forwards to individual backend services.