Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

ERROR: handshake failed ... A server with the specified hostname could not be found. #55

Open
zhangpan opened this issue Nov 22, 2012 · 8 comments

Comments

@zhangpan
Copy link

i use the socket all is ok,but when i disconnect wifi ,then reconncect the wifi ,it give me

-[SocketIO connection:didFailWithError:] ERROR: handshake failed ... A server with the specified hostname could not be found.

is this client mistake or server mistake? how to resolve it

@SivaDotRender
Copy link

Did you ever figure this out? I have a socketIO server running on Heroku. I'm unsure what port I'm suposed to be listening to be listening to. My javascript client works when I don't specify a port number. With this library, I don't have the option of not specifying a port number.

@ShreyasSA
Copy link

Does this error got resolve ?
Any Solution ?

@SivaDotRender
Copy link

@ShreyasSA I fixed my problem but it was something trivial. If you give me more information I can help you debug your problem.

@anuradhavasudeva
Copy link

Hey guys,
I'm facing the same issue here. When I connect to the server on a browser using the same URL it works fine but when I try to connect thru my Xcode program it throws an error! Any guess why this could be happening?

@SivaDotRender
Copy link

I think a common mistake is to not omit the "http://" part of the host url when using the connectToHost method. This is added automatically. So instead of "http://www.example.com", use "example.com".

@anuradhavasudeva
Copy link

BTW, I altered my code to send a proper URL...as follows. I think Socket IO
appends http on its own ..so sending http is redundant..so my call to
connecttohost looks like this :

[_socketConnection connectToHost:@"bubbleme.azurewebsites.net"

onPort:80 withParams:nil withNamespace:@""];

I get the error below now...

Warning: Error creating LLDB target at path
'/Users/anuradhavasudeva/Desktop/Buzz/Complete/CWPAYou/Build/Products/Debug-iphonesimulator/CWPAYou.app'-
using an empty LLDB target which can cause slow memory reads from remote
devices.
2014-10-02 21:40:12.355 CWPAYou[11590:340614] Can't find keyplane that
supports type 5 for keyboard iPhone-Portrait-PhonePad; using
2870935746_Portrait_iPhone-Complex-Pad_Default
2014-10-02 21:40:26.335 CWPAYou[11590:340614] Connecting to socket with
URL: http://bubbleme.azurewebsites.net:80/socket.io/1/?t=1412257226336
2014-10-02 21:40:31.194 CWPAYou[11590:340614] send()
2014-10-02 21:40:31.194 CWPAYou[11590:340614] queue >>>
5:1+::{"args":[{"key2":"test2","key1":"test1"}],"name":"join"}
2014-10-02 21:40:31.415 CWPAYou[11590:340614] didReceiveResponse() 400
2014-10-02 21:40:31.415 CWPAYou[11590:340614] ERROR: handshake failed ...
Server returned status code 400

Sent from my Google Nexus Phone
On Oct 3, 2014 12:08 PM, "Sivathmican Sivakumaran" [email protected]
wrote:

I think a common mistake is to not omit the "http://" part of the host
url when using the connectToHost method. This is added automatically. So
instead of "http://www.example.com", use "example.com".


Reply to this email directly or view it on GitHub
#55 (comment)
.

@yunas
Copy link

yunas commented May 30, 2015

@anuradhavasudeva I suspect the port you have used is wrong.

@IOSLZZ
Copy link

IOSLZZ commented Aug 9, 2016

@anuradhavasudeva Does this error got resolve ?
Any Solution ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants