SocketIOSharp icon indicating copy to clipboard operation
SocketIOSharp copied to clipboard

NodeJS Socket.io Server v^4.1.2 to 3.1 not connecting

Open vamman opened this issue 4 years ago • 3 comments

Hello,

We have a NodeJS Server running your sample server js code from the project and when we connect a vanilla client to it we see the following:

Packet decoding failed. 0{"sid":"lmUcXoLUerfxDmQaAAAF","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":20000} : System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at EngineIOSharp.Common.Packet.EngineIOPacket.Decode(Stream Stream, Boolean IsBinary) EngineIOSharp.Client.Transport.EngineIOPolling : EngineIOSharp.Common.EngineIOException: Transport is not opened. ReadyState : CLOSED

Is there a specific version of Socket.io on NodeJS that I should be using?

Thanks!

vamman avatar Jun 25 '21 15:06 vamman

I'm having the same issue. Note the response 0{"sid":"lmUcXoLUerfxDmQaAAAF","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":20000} is documented here: https://socket.io/docs/v3/troubleshooting-connection-issues/ which is a valid response from a NodeJS SocketIO server. C#.NET version 4.7.2 running latest version of SocketIOSharp as a client.

mattv8 avatar Jul 19 '21 23:07 mattv8

Hi, im having this exact issue connecting to a Socket.IO v4.2.0 Server , before i was connecting against a v4.0 server, something broken maybe? Tried via HTTPS and HTTP, none of them worked. You guys founded a workaround ?

Thanks in advanced.

ELKABILLA avatar Sep 04 '21 20:09 ELKABILLA

Unfortunately I was never able to find a workaround with @uhm0311's libraries. I was able to get up and running with Quobject/SocketIoClientDotNet which is a deprecated project but still working great for my needs.

mattv8 avatar Oct 04 '21 17:10 mattv8