-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Remote JS Debugging crashes app after 30 seconds #12289
Comments
i also faced this problem Additional Information
|
React Native version: 0.38.0 It crashes my app right after I open it |
React Native version: 0.41.2
|
Same happens here
|
I have the same problem React Native version: 0.42 |
Crashes right after turning debug on from the dev menu React Native version: 0.42 |
Crashes after ~30 seconds, if it is paused in debugger everything is fine
React Native version: 0.42 |
Same issue here. App crashes a few seconds after enabling remote debugging on my Android Emulator RN: 0.42.3
|
Like a four car pileup React Native version: 0.42 |
Getting the same error in my environment. react-native: 0.43.3 |
Same issue here debugging android React-native: 0.40.0 |
The issue seems to be that the React Native code is running a network call on the UI Thread 🤦♂️ So I have a workaround... NOTE: Don't ship this in your release builds as you should never run network calls on the UI Thread. This workaround is just to get debugging working until a proper fix is made by Facebook In @Override
public void onCreate() {
// There is a bug in React Native preventing remote debugging on Android
// https://github.com/facebook/react-native/issues/12289
//
// This is a hack to get around it. Make sure you remove it before releasing
// as you should never run network calls on the main thread
if (BuildConfig.DEBUG) {
strictModePermitAll();
}
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
private static void strictModePermitAll() {
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
if (Build.VERSION.SDK_INT >= 16) {
//restore strict mode after onCreate() returns. https://issuetracker.google.com/issues/36951662
new Handler().postAtFrontOfQueue(new Runnable() {
@Override
public void run() {
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
}
});
}
} |
@mrbrentkelly thank you very much for the fix! It's been over a |
@mrbrentkelly This has not solved the issue yet |
Same issue here debugging android React-native: 0.45.1 @mrbrentkelly thank you for this fix, but it doesn't work for me. |
In order to get @mrbrentkelly workaround compiled, add these 3 lines on top:
Unfortunately the app will still crash as soon as Remote Debugger Mode was activated. |
Facing same issue: @mrbrentkelly "react": "16.0.0-alpha.12", |
same issue here |
react-native-cli: 2.0.1 android-26 x86 (Android 8.0.0)
Permissions are enabled:
Code from @mrbrentkelly added, thanks, but no lack. Update: |
This line in
Read more: |
@iegik |
Anything new about this issue? It's really a pain to develop with the debugger on, as the app crashes 50% of the time when reloading 😞 |
I've also run into very frequent crashes when working with the remote debugger on android. "react": "16.0.0", |
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. |
Still happening to me with RN 0.51.0 and 0.52.0 Looking for help!!!! |
I am still getting same error "react-native": "0.47.1", nw_connection_get_connected_socket 287 Connection has no connected handler |
"react-native": "0.44.3", |
Still an issue with:
I solved the issue by disabling 'remote-redux-devtools': in my
with
|
This comment has been minimized.
This comment has been minimized.
Can anyone reproduce this issue on a freshly init'd project with 59-rc3? |
Hello there 👋 this issue seems to have been inactive for the past few weeks. Because of this, it's likely that the issue is not a high priority anymore or it has been solved by OP; for these reasons, we'll close it. But please, if it's actually still an issue with 0.59 please comment below and we can reopen it or please send us a Pull Request with a fix 😊 |
I'm having this problem on
UPDATE: |
The same problem in react native 0.60.0 Here's the complete log in my case:
|
@mehulmpt as far as I know |
Hey is there any solution to this ?? I am still unable to debug the app. |
Description
When using
Remote JS Debugging
the app crashes after exactly 30 seconds.Without
Remote JS Debugging
the app works just fine.Reproduction
This also happens on a brand new project created like this:
Just enable
Remote JS Debugging
, reload and wait for 30 seconds - the app will crash.Solution
?
Additional Information
The text was updated successfully, but these errors were encountered: