react-native: Application Reload Hang while JS Remote Debug is active (Android)
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
react-native -v:0.47xnode -v:8.2.1npm -v:3.109yarn --version: 0.27.5
Then, specify:
- Target Platform:iOS, Android
- Development Operating System: Windows
- Build tools: issue is not specific
Steps to Reproduce
(Write your steps here:)
- Create a simple react native application using react-native Init Prj and run an android emulator
- switch to Prj folder then launch react-native-cli run-android
- After the build is completed the app start in emulator, if remote js debug is not enabled enable it
- force a reload via the menu or via hot reload
- Application try to reload, then hang up and freeze.
Expected Behavior
(Write what you thought would happen.)
Reload should work fine and debug may stay connected
Actual Behavior
(Write what happened. Add screenshots!)
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
This issue is around from almost two years the first one i’ve noticed was referring to react 0.27. I think it’s is a real showstopper because it limits severely the debugging and hot features of react native. if this is a no-issue but instead related to some mistake in react configuration i think should be well documented somewhere
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 20
- Comments: 50 (3 by maintainers)
In my case the reason behind this was that the debugger page was left open from previous sessions. Closing the tab completely and then opening the debugger in a new tab solved the issue.
the issue was opened more than one month ago and still no feedback from react… is this project alive?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.
This should be reopened and fixed in at least a couple of previous version of react native. The framework is constantly breaking compatibility or deprecating methods so upgrading is not a breeze. Issues like this affect so much productivity and they are so annoying, above all if used to the fast Instant Run capabilities of Android Studio
Same issue. With the Remote Debugger on, JS is not reloading. On switching the debugger off it works fine.
Ubuntu Android react : 16.0.0 react-native: 0.50.1
Apparently also enabling hot reloading fixes the issue caused by enabling remote debugging as suggested here https://github.com/wix/react-native-navigation/issues/963#issuecomment-291143390.
If the rest of the threads reporting the same issue are anything to go by the guys from React are going to wait an appropriate amount of time and then close this thread because it hasn’t had any activity for a while. Please stop doing that guys. The issue is easily reproducible with your own example projects. You don’t have to infer from the absence of activity on a thread that the issue has magically gone away … You can actually check 😉
Having the same issue with RN 0.54, redux-persist 5.9.1. Have tried removing redux-persist, and it still hangs with remote debugging on.
For me, Chrome developer tool stop working on android because it is getting this issue “origin is not allowed by access-control-allow”. You wouldnt see it on chrome but when you debug on safari you will see it.
The way to fix it is to open chrome with this command in terminal: open -a Google\ Chrome --args --disable-web-security And then reconnect for debugging, things works again. For safari, under Develop menu, select disable cross origin restriction.
I have
redux-persistand upgrading it to version 5.7.0 (link) fixed the issue.I got this working for me downloading and simply using react-native-debugger. Which leads me to believe it’s related to the Chrome CORS issue that has been mentioned.
I would suggest moving all discussion over to one of these threads: #18006 || #17970
In my case, It is caused by AsyncStorage on Android is quite broken on recent version of React Native when debugger is activated. Alas, this API is used by redux persist and some of our service.
The only solution is we need to override the usage of AsyncStorage by create our own custom storage service on android (but use it only on development mode, to prevent break on production).
anyone interested the code, check it here: https://gist.github.com/putuyoga/abdc0e8c1ddd0c9ba05d721a148ba657
further reference: https://github.com/facebook/react-native/issues/12830 https://github.com/facebook/react-native/issues/18372 https://github.com/facebook/react-native/issues/7605
same bug on ubuntu 16.04 here…v 0.49 of RN and node 8.9.1…works with non debug mode but white screen if I turn on debug