JNI DETECTED ERROR IN APPLICATION: JNI ERROR (app bug): jobject is an invalid JNI transition frame reference or invalid reference: 0x2433c4 (use of invalid jobject)
See original GitHub issueDescription
I’m upgrading an app to react-native@0.66.5 and also other packages like react-native-reanimated@2.3.0-beta.4, but it looks like something is broken. I’m testing in a Google Pixel 6 (real device) running Android 12 (latest update). iOS Simulator works fine (didn’t test in a real device, but I’d assume so).
adb logcat includes this output:
11-26 14:18:52.821 20626 20626 F DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
11-26 14:18:52.821 20626 20626 F DEBUG : Abort message: 'JNI DETECTED ERROR IN APPLICATION: JNI ERROR (app bug): jobject is an invalid JNI transition frame reference or invalid reference: 0x2433c4 (use of invalid jobject)
11-26 14:18:52.821 20626 20626 F DEBUG : in call to GetObjectClass
11-26 14:18:52.821 20626 20626 F DEBUG : from void com.swmansion.reanimated.NativeProxy$EventHandler.receiveEvent(java.lang.String, com.facebook.react.bridge.WritableMap)'
11-26 14:18:52.821 20626 20626 F DEBUG : x0 0000000000000000 x1 0000000000004fc0 x2 0000000000000006 x3 0000007feb2238f0
11-26 14:18:52.821 20626 20626 F DEBUG : x4 fefeff7eea212449 x5 fefeff7eea212449 x6 fefeff7eea212449 x7 7f7f7f7fff7f7f7f
11-26 14:18:52.821 20626 20626 F DEBUG : x8 00000000000000f0 x9 00000076df3be0b0 x10 0000000000000000 x11 ffffff80fffffbdf
11-26 14:18:52.821 20626 20626 F DEBUG : x12 0000000000000001 x13 0000000000000179 x14 0000007feb222700 x15 ffffffffffffffff
11-26 14:18:52.821 20626 20626 F DEBUG : x16 00000076df45b050 x17 00000076df438cd0 x18 00000076f74f4000 x19 0000000000004fc0
11-26 14:18:52.821 20626 20626 F DEBUG : x20 0000000000004fc0 x21 00000000ffffffff x22 0000000000000000 x23 0000000000000000
11-26 14:18:52.821 20626 20626 F DEBUG : x24 00000074442b63eb x25 0000000000000001 x26 00000076f5eff14c x27 0000007444c17000
11-26 14:18:52.821 20626 20626 F DEBUG : x28 b4000074672e4e70 x29 0000007feb223970
11-26 14:18:52.821 20626 20626 F DEBUG : lr 00000076df3eb82c sp 0000007feb2238d0 pc 00000076df3eb85c pst 0000000000001000
Expected behavior
I should be able to open my app on Android and navigate through my app without crashes.
Actual behavior & steps to reproduce
App crashes right away during boot.
Snack or minimal code example
Package versions
- React Native: 0.66.5
- React Native Reanimated: 2.3.0-beta.4
- NodeJS: v14.18.1
- Xcode: 13.1
- Java & Gradle:
$ java -version
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
OpenJDK 64-Bit Server VM (build 11.0.10+0-b96-7281165, mixed mode)
$ which java
/Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
$ android/gradlew -version
------------------------------------------------------------
Gradle 6.9
------------------------------------------------------------
Build time: 2021-05-07 07:28:53 UTC
Revision: afe2e24ababc7b0213ccffff44970aa18035fc0e
Kotlin: 1.4.20
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 11.0.10 (JetBrains s.r.o. 11.0.10+0-b96-7281165)
OS: Mac OS X 12.0.1 x86_64
Affected platforms
- Android
- iOS
- Web
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:12 (3 by maintainers)
Top Results From Across the Web
How to debug: JNI DETECTED ERROR IN APPLICATION
For future reference in this post, let's define a few items: ... JNI DETECTED ERROR IN APPLICATION: use of invalid jobject 0xd4fd90e0.
Read more >Application crashes. JNI DETECTED ERROR IN APPLICATION
I managed to workaround the error creating a new variable, copying another's variable to it and use the new one and the code...
Read more >use of invalid jobject when calling NewObject for innerclass-C++
[Solved]-JNI DETECTED ERROR IN APPLICATION: use of invalid jobject when ... and made a global reference for the ID's of my inner class...
Read more >runtime/check_jni.cc - platform/art - android Git repositories
Z - jboolean (shown as true and false). * V - void. *. * Java reference types: * L - jobject. * a...
Read more >记一次jin开发遇到的很欲哭无泪的报错_风 - CSDN博客
JNI DETECTED ERROR IN APPLICATION: use of invalid jobject 0x1388遇到这个错让人很头疼,字面上的意思就是说你传进来的对象是无效的,这个就很难 ...
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
I have the same issue, fired by
<SafeAreaProvider>: https://github.com/software-mansion/react-native-reanimated/issues/2710. Also provided minimal example@Kudo it was happening with 2.2.4 and 2.3.0-beta.4 but I will also try to use the „shipped version“ 2.2.0 and I will provide a better stacktrace.