question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android crashing when Remote Debug is enabled

See original GitHub issue

Summary

I’m trying to get an app up and running on an android emulator. I’ve tried both Genymotion and the Android Studio Emulator with the same results for both. I’ve also tried Android API 26, 27 and 28 both 32 and 64 bit versions, same exact behavior. I can get the app running and showing me the default page with the info about React-Native. As soon as I enable Remote JS Debugging it opens the new window in chrome for me but then the app crashes. And there is no way to get back into the app, I’ve tried rerunning react-native run-android which succeeds but then the app instantly fails. Trying to just open the app through the Android menu gives the same result. The only way to get the app back up and running is to wipe the data from my emulator and restart it, that way remote debug is then disabled again.

So long story short the app runs perfectly fine on android until I enable Remote JS Debugging then it constantly crashes as soon as I try to start the app up.

System Info

System:
    OS: macOS 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 814.70 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 8.10.0 - ~/.nvm/versions/node/v8.10.0/bin/node
    npm: 5.6.0 - ~/.nvm/versions/node/v8.10.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
    Android SDK:
      API Levels: 23, 24, 25, 26, 27, 28, 29
      Build Tools: 26.0.2, 28.0.3, 29.0.1, 29.0.2
      System Images: android-24 | Google Play Intel x86 Atom, android-25 | Google Play Intel x86 Atom, android-26 | Intel x86 Atom, android-26 | Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom_64, android-26 | Google Play Intel x86 Atom, android-27 | Intel x86 Atom, android-27 | Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64, android-29 | Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5692245
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-native: 0.60.5 => 0.60.5 
  npmGlobalPackages:
    react-native: 0.60.5

React Native version: 0.60.5

Steps To Reproduce

  1. npm i -g react-native-cli
  2. react-native init testApp
  3. cd testapp
  4. npm i
  5. react-native start
  6. react-native run-android

At this point the app is up and running with no problem.

  1. Enable Remote JS Debugging
  2. Watch the app consistently crash every time it opens

Describe what you expected to happen: I expect the app to not crash and start giving me debug info in the new window opened in chrome.

Snack, code example, screenshot, or link to a repository:

Please let me know if more info is needed

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11

github_iconTop GitHub Comments

9reactions
messenjacommented, Mar 24, 2021

Same here. RN 0.63.4

3reactions
robertwt7commented, Aug 9, 2021

Hey peeps, is there any issue that’s still open for this? I’m still having the same issue specifically for android when pressing debug, it crashes

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Android crashes on enabling debug mode
The same react native codebase, turning on dubug mode on ios is working fine, but on Android it always crash when debug mode...
Read more >
Debugging - Expo Documentation
Learn about different techniques and tools available to debug your Expo ... Find an associated Android crash report: If your Android app is...
Read more >
Detect and diagnose crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >
Bugfender | Cloud Remote Logger, Crash Reporter, In-App ...
What is Remote Logging? ... Bugfender doesn't just log bugs and crashes. ... Enable or disable the devices you want to debug with...
Read more >
Test your Crashlytics implementation - Firebase - Google
On this page · Force a crash to test your implementation · Enable debug logging for Crashlytics · Next steps.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found