-
Notifications
You must be signed in to change notification settings - Fork 564
Upgrading from polling to webtransport will report engine invalid WebTransport handshake. #688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I used Firefox to test some message sending and receiving, and there will be sticky packets. This feature also needs improvement. |
That's weird, it seems two messages are concatenated: Which version of Firefox are you using? Which OS? |
The OS is the latest version of Windows 11, and the Firefox browser is also the latest version. |
WebTransport being a stream-based protocol, the chunking boundaries are not necessarily preserved. That's why we need a header indicating the type of the payload (plain text or binary) and its length. We will use a format inspired by the WebSocket frame: - first bit indicates whether the payload is binary - the next 7 bits are either: - 125 or less: that's the length of the payload - 126: the next 2 bytes represent the length of the payload - 127: the next 8 bytes represent the length of the payload Reference: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#decoding_payload_length Related: - #687 - #688
@zishang520 this should be fixed by a306db0, included in version Could you please check? |
ok i will get back to you after testing. |
I have tested sending and receiving messages, and there are no issues; it functions properly. However, there is another problem that needs to be addressed. Here are the reproduction steps: On a Windows system, using the Firefox browser (version 115.0.2 (64-bit)), after starting the engine.io server, connecting to the server using the browser client, sending a message to the server in the 'open' event. Then, pressing F5 to refresh the page and reconnect to the server leads to a server crash.
|
Refreshing the page with a client connected with WebTransport would trigger the following exception: > node:internal/process/promises:288 > triggerUncaughtException(err, true /* fromPromise */); > ^ > > [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "0".] { > code: 'ERR_UNHANDLED_REJECTION' > } Related: #688
@zishang520 this should finally be fixed by ff1c861, included in version Could you please confirm? |
I have completed the test, and the issue has been fixed. Thank you. |
Describe the bug
Upgrading from polling to webtransport will report engine invalid WebTransport handshake.
To Reproduce
Please fill the following code example:
Engine.IO server version:
6.5.1
Server
Engine.IO client version:
6.5.1
Client
Expected behavior
Platform:
Additional context
Upgrading from polling to webtransport will report engine invalid WebTransport handshake, because the original message reported is: 0{"sid":"xxx"}2probe, parseSessionId cannot correctly parse the sid
The text was updated successfully, but these errors were encountered: