-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Unable to connect on React-Native (only in Debug Mode) #1259
Comments
oops duplicate of #1245 |
I'm reopening this issue, this is slightly different. I tried to install socket io on a fresh react-native installation 0.57.8 and I'm facing this issue again. |
I'm facing the same issue @jr-k 's issue persists after @anooj1483 's hack according to #1245 (comment) in #1245 |
Facing the same issue. Works well when debug mode is on, but doesn't work when Debug mode is turned off or apk is built with release mode.
|
Same issue as everyone else. Works perfectly if debugging. Server Version: |
|
FIXED IT for me when i was adding host:port like next in debug mode: const socket = io("//domain.com:port", opts); // this works only in debug mode didn't worked in NO debug mode, i had to add the protocol: const socket = io("http://domain.com:port", opts); |
I have the same issue |
has anyone found a fix for this yet? i have tried several different versions of the package with no luck |
there are many causes of this error/bug, mine was only one of many. |
try last version from github, like this, solved my issues with RN android:
Cheers |
its works on socket.io 2.1.1 and react-native 0.59.8. love you @ningacoding 👍 👍 |
Hi @autotrof, |
Anyone cannot solved yet?
I likewise only in debug mode worked :( |
I solved this problem change |
try this on android it worked for me <application |
"react-native": "0.70.5", This how i setup my socket connection as per the docs
Only working in debug mode |
For future readers: Please check our guide with React Native here: https://socket.io/how-to/use-with-react-native Please reopen if needed. |
You want to:
Current behaviour
I can't connect via socket io to my server, it times out.
Steps to reproduce (if the current behaviour is a bug)
In react-native:
The debug logs look like:
There is nothing only a timeout triggered
Expected behaviour
I expect to be able to connect to my socketio server, the same way I am able to in a web browser.
Setup
The text was updated successfully, but these errors were encountered: