[android] app crash -> JNI DETECTED ERROR IN APPLICATION: java_object == null
See original GitHub issueDescription
My android crashes on startup. Do you have any idea?
Same problem on Android 29 and 30 Same problem with Hermes enabled
Using expo-dev-client.
Expected behavior
app working fine.
Actual behavior & steps to reproduce
java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: java_object == null
java_vm_ext.cc:577] in call to GetObjectClass
java_vm_ext.cc:577] from void com.swmansion.reanimated.NativeProxy$EventHandler.receiveEvent(java.lang.String, com.facebook.react.bridge.WritableMap)
Sometimes I also get this error:
java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: use of invalid jobject 0xf2ae4f50
Cannot figure out the cause
java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: use of invalid jobject 0xf2ae4f50
java_vm_ext.cc:577] from void com.swmansion.reanimated.NativeProxy$EventHandler.receiveEvent(java.lang.String, com.facebook.react.bridge.WritableMap)
or this:
java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: use of deleted weak global reference 0x6f687067
Cannot figure out the cause
java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: use of deleted weak global reference 0x6f687067
java_vm_ext.cc:577] from void com.swmansion.reanimated.NativeProxy$EventHandler.receiveEvent(java.lang.String, com.facebook.react.bridge.WritableMap)
Package versions
- React Native: 0.64.3
- React Native Reanimated: 2.2.4 / 2.2.2
- Expo: 43.0.4
Affected platforms
- Android
- iOS
- Web
Probably import aspect in log:
runtime.cc:630] native: #84 pc 00000000001365b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568)
runtime.cc:630] native: #85 pc 00000000001450cc /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276)
runtime.cc:630] native: #86 pc 00000000004b09a0 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
runtime.cc:630] native: #87 pc 00000000004b23e8 /apex/com.android.runtime/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1472)
runtime.cc:630] native: #88 pc 000000000043e138 /apex/com.android.runtime/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+48)
runtime.cc:630] at com.swmansion.reanimated.NativeProxy$EventHandler.receiveEvent(Native method)
runtime.cc:630] at com.swmansion.reanimated.NativeProxy$EventHandler.receiveEvent(NativeProxy.java:55)
runtime.cc:630] at com.th3rdwave.safeareacontext.InsetsChangeEvent.dispatch(InsetsChangeEvent.java:31)
runtime.cc:630] at com.swmansion.reanimated.NodesManager.handleEvent(NodesManager.java:485)
runtime.cc:630] at com.swmansion.reanimated.NodesManager.onEventDispatch(NodesManager.java:462)
runtime.cc:630] at com.facebook.react.uimanager.events.EventDispatcherImpl.dispatchEvent(EventDispatcherImpl.java:116)
runtime.cc:630] at com.th3rdwave.safeareacontext.SafeAreaProviderManager$1.onInsetsChange(SafeAreaProviderManager.java:47)
runtime.cc:630] at com.th3rdwave.safeareacontext.SafeAreaProvider.maybeUpdateInsets(SafeAreaProvider.java:35)
runtime.cc:630] at com.th3rdwave.safeareacontext.SafeAreaProvider.onPreDraw(SafeAreaProvider.java:58)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:15
- Comments:21 (2 by maintainers)
Top Results From Across the Web
obj == null, but have no JNI code [libc.so] abort - Stack Overflow
[libc.so] abort SIGABRT. This is what I see in the Android Console crash reports: JNI DETECTED ERROR IN APPLICATION: obj == null pid:...
Read more >[SOLVED] JNI error when requesting permission from library ...
JNI DETECTED ERROR IN APPLICATION : can't call android.app.FragmentManager android.app.Activity.getFragmentManager() on null object.
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 >JNI DETECTED ERROR IN APPLICATION: obj == null
I/Unity: Firebase App initializing app com.uminton.basketball.local.us (default 1). (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen ...
Read more >JNI DETECTED ERROR IN APPLICATION: java_array == null
userActivity.webpageURL() : null; return doOpenUrl(url, fromApplication(application)); }. When it run, app crashed with error:.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Give me some time, I will try to reproduce your issue on your repo. I will notify you about the progress.
This issue has been fixed in Expo SDK 45.0.3 and expo-dev-client 0.9.5. Thanks @lukmccall