GithubHelp home page GithubHelp logo

Comments (16)

AloysA avatar AloysA commented on May 31, 2024

This just means that the connection failed, because the host could not be found / resolved. Make sure your websocket server is running and accessible for incoming connections. (I used to get this error when I let my server listen on localhost instead of my LAN ip).

from socketrocket.

oriben2 avatar oriben2 commented on May 31, 2024

That's not neccessarily the case. It happened to me once, yet the server was runninng alright, i could connect to the server thru the browser on my windows system. after googling for hours, not finding anything useful, i upgraded my OS to Lion, and voila - everything worked fine again.

from socketrocket.

rkrishnasanka avatar rkrishnasanka commented on May 31, 2024

I'm on Lion and its still not working , is there anything that can be done - my prototype is now stuck because of this. I tried localhost , the computer name , the ip address and none of them worked. I'm using nodejs socket.io. The html test client is also working fine so i dont know what the error actually is now. Can anyone help heres the socket server side code:

https://gist.github.com/rkrishnasanka/6129480

Thanks in advance !

from socketrocket.

nudaya avatar nudaya commented on May 31, 2024

Do you still have this issue? I am getting the same error.

Please let me know if you have resolved this.

from socketrocket.

nofelmahmood avatar nofelmahmood commented on May 31, 2024

Change ur websocket address to the ip address of your computer. Its pointing to localhost but the server is running on your computer. The computer itself can resolve it but the client doesn't know about the localhost because the server is not running on it. You can find your IP Address in wifi settings.

from socketrocket.

rkrishnasanka avatar rkrishnasanka commented on May 31, 2024

@nofelmahmood it worked fine, the problem was something similar to what you said.

from socketrocket.

nofelmahmood avatar nofelmahmood commented on May 31, 2024

good :)

from socketrocket.

michalcichon avatar michalcichon commented on May 31, 2024

Did you use something different than 127.0.0.1? You need to have external and visible interface. Check your firewall config.

from socketrocket.

mikelikespie avatar mikelikespie commented on May 31, 2024

Please reopen if still having issues.

from socketrocket.

NishithaJain avatar NishithaJain commented on May 31, 2024

Hi, i have integrated websocket without cocoa pods into my app. It is running on os version 10.11.4
whenever i tried establishing connection it throws up this error :"error:Error Domain=SRWebSocketErrorDomain Code=2132 "received bad response code from server 404" UserInfo={NSLocalizedDescription=received bad response code from server 404, HTTPResponseStatusCode=404}
". Would be of great help if somebody let me know how can this error be fixed. Thank you in advance

from socketrocket.

dfed avatar dfed commented on May 31, 2024

@NishithaJain that's a question best asked on stack overflow. A 404 is going to be unrelated to SocketRocket – it means you are trying to connect to a resource that your server doesn't think exists.

from socketrocket.

NishithaJain avatar NishithaJain commented on May 31, 2024

Thank you @dfed . The error anyway disappeared, throwing a new error.
error:Error Domain=SRWebSocketErrorDomain Code=2133 "Invalid Sec-WebSocket-Accept response" UserInfo={NSLocalizedDescription=Invalid Sec-WebSocket-Accept response}.
Can you please help me out to fix this? Thank you in advance.

from socketrocket.

dfed avatar dfed commented on May 31, 2024

Again, this is a better question for StackOverflow. Sounds like your server isn't doing the right thing.

from socketrocket.

NishithaJain avatar NishithaJain commented on May 31, 2024

@dfed
hehe okay.
Thanks:)

from socketrocket.

dfed avatar dfed commented on May 31, 2024

Good luck!

from socketrocket.

black-lotus avatar black-lotus commented on May 31, 2024

I hate to ask the same question like @NishithaJain ask, but i have same issue.
I create WebSocket Server on my local system using Primus and SockJS, then i test it using SockJS Client and it's working.

When i test using SocketRocket it thrown an error

Error Domain=SRWebSocketErrorDomain Code=2133 "Invalid Sec-WebSocket-Accept response" UserInfo={NSLocalizedDescription=Invalid Sec-WebSocket-Accept response}

Thank you in advance

from socketrocket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.