You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.
I'm running a SocketIOSharp server trying to connect with a Node js socket.io-client 4.0.1
I'm using the example server and trying to connect with the following client:
The server says "Connected" repeatedly as the client tries to connect.
The client however throws this error:
Error: server error
at Socket.onPacket (C:\...\test-client\node_modules\engine.io-client\lib\socket.js:401:23)
at XHR.<anonymous> (C:\...\test-client\node_modules\engine.io-client\lib\socket.js:216:14)
at XHR.Emitter.emit (C:\...\test-client\node_modules\component-emitter\index.js:145:20)
at XHR.onPacket (C:\...\test-client\node_modules\engine.io-client\lib\transport.js:105:10)
at callback (C:\...\test-client\node_modules\engine.io-client\lib\transports\polling.js:101:12)
at Array.forEach (<anonymous>)
at XHR.onData (C:\...\test-client\node_modules\engine.io-client\lib\transports\polling.js:105:56)
at Request.<anonymous> (C:\...\test-client\node_modules\engine.io-client\lib\transports\polling-xhr.js:94:12)
at Request.Emitter.emit (C:\...\test-client\node_modules\component-emitter\index.js:145:20)
at Request.onData (C:\...\test-client\node_modules\engine.io-client\lib\transports\polling-xhr.js:236:10) { code: 'parser error' }
Edit 1:
if I set the client to use websockets for the transport by default I receive the following error instead:
Error: It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)
at Socket.onpacket (C:\...\test-client\node_modules\socket.io-client\build\socket.js:210:56)
at Manager.Emitter.emit (C:\...\test-client\node_modules\component-emitter\index.js:145:20)
at Manager.emitReserved (C:\...\test-client\node_modules\socket.io-client\build\typed-events.js:59:15)
at Manager.ondecoded (C:\...\test-client\node_modules\socket.io-client\build\manager.js:207:14)
at Decoder.Emitter.emit (C:\...\test-client\node_modules\component-emitter\index.js:145:20)
at Decoder.add (C:\...\test-client\node_modules\socket.io-parser\dist\index.js:117:23)
at Manager.ondata (C:\...\test-client\node_modules\socket.io-client\build\manager.js:199:22)
at Socket.Emitter.emit (C:\...\test-client\node_modules\component-emitter\index.js:145:20)
at Socket.onPacket (C:\...\test-client\node_modules\engine.io-client\lib\socket.js:407:16)
at WS.<anonymous> (C:\...\test-client\node_modules\engine.io-client\lib\socket.js:216:14)
Seems like the packet is missing the data content when using websockets only { type: 0, nsp: '/' }
Any help would be appreciated!
The text was updated successfully, but these errors were encountered:
Unfortunatly I did not find a solution.
I was using this for a WebRTC signalling service so I didn't need many messages.
I ended up using WebSocketSharp and rolling my own messaging system.
I think a fix may be possible, but I didn't have time to get super farmilier with the inner workings of this library.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm running a
SocketIOSharp
server trying to connect with a Node js socket.io-client 4.0.1I'm using the example server and trying to connect with the following client:
The server says "Connected" repeatedly as the client tries to connect.
The client however throws this error:
Edit 1:
if I set the client to use websockets for the transport by default I receive the following error instead:
Seems like the packet is missing the
data
content when using websockets only{ type: 0, nsp: '/' }
Any help would be appreciated!
The text was updated successfully, but these errors were encountered: