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.

Crashing in debug mode on Android after upgrading to React Native 0.48.2

See original GitHub issue

Today I upgraded from React Native 0.47.2 to 0.48.2 and since that moment the app crashes if I do remote JS debugging. The same behaviour for both Realm 1.10.3 and 1.11.1.

Here are the most interesting lines from logs:

09-11 18:24:59.804 24888-24953/com.myapp V/JSRealm: setupChromeDebugModeRealmJsContext
09-11 18:24:59.826 24888-24953/com.myapp I/Realm: Starting the debugging WebServer, Host: null Port: 8082
9-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: GetStringUTFChars received NULL jstring
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]     in call to GetStringUTFChars
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]     from java.lang.String io.realm.react.RealmReactModule.processChromeDebugCommand(java.lang.String, java.lang.String)

So it seems that the app crashes on this line.

Full log:

09-11 18:24:59.781 24888-24940/com.myapp V/JSRealm: setDefaultRealmFileDirectory
09-11 18:24:59.781 24888-24940/com.myapp D/JSRealm: Absolute path: /data/data/com.myapp/files
09-11 18:24:59.783 24888-24940/com.myapp D/ReactNative: Initializing React Xplat Bridge.
09-11 18:24:59.784 24888-24940/com.myapp D/ReactNative: Initializing React Xplat Bridge before initializeBridge
09-11 18:24:59.786 24888-24940/com.myapp D/ReactNative: Initializing React Xplat Bridge after initializeBridge
09-11 18:24:59.786 24888-24940/com.myapp D/ReactNative: CatalystInstanceImpl.runJSBundle()
09-11 18:24:59.787 24888-24954/com.myapp D/ReactNative: ReactInstanceManager.setupReactContext()
09-11 18:24:59.787 24888-24954/com.myapp D/ReactNative: CatalystInstanceImpl.initialize()
09-11 18:24:59.788 24888-24953/com.myapp E/BluetoothAdapter: Bluetooth binder is null
09-11 18:24:59.789 24888-24954/com.myapp W/unknown:ReactNative: Packager connection already open, nooping.
09-11 18:24:59.789 24888-24954/com.myapp W/unknown:ReactNative: Inspector connection already open, nooping.
09-11 18:24:59.791 24888-24954/com.myapp D/ReactNative: ReactInstanceManager.attachRootViewToInstance()
09-11 18:24:59.804 24888-24953/com.myapp V/JSRealm: setupChromeDebugModeRealmJsContext
09-11 18:24:59.826 24888-24953/com.myapp I/Realm: Starting the debugging WebServer, Host: null Port: 8082
09-11 18:24:59.832 1619-1629/? I/WindowManager: Destroying surface Surface(name=) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1449 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2478 com.android.server.wm.WindowManagerService.removeWindowLocked:2436 com.android.server.wm.WindowManagerService.removeWindowLocked:2305 com.android.server.wm.WindowManagerService.removeWindow:2300 com.android.server.wm.Session.remove:193 
09-11 18:24:59.833 1619-1639/? I/ActivityManager: Displayed com.myapp/.MainActivity: +926ms
09-11 18:25:00.058 1619-1639/? I/WindowManager: Destroying surface Surface(name=Starting com.myapp) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.destroyOrSaveSurface:2073 com.android.server.wm.AppWindowToken.destroySurfaces:363 com.android.server.wm.WindowStateAnimator.finishExit:565 com.android.server.wm.WindowStateAnimator.stepAnimationLocked:491 com.android.server.wm.WindowAnimator.updateWindowsLocked:303 com.android.server.wm.WindowAnimator.animateLocked:704 
09-11 18:25:00.065 1619-9336/? I/WindowManager: Destroying surface Surface(name=com.android.launcher3/com.android.launcher3.Launcher) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.destroyOrSaveSurface:2073 com.android.server.wm.AppWindowToken.destroySurfaces:363 com.android.server.wm.AppWindowToken.notifyAppStopped:389 com.android.server.wm.WindowManagerService.notifyAppStopped:4456 com.android.server.am.ActivityStack.activityStoppedLocked:1252 com.android.server.am.ActivityManagerService.activityStopped:6903 
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: GetStringUTFChars received NULL jstring
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]     in call to GetStringUTFChars
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]     from java.lang.String io.realm.react.RealmReactModule.processChromeDebugCommand(java.lang.String, java.lang.String)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470] "NanoHttpd Request Processor (#1)" daemon prio=5 tid=41 Runnable
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   | group="main" sCount=0 dsCount=0 obj=0x12f25820 self=0x8c188f00
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   | sysTid=24986 nice=0 cgrp=default sched=0/0 handle=0x89a7f920
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   | state=R schedstat=( 0 0 0 ) utm=0 stm=0 core=1 HZ=100
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   | stack=0x8997d000-0x8997f000 stackSize=1038KB
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   | held mutexes= "mutator lock"(shared held)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   native: #00 pc 0056d8de  /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+238)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   native: #01 pc 00539f6e  /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+526)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   native: #02 pc 00536f6b  /system/lib/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+75)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   native: #03 pc 0038e868  /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+1560)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   native: #04 pc 0038f168  /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_Pc+120)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   native: #05 pc 0013d112  /system/lib/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+82)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   native: #06 pc 0013c46f  /system/lib/libart.so (_ZN3art11ScopedCheck13CheckInstanceERNS_18ScopedObjectAccessENS0_12InstanceKindEP8_jobjectb+351)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   native: #07 pc 0013b61a  /system/lib/libart.so (_ZN3art11ScopedCheck22CheckPossibleHeapValueERNS_18ScopedObjectAccessEcNS_12JniValueTypeE+394)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   native: #08 pc 0013a26e  /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE+1390)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   native: #09 pc 001444ee  /system/lib/libart.so (_ZN3art8CheckJNI22GetStringCharsInternalEPKcP7_JNIEnvP8_jstringPhbb+1054)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   native: #10 pc 00133cb8  /system/lib/libart.so (_ZN3art8CheckJNI17GetStringUTFCharsEP7_JNIEnvP8_jstringPh+72)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   native: #11 pc 00444d3c  /data/app/com.myapp-1/lib/x86/librealmreact.so (_ZN7_JNIEnv17GetStringUTFCharsEP8_jstringPh+40)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   native: #12 pc 00445140  /data/app/com.myapp-1/lib/x86/librealmreact.so (Java_io_realm_react_RealmReactModule_processChromeDebugCommand+109)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   native: #13 pc 000a42dc  /data/app/com.myapp-1/oat/x86/base.odex (Java_io_realm_react_RealmReactModule_processChromeDebugCommand__Ljava_lang_String_2Ljava_lang_String_2+168)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   at io.realm.react.RealmReactModule.processChromeDebugCommand(Native method)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   at io.realm.react.RealmReactModule.access$000(RealmReactModule.java:25)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   at io.realm.react.RealmReactModule$AndroidWebServer.serve(RealmReactModule.java:161)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:840)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:189)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470]   at java.lang.Thread.run(Thread.java:761)
09-11 18:25:01.514 24888-24986/com.myapp A/art: art/runtime/java_vm_ext.cc:470] 
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403] Runtime aborting...
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403] Aborting thread:
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403] "NanoHttpd Request Processor (#1)" prio=5 tid=41 Native
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   | group="" sCount=0 dsCount=0 obj=0x12f25820 self=0x8c188f00
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   | sysTid=24986 nice=0 cgrp=default sched=0/0 handle=0x89a7f920
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   | state=R schedstat=( 0 0 0 ) utm=0 stm=0 core=1 HZ=100
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   | stack=0x8997d000-0x8997f000 stackSize=1038KB
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   | held mutexes= "abort lock"
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #00 pc 0056d8de  /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+238)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #01 pc 00539f6e  /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+526)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #02 pc 00536f6b  /system/lib/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+75)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #03 pc 00522d43  /system/lib/libart.so (_ZNK3art10AbortState10DumpThreadERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPNS_6ThreadE+67)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #04 pc 00522b17  /system/lib/libart.so (_ZNK3art10AbortState4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+615)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #05 pc 0051327b  /system/lib/libart.so (_ZN3art7Runtime5AbortEv+155)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #06 pc 00119572  /system/lib/libart.so (_ZN3art10LogMessageD1Ev+1298)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #07 pc 0038efc5  /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+3445)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #08 pc 0038f168  /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_Pc+120)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #09 pc 0013d112  /system/lib/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+82)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #10 pc 0013c46f  /system/lib/libart.so (_ZN3art11ScopedCheck13CheckInstanceERNS_18ScopedObjectAccessENS0_12InstanceKindEP8_jobjectb+351)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #11 pc 0013b61a  /system/lib/libart.so (_ZN3art11ScopedCheck22CheckPossibleHeapValueERNS_18ScopedObjectAccessEcNS_12JniValueTypeE+394)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #12 pc 0013a26e  /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE+1390)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #13 pc 001444ee  /system/lib/libart.so (_ZN3art8CheckJNI22GetStringCharsInternalEPKcP7_JNIEnvP8_jstringPhbb+1054)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #14 pc 00133cb8  /system/lib/libart.so (_ZN3art8CheckJNI17GetStringUTFCharsEP7_JNIEnvP8_jstringPh+72)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #15 pc 00444d3c  /data/app/com.myapp-1/lib/x86/librealmreact.so (_ZN7_JNIEnv17GetStringUTFCharsEP8_jstringPh+40)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #16 pc 00445140  /data/app/com.myapp-1/lib/x86/librealmreact.so (Java_io_realm_react_RealmReactModule_processChromeDebugCommand+109)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   native: #17 pc 000a42dc  /data/app/com.myapp-1/oat/x86/base.odex (???)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   at io.realm.react.RealmReactModule.processChromeDebugCommand(Native method)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   at io.realm.react.RealmReactModule.access$000(RealmReactModule.java:25)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   at io.realm.react.RealmReactModule$AndroidWebServer.serve(RealmReactModule.java:161)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:840)
09-11 18:25:01.558 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:189)
09-11 18:25:01.559 24888-24986/com.myapp A/art: art/runtime/runtime.cc:403]   at java.lang.Thread.run(Thread.java:761)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:23 (9 by maintainers)

github_iconTop GitHub Comments

11reactions
knethcommented, Sep 22, 2017

@prabhu Yes, I hope to have time early next week to do a 1.12.1 release (or 1.13.0 if we add some functionality as well).

7reactions
blagoevcommented, Oct 2, 2017

this is already fixed and merged and will be released as part of 2.0 If you want you can backport it in your apps by changing this RealmReactModule.java like so https://github.com/realm/realm-js/pull/1373/commits/7a039d5407a0345bdd6cb3c2cec154b4455d003c#diff-7c0bbffb2b1d56242c8b6670362aa936R161

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 >
Using Hermes
Hermes is an open-source JavaScript engine optimized for React Native. For many apps, using Hermes will result in improved start-up time, ...
Read more >
Fixing React-Native android release build - wesionaryTEAM
Fixing React-Native android release build Android release build crashes on launch but works fine on a development mode. couldn't find DSO to load: ......
Read more >
ReactNative App Crashes when Deployed to TestFlight
Your app crashed due to an unhandled language exception. Looking at frames 3 through 2 in the Last Exception Backtrace you posted, it...
Read more >
React Native app crashing in debug mode : r/reactnative
My app is crashing when trying to debug in chrome debugger particularly on making service calls using axios.Any help is appreciated.
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