Comments (16)
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.
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.
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.
Do you still have this issue? I am getting the same error.
Please let me know if you have resolved this.
from socketrocket.
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.
@nofelmahmood it worked fine, the problem was something similar to what you said.
from socketrocket.
good :)
from socketrocket.
Did you use something different than 127.0.0.1? You need to have external and visible interface. Check your firewall config.
from socketrocket.
Please reopen if still having issues.
from socketrocket.
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.
@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.
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.
Again, this is a better question for StackOverflow. Sounds like your server isn't doing the right thing.
from socketrocket.
@dfed
hehe okay.
Thanks:)
from socketrocket.
Good luck!
from socketrocket.
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)
- The newest version: 0.6.0, [wss + ip] format to connect, it gets an error: Error Domain=NSOSStatusErrorDomain Code=-9807
- iOS16.0 线程警告提示 HOT 3
- Crash on iOS 16:CFSocketInvalidate + 132 HOT 2
- wss pem
- [SRWebSocket setReadyState:] crash
- Memory leaks HOT 2
- How to use SSL new version
- Seeing the app crash due to crash at com.facebook.SocketRocket.NetworkThread
- SRWebSocket.m give Hang risk warning in Xcode 14 HOT 5
- Memory Leak HOT 1
- Deployment Targets for Cocoapod
- EXC_BREAKPOINT pod '0.6.0' HOT 1
- is 0.6.1 available in pods? HOT 2
- Libraries collision in iOS, React Native and AWS Iot
- Open Error HOT 3
- Cannot connect with subprotocol `graphql-transport-ws`
- How to set or enforce TLS 1.3 version?
- Q: Support L4S udp socket?
- Add SocketRocket.podspec of 0.7.0 version to https://github.com/CocoaPods/Specs.git HOT 3
- Privacy Manifest HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from socketrocket.