socket.io-client
socket.io-client copied to clipboard
Socket doesn't connect when React Native remote debugger is on
You want to:
- [x] report a bug
- [ ] request a feature
Current behaviour
socket doesn't connect when react native remote debugger is turned on. The error is always timeout. Socket does connect if debugger is turned off.
Expected behaviour
socket should connect regardless of RN debugger being on or off
Setup
- iOS: 12.4
- react native: 0.59.8
- socket.io version: 2.2.0
I'm having the same problem Did you find any solution?
@haitaox @parth-koshta ¿Has encontrado una respuesta para resolver esto?
hey bro, get any solution
I think it because different time of device and pc :) so, try to set your pc time same as device time or later than device time.
I think it because different time of device and pc :) so, try to set your pc time same as device time or later than device time.
It worked. But this is atrocious. :/
That sounds weird, the time of the device should not affect the Socket.IO connection... Does somebody have an explanation?
That sounds weird, the time of the device should not affect the Socket.IO connection... Does somebody have an explanation?
And also socket connects as new client multiple times even when socket.connect() was not called. Before I synced the time for both pc and device especially working with debugging mode this happened. While on production even if the time is different, socket was working. IMO this has to do with debugging mode. PS: I was using chrome debugger.
Edit: Syncing time also make apps run faster on debugging 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.