BUG: (at least on Android) RN-app crashes, freezes or loses connection to development server when device is roaming and roaming is disabled on device #15305
Labels
Resolution: Locked
This issue was locked by the bot.
Is this a bug report?
Yes
Have you read the Bugs section of the How to Contribute guide?
Yes
Environment
react-native-cli: 2.0.1
react-native: 0.46.2 (tested on 0.44.0 too)
node: 8.2.0
npm -v
Steps to Reproduce
Expected Behavior
Roaming should just cut the connection if roaming is disabled. Although listening to connection on a native Android app (with roaming disabled) going from connected state to roaming just returns disconnected, but going from disconnected state to roaming makes the connection awkwardly connect and disconnect again, but nothing bad happens to the native app itself.
Native app tested with the code below:
`private class ConnectionChangeReceiver extends BroadcastReceiver {
Actual Behavior
At first I tested this bug on a 0.44.0 app with self-made native Android ConnectionChangeListener partially shown above. Every other connection change did what expected (emitted custom event through DeviceEventEmitter and brought up a popup on disconnect and made it disappear on connect) but roaming with roaming disabled has made the app freeze (completely unresponsive to any click, Ctrl+M or double-R) or crashed it completely.
Thought it was the listeners fault at first but after some digging I thought it might be a problem with just RN. After that I created a new project with 'react-native init'-command (having global version 0.46.2 so this test is with that) ran it and emulated roaming. The app doesn't crash or freeze, but on reload throws the red screen with 'Could not connect to development server'-error.
The text was updated successfully, but these errors were encountered: