-
Notifications
You must be signed in to change notification settings - Fork 439
disconnectedWithError (SocketIOError error -4.) #95
Comments
Same here. It connects, handshake, then onDisconnect() is called. I don't get the "disconnectedWithError : Error Domain=SocketIOError Code=-4 "The operation couldn’t be completed. (SocketIOError error -4.)" in my log tho. EDIT: It works not, I reject WebSocket and used Long Polling. I think it's because the iPhone simulator was not over wifi but was on iPhone hotspot so it doesn't work with WebSocket? |
I've got the same issue, I just implemented a server-side socket for Facebook and I get this error after my log to Facebook. |
No idea here ? I get this error in random way now :/ I don't know how this happened. How can I avoid this error ? I run socket.io on my device so I don't think this is a problem with the simulator... |
Have you tried not using WebSocket and use Long Polling instead? I commented out the if statement for WebSocket and has the Long Polling as the first option. |
And how you did that ? I searched but never found :/ I think that my problem comes from the Facebook token who is really too long for the socket so I decided to not send it in the same event and send it with another event. It's really bad but I don't have my socket closed like that :) |
In xcode search for the string "using it now" in the project codes. It'll bring you to the code:
|
Done but now, I don't have what I'm supposed to get from my socket. Now I get my html instead of my socket. To prevent deconnexion from Facebook connexion, I used sendEvent:withData:andAcknowledge: method, and with long polling I get a serie of error, start/reset message in log. I don't know what to do actually. Why this websocket closed so suddenly ? Edit: Deconnexion appears even if I used sendEvent:withData:andAcknowledge: , I use the socket on my website so it works really great. I can't understand why I get a deconnexion here :/ |
With more investigation it looks like the problem comes from SRWebSocket where NSInputStream get NSStreamEventEndEncountered without any reason, or I don't understand the function _innerPumpScanner, it looks good but how we reach the end of NSInputStream if the connection is not close ? |
Any luck figuring this one out ? |
I'm getting this same exact issue. Connection, handshake, then onDisconnect and SocketIOError -4. Also, it happens randomly. Weirdly, sometimes it works, and sometimes it doesn't and I have absolutely no idea why. Anyone else have any idea why this isn't working? |
Does anyone get it working? I've got the same error and normally it happens when we connect to internet via a Captive Portal. The long-polling technique isn't working as expected for me. |
I've got my problem solved by just changing the port to 443. It seems that there are firewall or anti-virus eats my packet on port 80. The port itself is not closed but the packet from websocket cannot bypass this port. |
I am getting same error. After connecting to host it gets disconnected. Anyone got this working? or any alternative to SocketTesterARC?? |
Any updates to this? Same exact issue on my end. |
Slight progress, not sure how relevant it is: Looking at line 757 of
I noticed that if I printed out
|
The information appears to not be either formatted or parsed correctly: In SocketIO.m:
And
That seems wrong to me, but I'm definitely no expert... Shortly after that code we grab the
..and then a few lines below that when it tries to parse the transports it gets that all wrong.. Could some of this be due to the implementation here: https://github.com/pkyeck/socket.IO-objc/blob/master/SocketIO.m#L706 ? |
Hi..
Stuck at the first point..not able to make connection ..
I am using Node version : 0.10.3 and Socket.io version : 0.9.4.
XCode Log is as below :
didReceiveResponse() 200
connectionDidFinishLoading() 16734788022033017528:15:25:websocket,htmlfile,xhr-polling,jsonp-polling
sid: 16734788022033017528
heartbeatTimeout: 22.000000
transports: (
websocket,
htmlfile,
"xhr-polling",
"jsonp-polling"
)
websocket supported -> using it now
onDisconnect()
disconnectedWithError : Error Domain=SocketIOError Code=-4 "The operation couldn’t be completed. (SocketIOError error -4.)"
Thanks in advance !
The text was updated successfully, but these errors were encountered: