socket.io-client-dart icon indicating copy to clipboard operation
socket.io-client-dart copied to clipboard

Can't get the data passed back when events are emitted from a nodeJS server

Open Lewynation opened this issue 2 years ago • 2 comments

I'm currently using the latest versions of both socket.io-client-dart and socket.io server for node JS. Connections are established successfully, however events passed from the server to the client cannot be accessed

     socket?.on('event', (data) {
     print(data);
     //this data property cannot be accessed in the client app
    });

Lewynation avatar Mar 27 '23 07:03 Lewynation

I had the same issue and found out that it was because my Socket.io server is using version 2.*, which is not compatible with socket.io-client-dart version 2.0.1. I was able to fix the issue by downgrading to 1.0.2.

scm01250 avatar Mar 28 '23 09:03 scm01250

@Lewynation Which version are you using in Client and Server?

jumperchen avatar Mar 29 '23 05:03 jumperchen