Help debug: invalid_argument: protocol error: incomplete envelope: unexpected EOF #757
|
I have a client and a server using Golang 1.21 in a Docker container on the same server. Both are using connect-go 1.16.2 with the connect protocol. If you are curious:
Thanks |
Replies: 2 comments 9 replies
|
Hey @D4ryl00 , will need more information to help debug your setup but I would guess the endpoint is not being correctly routed to the handler. Could you check that each method is invoked correctly by adding some logging? The unexpected EOF sounds seems like an empty response from the server. |
Yeah, reference this documentation: https://connectrpc.com/docs/faq#stream-error
The error, strangely, doesn't match what you're seeing but it appears to be caused by the same thing. Maybe they need to update this documentation.
However, here's the issue: When you configure http.Server with a ReadTimeout or WriteTimeout it will terminate the HTTP connection after the configured amount of time, regardless if there's regular messages being passed. This doesn't work well with long running streaming calls since the connection will just be terminated like you're seeing.
Is it good practice to set these values to zero? Eh, it's a bit hard to say. I think there's two lines of thinking: