Unable to connect and reconnect on react native
See original GitHub issueI was using this lib for a year and everything is going fine. I was start using RN 0.45, and 0.48 , and then 0.53.0. Everything is perfect.
Until I upgrade to react native 0.53.3, and this issue appear.
this is the error I got
{"type":"TransportError","description":{"line":"76","collumn":"7944","sourceURL":"index.android.bundle"}}
sometimes i got “timeout”
I didn’t change any code, I didn’t change any dependency. What I did just:
- Deleting my node_modules folder
- In package.json I change RN and react version number.
- I run ‘NPM install’
I thought it might the React native issue, so I roll back to the previews version I was used 0.53.0. But this problem still exist. I roll back again to 0.48, the issue still there. and so on.
I use socket.io-client 2.0.3 (I have try 2.0.4 but not help)
- report a bug
- request a feature
Setup
- OS: Windows 10 64bit
- browser: React Native
- socket.io version: 2.0.3
I have no Idea what is going on.
Hope someone will help. Thank you
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:13 (1 by maintainers)
Top GitHub Comments
I am having issues in connecting the websocket (socket.io-client, trnasport:[‘websocket’]) on iOS with the webserver. Interestingly, it works when I turn on “Debug JS Remotely” on the device. This might be a problem with the react-native version on iOS. Just curious if someone is facing the same issue.
I resolved this by adding '
transports': ['websocket'],
optionBut that option is not required, am I right? So I keep this issue open because it will break when I omitting that option.