quic-go / webtransport-go

WebTransport implementation based on quic-go (https://datatracker.ietf.org/doc/draft-ietf-webtrans-http3/)
https://quic-go.net
MIT License
345 stars 55 forks source link

WebTransport Stream Reset Error on Chrome Browser Reload/Disconnects #113

Open minchopm opened 11 months ago

minchopm commented 11 months ago

Description I am facing an issue with a webtransport-go server during a WebTransport stream session from the Chrome browser. The error appears when the browser is reloaded. Additionally, I would like guidance on handling browser disconnects effectively.

Steps to Reproduce Set up a WebTransport stream session from Chrome browser to a webtransport-go server. Reload the Chrome browser. Expected Behavior The WebTransport stream should continue without errors or handle disconnects gracefully.

Actual Behavior When the Chrome browser is reloaded, the following error occurs:

ERRO[0045] stream reset, but failed to convert stream error 386759528: error code outside of expected range

Query Regarding Browser Disconnects In addition to the above issue, I would like to ask for best practices or recommended methods for handling browser disconnects in webtransport-go. How should the server be configured to handle unexpected browser terminations or reloads to ensure stability and continuity of the stream session?

marten-seemann commented 11 months ago

Set up a WebTransport stream session from Chrome browser to a webtransport-go server. Reload the Chrome browser. Expected Behavior The WebTransport stream should continue without errors or handle disconnects gracefully.

I don't think your expectations are realistic here. The browser will reset the stream when you reload it. If you think this is not what should happen, you'll need to contact the Chrome team though, webtransport-go can't do anything here.

In addition to the above issue, I would like to ask for best practices or recommended methods for handling browser disconnects in webtransport-go. How should the server be configured to handle unexpected browser terminations or reloads to ensure stability and continuity of the stream session?

There's nothing you need to do. The browser will either reset the stream or tear down the WebTransport session, or it will just go away silently, which will lead to a connection timeout of the underlying QUIC connection.

Kiro369 commented 6 months ago

I'm facing the same exact error, but I believe there is an issue to be addressed with webtransport-go. I have a real-time chat with webtransport-go and Vue. Whenever I get this error, the server loses the connection to the client, but it's somehow still there, from my client I can still send messages to the server