-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Volatile not working from server to client with binary data #3919
Comments
I can confirm this bug, and just encountered it when upgrading from socket.io v2 to v4. It appears to send non-binary data just fine, and it will even send the non-binary parts of the same message just fine, including binary placeholder objects. But the binary packets which correspond to those placeholder objects appear to be never sent. |
I also ran into this problem when trying to use |
I could indeed reproduce the issue. We will publish a fix as soon as possible. |
I just upgraded my app's socketio to the latest version (4.3.1) and still having this issue |
Same issue here, tested with Uint8Array (protobuf), and Buffer.from (same as unit test) server to client volatile.emit() is still broken. |
Related: socketio/socket.io#3919
This should be fixed by dc81fcf, included in @refeed I cannot reproduce: https://github.com/socketio/socket.io-fiddle/tree/issues/socket.io/3919, could you please check? |
Thanks, the problem occurs when we send volatile data directly with the server (working fine with the socket )
You won't receive the data with the client. |
The binary attachments of volatile packets were discarded (only the header packet was sent) due to a bug introduced in [1]. Note: the `wsPreEncoded` option is removed by this commit, as I wasn't able to find an elegant (read: non explosive) way to keep it. [1]: 5579d40 Related: socketio/socket.io#3919
@brako zut, you are right. This should be finally fixed by socketio/socket.io-adapter@88eee59, included in I added a test case here, to prevent any regression in the future. Please reopen if needed. |
The binary attachments of volatile packets were discarded (only the header packet was sent) due to a bug introduced by [1]. Related: socketio#3919 [1]: socketio@aafc3d8
Describe the bug
Sending a volatile event from the client (Chrome) to Node with binary data works fine. Sending a volatile event from Node to the client with binary data does not work. Sending binary data without volatile works, sending non binary data with volatile works.
To Reproduce
Socket.IO server version:
4.1.1
Server
Socket.IO client version:
4.1.1
Client
works fine, changing the server code:
and the client receives nothing
Expected behavior
The client receives the binary data.
Platform:
The text was updated successfully, but these errors were encountered: