pkyeck / socket.IO-objc

socket.io v0.7.2 — 0.9.x for iOS and OS X
MIT License
1.97k stars 439 forks source link

Error connecting to server #191

Closed leongwq closed 10 years ago

leongwq commented 10 years ago

2014-06-16 12:50:14.312 Axion[1295:60b] Connecting to socket with URL: http://localhost:8888/socket.io/1/?t=1402894214312 2014-06-16 12:50:14.402 Axion[1295:60b] didReceiveResponse() 400 2014-06-16 12:50:14.403 Axion[1295:60b] ERROR: handshake failed ... Server returned status code 400 2014-06-16 12:50:14.405 Axion[1295:60b] onError() Error Domain=SocketIOError Code=-6 "The operation couldn’t be completed. (SocketIOError error -6.)" UserInfo=0xb078cd0 {NSUnderlyingError=0xb0793f0 "Server returned status code 400"}

How do i solve this error?

jardakotesovec commented 10 years ago

Are you using version 0.9 on the server? I think I got similar error when tried to connect to 1.0, which is not supported yet.

-- Jarda Kotěšovec

On Monday 16 June 2014 at 06:51, leongwq wrote:

2014-06-16 12:50:14.312 Axion[1295:60b] Connecting to socket with URL: http://localhost:8888/socket.io/1/?t=1402894214312 2014-06-16 12:50:14.402 Axion[1295:60b] didReceiveResponse() 400 2014-06-16 12:50:14.403 Axion[1295:60b] ERROR: handshake failed ... Server returned status code 400 2014-06-16 12:50:14.405 Axion[1295:60b] onError() Error Domain=SocketIOError Code=-6 "The operation couldn’t be completed. (SocketIOError error -6.)" UserInfo=0xb078cd0 {NSUnderlyingError=0xb0793f0 "Server returned status code 400"}
How do i solve this error?

— Reply to this email directly or view it on GitHub (https://github.com/pkyeck/socket.IO-objc/issues/191).

edwinckc commented 10 years ago

Jarda's probably right, it's what I got too with v1.0 of socket.io. You'll have to install v0.9 instead if you want to use this implementation. It looks like Philipp won't have time to update this for now: See here for v1.0 support