Skip to content
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

Message handler doesn't receive messages #167

Closed
jhoogstraat opened this issue Mar 18, 2021 · 7 comments
Closed

Message handler doesn't receive messages #167

jhoogstraat opened this issue Mar 18, 2021 · 7 comments
Labels

Comments

@jhoogstraat
Copy link

Since 2.0.0-beta.3-nullsafety.0 my message handler don't receive message anymore.
The logger is showing all messages fine, but the callbacks are not firing.

@Curvel
Copy link

Curvel commented Mar 22, 2021

I got the same issue

@sha-N
Copy link

sha-N commented Mar 25, 2021

@jhoogstraat @Curvel are you trying to transfer binary data. For me problem is when I try to transfer binary data. 2.0.0-beta.1 handles binary data without any issue.

@Curvel
Copy link

Curvel commented Mar 25, 2021

@sha-N Exactly, I try to receive a byte stream.

@sha-N
Copy link

sha-N commented Mar 25, 2021

my workaround was to base64encode at server side and decode at client side
in nodejs server
data: data.toString('base64'),

in dart client
final List<int> _data = base64Decode(data);

@jumperchen jumperchen added the bug label Mar 26, 2021
@jumperchen
Copy link
Member

@sha-N @jhoogstraat Does any full example to demonstrate this issue? Because I cannot reproduce it on my local env. with 2.0.0-beta.3-nullsafety.0

@sha-N
Copy link

sha-N commented Mar 27, 2021

@jumperchen first of all great work on the library.

To reproduce the issue, try to send any Buffer data from nodejs socketio server to dart client. like gzip data from server.

zlib = require('zlib');
zlib.gzip(data, (err, zipped) => { 
    io.to('client-id').emit('event-name', {id: 'some-id', data: zipped});
});

Sending buffer data from dart client to nodejs server works perfectly.

jumperchen added a commit to rikulo/socket_io_common that referenced this issue Mar 29, 2021
@jumperchen
Copy link
Member

Fixed by running pub upgrade for socket_io_common

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants