Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket connection fails on iOS5 #1254

Closed
rondinos opened this issue Jun 7, 2013 · 2 comments
Closed

Websocket connection fails on iOS5 #1254

rondinos opened this issue Jun 7, 2013 · 2 comments

Comments

@rondinos
Copy link

rondinos commented Jun 7, 2013

Hello,

I am having a very weird issue with socket.io, and it only happens when I enable websocket in transports.

Here is my debug log:
debug: client authorized
info: handshake authorized eJ3GCg5YmO3iRjeJuvEP
debug: setting request GET /socket.io/1/websocket/eJ3GCg5YmO3iRjeJuvEP
debug: set heartbeat interval for client eJ3GCg5YmO3iRjeJuvEP
debug: client authorized for
debug: setting request GET /socket.io/1/xhr-polling/eJ3GCg5YmO3iRjeJuvEP?t=1370643718147
debug: setting poll timeout
debug: discarding transport
debug: cleared heartbeat interval for client eJ3GCg5YmO3iRjeJuvEP
debug: setting request GET /socket.io/1/jsonp-polling/eJ3GCg5YmO3iRjeJuvEP?t=1370643728169&i=0
debug: setting poll timeout
debug: discarding transport
debug: clearing poll timeout
debug: clearing poll timeout
debug: jsonppolling writing io.j0;
debug: set close timeout for client eJ3GCg5YmO3iRjeJuvEP
debug: jsonppolling closed due to exceeded duration
debug: setting request GET /socket.io/1/jsonp-polling/eJ3GCg5YmO3iRjeJuvEP?t=1370643748562&i=0
debug: setting poll timeout
debug: discarding transport
debug: cleared close timeout for client eJ3GCg5YmO3iRjeJuvEP
debug: clearing poll timeout
debug: jsonppolling writing io.j0;
debug: set close timeout for client eJ3GCg5YmO3iRjeJuvEP
debug: jsonppolling closed due to exceeded duration
debug: setting request GET /socket.io/1/jsonp-polling/eJ3GCg5YmO3iRjeJuvEP?t=1370643768715&i=0
debug: setting poll timeout
debug: discarding transport

On the client after a few failed connections it says:
XMLHttpRequest cannot load http://XX.XX.XX.XX:8010/socket.io/1/xhr-polling/eJ3GCg5UmO3IRjeJuvEP?t=137064378147. Origin http://m.mydomain.com is not allowed by Access-Control-Allow-Origin.

I don't think that the client error is related to the problem, because it only happens after continues fails. For example if I disable every protocol and I only allow xhr-polling, then the connection works fine. And it doesn't complain about the Origin.

I have this issue on:
iPhone 5.01
iPad 5.11

But there is no issue on
iPhone/iPad 6.x

It also works fine on my old server with socket.io (0.9.14) and it failed on the new server with socket.io (0.9.16). I tried to downgrade the new server to 0.9.14 and I am still having the same issue. I really cannot figure out the issue, since the handshake works.

@rondinos
Copy link
Author

It looks like the issue happens on node.js > 0.10.7
Websockets are working perfectly fine on 0.10.7 but they break on 0.10.8. I will have to investigate more to see what has changed.

@TomKaltz
Copy link

Any update on this?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants