SocketIOSharp icon indicating copy to clipboard operation
SocketIOSharp copied to clipboard

질문있습니다.

Open kimud6003 opened this issue 3 years ago • 2 comments

클라이언트 샘플을 실행시켰는데 아래와 같은 에러가 발생하는데 어떤 이유인지 알려주실수 있나요? I ran a client sample, but could you tell me the reason for the error as below?

Input /exit to close connection. Packet decoding failed. 0{"sid":"m_BOZw0mzTPjPHHqAAAF","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000} : System.FormatException: 입력 문자열의 형식이 잘못되었습니다. 위치: System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) 위치: System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) 위치: EngineIOSharp.Common.Packet.EngineIOPacket.Decode(Stream Stream, Boolean IsBinary) EngineIOSharp.Client.Transport.EngineIOPolling : EngineIOSharp.Common.EngineIOException: Transport is not opened. ReadyState : CLOSED

문제는 nodejs의socket.io 버전 문제였습니다. v2.5.0로 낮추어서 실행하길 바랍니다. The problem was the socket.io version of nodejs. Please lower it to v2.5.0.

kimud6003 avatar Nov 22 '20 05:11 kimud6003

Engine.IO 프로토콜이 revision 3에서 revision 4로 업데이트 되면서 최신 버전의 Socket.IO 서버를 사용하면 발생하는 문제입니다. Connection Query에서 EIO=3 옵션을 줘도 같은 현상이 일어나는 걸로 보아서는 Engine.IO 프로토콜 revision 4가 하위 호환성을 갖지 않은 것 같습니다. EngineIOSharp을 revision 4 프로토콜로 업데이트 하기 전까지는 npm 패키지 Socket.IO v2.3.0을 사용해 주시기 바랍니다.

uhm0311 avatar Nov 22 '20 10:11 uhm0311

알려주셔서 감사합니다. 해당사항 수정해보니 잘돌아가는거 확인했습니다!!

kimud6003 avatar Nov 22 '20 14:11 kimud6003