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

JSON.parse error

Open rahul23134 opened this issue 15 years ago • 3 comments

When i recieve large data or some times it gives me error like this .

JSON.parse _onMessage(message="~j~{"event":"getcard","...","lastname":null,"emai")socket.io.js (line 194) _onData(data="~m~5361~m~~j~{"event":"...","lastname":null,"emai")socket.io.js (line 169) onreadystatechange()socket.io.js (line 567) [Break On This Error] this.base._onMessage(JSON.parse(message.substr(3)));

when i console the event i see that incomplete JSOn.

Please tell what to do ,that this type of error not come?

rahul23134 avatar Aug 06 '11 12:08 rahul23134

I see you are still using a old version of Socket.IO consider upgrading to latest version.

3rd-Eden avatar Aug 06 '11 12:08 3rd-Eden

@Eden , Is in new issue this error is solved .?

rahul23134 avatar Aug 06 '11 12:08 rahul23134

Big chance it is, because it uses a different parser. If this is not the case we will be able to fix it as 0.6 is no longer 'officially' supported (i think).

3rd-Eden avatar Aug 06 '11 12:08 3rd-Eden