Closed alexco2 closed 3 years ago
The issue is valid!
Hi, try upgrading your Reanimated to 2.3.0, mine just works right now. I have the same issue earlier and spent probably 4hours probing whats the problem. I don't know if this is the fix but I'm new to React-native so that's that only thing I know of, here's my package.json
{
"name": "myApp",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/bottom-tabs": "^6.0.5",
"@react-navigation/native": "^6.0.2",
"@react-navigation/native-stack": "^6.0.6",
"react": "17.0.2",
"react-native": "0.65",
"react-native-gesture-handler": "^1.10.3",
"react-native-reanimated": "^2.3.0",
"react-native-safe-area-context": "^3.3.0",
"react-native-screens": "^3.5.0",
"react-native-vector-icons": "^8.1.0",
"uuidv4": "^6.2.12"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/runtime": "^7.15.3",
"@react-native-community/eslint-config": "^3.0.0",
"babel-jest": "^27.0.6",
"eslint": "^7.32.0",
"jest": "^27.0.6",
"metro-react-native-babel-preset": "^0.66.2",
"react-native-codegen": "^0.0.7",
"react-test-renderer": "17.0.2"
},
"jest": {
"preset": "react-native"
}
I saw that the problem was reanimated was not supporting 0.65 of RN in 2.2.0v of reanimated. Finally managed to install my app right now after running yarn install while setting reanimated to 2.3.0 which was shown on a list with cursor.` react-native-reanimated@2.3.0` didn't fixed it. Only the reanimated installation worked when I modified my package.json and have yarn manage the full reinstallation of the node modules.
@JerichoGragasin That doesn't solve the problem
2.3.0
doesn't seem to be released yet. Install the alpha version instead npm install react-native-reanimated@alpha
.
@JerichoGragasin Thank you for the tip. I tried alpha.2 and got the second error with the NativeEventEmitter.
Obviously, the library has not been adapted. I'll downgrading the RN version to 0.64.x, And then wait for the fit.
@MonsterAnan This is my solution as well. It seems to me though that the alpha version has a different issue with 0.65.0 that is perhaps related to https://github.com/software-mansion/react-native-reanimated/issues/2246
@MonsterAnan This is my solution as well. It seems to me though that the alpha version has a different issue with 0.65.0 that is perhaps related to https://github.com/software-mansion/react-native-reanimated/issues/2246
Hi, how do you make it work? I tried downgrading to 0.64 and 2.2.0 but it was throwing about com.facebook...proguard.? Should I install RN 0.64 globally instead of inside the project folder?
@JerichoGragasin Have you followed these steps? Expecially the one regarding Proguard. https://docs.swmansion.com/react-native-reanimated/docs/2.2.0/installation#proguard
Oh, thanks. I'd have to reinstall stuff really from the repo I guess. Well, let's hope for the best and 2.3.0 would be stable already.
On Wed, Aug 18, 2021, 6:17 PM alexco2 @.***> wrote:
@JerichoGragasin https://github.com/JerichoGragasin Have you followed these steps? Expecially the one regarding Proguard.
https://docs.swmansion.com/react-native-reanimated/docs/2.2.0/installation#proguard
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/software-mansion/react-native-reanimated/issues/2290#issuecomment-900995503, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQPFV4QT2PW4Q3HRWWYN37LT5OCDTANCNFSM5CKUHNAA .
+1
+1
+1
@JerichoGragasin I can confirm, after updating reanimated to 2.3.0-alpha.2 my android build is successful now while using react-native 0.65.0, thanks
@nald-dev Good to hear, brother . I guess this is really what internet means. it's intertwined that if one breaks, Everything breaks especially in terms of dependencies.
@JerichoGragasin I can confirm, after updating reanimated to 2.3.0-alpha.2 my android build is successful now while using react-native 0.65.0, thanks
not really
new NativeEventEmitter()
was called with a non-null argument without the required addListener
method.
new NativeEventEmitter()
was called with a non-null argument without the required removeListeners
method.
new NativeEventEmitter()
was called with a non-null argument without the required addListener
method.
and it says that a variable named "shouldUseWeb' not found, i don't remember myself created that in my project also the error still even i remove reanimated from package.json
I created an issue in the react-native-firebase repository about the NativeEventEmitter
warning. This is caused by a new requirement of these methods: addListener\removeListeners
in the Native Module on Android. There I describe it better and I think it can help to remove these warnings here too. Check it out: https://github.com/invertase/react-native-firebase/issues/5614.
2.3.0-alpha.2 solved the issue for me
same here, solved the issue by installing react-native-reanimated@2.3.0-alpha.2 so, what should we do next? wait for reanimated 2.2.0 compatible with react-native 0.65.0 ?
Hey everyone!
I bet that the following NativeEventEmitter
warnings have nothing about the crash on Android:
WARN `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method.
WARN `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method.
Instead I can provide additional logs from my device which do signalise about the fatal behaviour on Android:
8-19 10:10:42.412 27514 27584 E libc++abi: terminating with uncaught exception of type std::runtime_error: Unable to retrieve jni environment. Is the thread attached?
08-19 10:10:42.412 27514 27584 F libc : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 27584 (hades), pid 27514 (tonlabs.uikit)
08-19 10:10:42.523 27644 27644 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
08-19 10:10:42.524 5275 5275 I /system/bin/tombstoned: received crash request for pid 27584
08-19 10:10:42.524 27644 27644 I crash_dump64: performing dump of process 27514 (target tid = 27584)
08-19 10:10:42.535 27644 27644 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-19 10:10:42.535 27644 27644 F DEBUG : Build fingerprint: 'samsung/dreamltexx/dreamlte:9/PPR1.180610.011/G950FXXUCDUD1:user/release-keys'
08-19 10:10:42.535 27644 27644 F DEBUG : Revision: '10'
08-19 10:10:42.535 27644 27644 F DEBUG : ABI: 'arm64'
08-19 10:10:42.535 27644 27644 F DEBUG : pid: 27514, tid: 27584, name: hades >>> tonlabs.uikit <<<
08-19 10:10:42.535 27644 27644 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-19 10:10:42.535 27644 27644 F DEBUG : Abort message: 'terminating with uncaught exception of type std::runtime_error: Unable to retrieve jni environment. Is the thread attached?'
08-19 10:10:42.535 27644 27644 F DEBUG : x0 0000000000000000 x1 0000000000006bc0 x2 0000000000000006 x3 0000000000000008
08-19 10:10:42.536 27644 27644 F DEBUG : x4 fefefefefefefeff x5 fefefefefefefeff x6 fefefefefefefeff x7 7f7f7f7f7f7f7f7f
08-19 10:10:42.536 27644 27644 F DEBUG : x8 0000000000000083 x9 000000723b5fc838 x10 fffffff87ffffbdf x11 0000000000000001
08-19 10:10:42.536 27644 27644 F DEBUG : x12 0000000000000018 x13 00000000611e03f2 x14 0018670b67456544 x15 00002998498958d6
08-19 10:10:42.536 27644 27644 F DEBUG : x16 000000723b6332a0 x17 000000723b572920 x18 0000000000000000 x19 0000000000006b7a
08-19 10:10:42.536 27644 27644 F DEBUG : x20 0000000000006bc0 x21 0000000000000083 x22 ffffff80ffffffc8 x23 000000718b2e99a0
08-19 10:10:42.536 27644 27644 F DEBUG : x24 000000718b2e9880 x25 000000718b2e98c0 x26 0000000000000001 x27 0000000000000001
08-19 10:10:42.536 27644 27644 F DEBUG : x28 0000000000000020 x29 000000718b2e97f0
08-19 10:10:42.536 27644 27644 F DEBUG : sp 000000718b2e97b0 lr 000000723b565d68 pc 000000723b565d94
08-19 10:10:42.537 27644 27644 F DEBUG :
08-19 10:10:42.537 27644 27644 F DEBUG : backtrace:
08-19 10:10:42.537 27644 27644 F DEBUG : #00 pc 0000000000021d94 /system/lib64/libc.so (abort+124)
08-19 10:10:42.537 27644 27644 F DEBUG : #01 pc 00000000000a01bc /data/app/tonlabs.uikit-AP4PFrO7uAcy62EbK37-jA==/lib/arm64/libc++_shared.so
08-19 10:10:42.537 27644 27644 F DEBUG : #02 pc 00000000000a03b0 /data/app/tonlabs.uikit-AP4PFrO7uAcy62EbK37-jA==/lib/arm64/libc++_shared.so
08-19 10:10:42.537 27644 27644 F DEBUG : #03 pc 00000000000b4208 /data/app/tonlabs.uikit-AP4PFrO7uAcy62EbK37-jA==/lib/arm64/libc++_shared.so
08-19 10:10:42.538 27644 27644 F DEBUG : #04 pc 00000000000b41a0 /data/app/tonlabs.uikit-AP4PFrO7uAcy62EbK37-jA==/lib/arm64/libc++_shared.so (std::terminate()+36)
08-19 10:10:42.538 27644 27644 F DEBUG : #05 pc 00000000000d0710 /data/app/tonlabs.uikit-AP4PFrO7uAcy62EbK37-jA==/lib/arm64/libreanimated.so
08-19 10:10:42.597 5486 5486 D CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT frequency : 858000 uid : 1000 pid : 5486 tag : GESTURE_DETECTED@CPU_MIN@48
Oh, there is an issue about this crash already: https://github.com/software-mansion/react-native-reanimated/issues/2256
With Hermes disabled the log transforms into:
08-19 12:58:31.074 6006 6006 F libc : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 6006 (tonlabs.uikit), pid 6006 (tonlabs.uikit)
08-19 12:58:31.250 6224 6224 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
08-19 12:58:31.252 5275 5275 I /system/bin/tombstoned: received crash request for pid 6006
08-19 12:58:31.253 6224 6224 I crash_dump64: performing dump of process 6006 (target tid = 6006)
08-19 12:58:31.277 6224 6224 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-19 12:58:31.277 6224 6224 F DEBUG : Build fingerprint: 'samsung/dreamltexx/dreamlte:9/PPR1.180610.011/G950FXXUCDUD1:user/release-keys'
08-19 12:58:31.277 6224 6224 F DEBUG : Revision: '10'
08-19 12:58:31.277 6224 6224 F DEBUG : ABI: 'arm64'
08-19 12:58:31.277 6224 6224 F DEBUG : pid: 6006, tid: 6006, name: tonlabs.uikit >>> tonlabs.uikit <<<
08-19 12:58:31.277 6224 6224 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-19 12:58:31.277 6224 6224 F DEBUG : Abort message: 'java_vm_ext.cc:542] JNI DETECTED ERROR IN APPLICATION: JNI GetObjectRefType called with pending exception java.lang.RuntimeException: Attempted to assign to readonly property.'
08-19 12:58:31.278 6224 6224 F DEBUG : x0 0000000000000000 x1 0000000000001776 x2 0000000000000006 x3 0000000000000008
08-19 12:58:31.278 6224 6224 F DEBUG : x4 fefeff713cca2667 x5 fefeff713cca2667 x6 fefeff713cca2667 x7 7f7f7f7f7fff7f7f
08-19 12:58:31.278 6224 6224 F DEBUG : x8 0000000000000083 x9 000000723b5fc838 x10 fffffff87ffffbdf x11 0000000000000001
08-19 12:58:31.278 6224 6224 F DEBUG : x12 0000007feed1c6f8 x13 ffffffffffffffff x14 ffffffffff000000 x15 ffffffffffffffff
08-19 12:58:31.278 6224 6224 F DEBUG : x16 000000723b6332a0 x17 000000723b572920 x18 0000007feed1beca x19 0000000000001776
08-19 12:58:31.278 6224 6224 F DEBUG : x20 0000000000001776 x21 0000000000000083 x22 00000071b8a14c00 x23 000000719eae1000
08-19 12:58:31.278 6224 6224 F DEBUG : x24 000000000000000b x25 0000000000000012 x26 0000000000000005 x27 00000071b8920813
08-19 12:58:31.278 6224 6224 F DEBUG : x28 00000071b89206c7 x29 0000007feed1cc50
08-19 12:58:31.278 6224 6224 F DEBUG : sp 0000007feed1cc10 lr 000000723b565d68 pc 000000723b565d94
08-19 12:58:31.287 6224 6224 F DEBUG :
08-19 12:58:31.287 6224 6224 F DEBUG : backtrace:
08-19 12:58:31.287 6224 6224 F DEBUG : #00 pc 0000000000021d94 /system/lib64/libc.so (abort+124)
08-19 12:58:31.287 6224 6224 F DEBUG : #01 pc 0000000000470460 /system/lib64/libart.so (art::Runtime::Abort(char const*)+1320)
08-19 12:58:31.287 6224 6224 F DEBUG : #02 pc 0000000000008d2c /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+724)
08-19 12:58:31.287 6224 6224 F DEBUG : #03 pc 00000000002ecb20 /system/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1656)
08-19 12:58:31.287 6224 6224 F DEBUG : #04 pc 00000000002ecc94 /system/lib64/libart.so (art::JavaVMExt::JniAbortV(char const*, char const*, std::__va_list)+108)
08-19 12:58:31.287 6224 6224 F DEBUG : #05 pc 00000000000fdff8 /system/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::AbortF(char const*, ...)+144)
08-19 12:58:31.287 6224 6224 F DEBUG : #06 pc 00000000000fc9a8 /system/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::CheckPossibleHeapValue(art::ScopedObjectAccess&, char, art::(anonymous namespace)::JniValueType)+1144)
08-19 12:58:31.287 6224 6224 F DEBUG : #07 pc 00000000000fbd1c /system/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::(anonymous namespace)::JniValueType*)+628)
08-19 12:58:31.287 6224 6224 F DEBUG : #08 pc 00000000000fb3a8 /system/lib64/libart.so (art::(anonymous namespace)::CheckJNI::GetObjectRefType(_JNIEnv*, _jobject*)+688)
08-19 12:58:31.287 6224 6224 F DEBUG : #09 pc 0000000000019098 /data/app/tonlabs.uikit-XCQ7JaVxKF4rd3gK_fNl8g==/lib/arm64/libfbjni.so (facebook::jni::isObjectRefType(_jobject*, jobjectRefType)+76)
08-19 12:58:31.288 6224 6224 F DEBUG : #10 pc 000000000012addc /data/app/tonlabs.uikit-XCQ7JaVxKF4rd3gK_fNl8g==/lib/arm64/libreanimated.so (facebook::jni::LocalReferenceAllocator::verifyReference(_jobject*) const+28)
08-19 12:58:31.288 6224 6224 F DEBUG : #11 pc 000000000012ae44 /data/app/tonlabs.uikit-XCQ7JaVxKF4rd3gK_fNl8g==/lib/arm64/libreanimated.so (facebook::jni::LocalReferenceAllocator::deleteReference(_jobject*) const+64)
08-19 12:58:31.288 6224 6224 F DEBUG : #12 pc 000000000012ad9c /data/app/tonlabs.uikit-XCQ7JaVxKF4rd3gK_fNl8g==/lib/arm64/libreanimated.so (facebook::jni::base_owned_ref<facebook::jni::JString, facebook::jni::LocalReferenceAllocator>::reset(_jstring*)+124)
08-19 12:58:31.288 6224 6224 F DEBUG : #13 pc 000000000012acf8 /data/app/tonlabs.uikit-XCQ7JaVxKF4rd3gK_fNl8g==/lib/arm64/libreanimated.so (facebook::jni::base_owned_ref<facebook::jni::JString, facebook::jni::LocalReferenceAllocator>::reset()+28)
I guess here is the clue:
JNI DETECTED ERROR IN APPLICATION: JNI GetObjectRefType called with pending exception java.lang.RuntimeException: Attempted to assign to readonly property.
08-19 13:10:51.334 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] JNI DETECTED ERROR IN APPLICATION: JNI GetObjectRefType called with pending exception java.lang.RuntimeException: Attempted to assign to readonly property.
08-19 13:10:51.334 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542]
08-19 13:10:51.334 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] _f@/Users/SerTony/ReactWorkspace/UIKit/node_modules/react-native-reanimated/src/reanimated2/Colors.ts (693:32):1:780
08-19 13:10:51.334 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] [native code]
08-19 13:10:51.334 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] _f@/Users/SerTony/ReactWorkspace/UIKit/node_modules/react-native-reanimated/src/reanimated2/Colors.ts (771:32):1:376
08-19 13:10:51.334 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] [native code]
08-19 13:10:51.334 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] _f@/Users/SerTony/ReactWorkspace/UIKit/packages/hydrogen/src/UIBoxButton.tsx (128:46):1:128
08-19 13:10:51.334 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] [native code]
08-19 13:10:51.334 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] _f@/Users/SerTony/ReactWorkspace/UIKit/node_modules/react-native-reanimated/src/reanimated2/Hooks.ts (635:16):1:89
08-19 13:10:51.334 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] [native code]
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at void com.swmansion.reanimated.AndroidErrorHandler.raise(java.lang.String) (AndroidErrorHandler.java:6)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at void com.swmansion.reanimated.Scheduler.triggerUI() (Scheduler.java:-2)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at void com.swmansion.reanimated.Scheduler.access$100(com.swmansion.reanimated.Scheduler) (Scheduler.java:9)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at void com.swmansion.reanimated.Scheduler$1.run() (Scheduler.java:21)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:873)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:99)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at void com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(android.os.Message) (MessageQueueThreadHandler.java:27)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at void android.os.Looper.loop() (Looper.java:214)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7050)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:494)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:965)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542]
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] in call to GetObjectRefType
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] from void com.swmansion.reanimated.Scheduler.triggerUI()
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] "main" prio=5 tid=1 Runnable
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] | group="main" sCount=0 dsCount=0 flags=0 obj=0x76416af8 self=0x71b8a14c00
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] | sysTid=7476 nice=-4 cgrp=default sched=0/0 handle=0x723f448560
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] | state=R schedstat=( 4353441897 65514655 2492 ) utm=395 stm=39 core=6 HZ=100
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] | stack=0x7fee523000-0x7fee525000 stackSize=8MB
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] | held mutexes= "mutator lock"(shared held)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] native: #00 pc 00000000003cbdec /system/lib64/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+220)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] native: #01 pc 000000000049ba30 /system/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+352)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] native: #02 pc 00000000002ec874 /system/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+972)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] native: #03 pc 00000000002ecc94 /system/lib64/libart.so (art::JavaVMExt::JniAbortV(char const*, char const*, std::__va_list)+108)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] native: #04 pc 00000000000fdff8 /system/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::AbortF(char const*, ...)+144)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] native: #05 pc 00000000000fc9a8 /system/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::CheckPossibleHeapValue(art::ScopedObjectAccess&, char, art::(anonymous namespace)::JniValueType)+1144)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] native: #06 pc 00000000000fbd1c /system/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::(anonymous namespace)::JniValueType*)+628)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] native: #07 pc 00000000000fb3a8 /system/lib64/libart.so (art::(anonymous namespace)::CheckJNI::GetObjectRefType(_JNIEnv*, _jobject*)+688)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] native: #08 pc 0000000000019098 /data/app/tonlabs.uikit-XCQ7JaVxKF4rd3gK_fNl8g==/lib/arm64/libfbjni.so (facebook::jni::isObjectRefType(_jobject*, jobjectRefType)+76)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] native: #09 pc 000000000012addc /data/app/tonlabs.uikit-XCQ7JaVxKF4rd3gK_fNl8g==/lib/arm64/libreanimated.so (facebook::jni::LocalReferenceAllocator::verifyReference(_jobject*) const+28)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] native: #10 pc 000000000012ae44 /data/app/tonlabs.uikit-XCQ7JaVxKF4rd3gK_fNl8g==/lib/arm64/libreanimated.so (facebook::jni::LocalReferenceAllocator::deleteReference(_jobject*) const+64)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] native: #11 pc 000000000012ad9c /data/app/tonlabs.uikit-XCQ7JaVxKF4rd3gK_fNl8g==/lib/arm64/libreanimated.so (facebook::jni::base_owned_ref<facebook::jni::JString, facebook::jni::LocalReferenceAllocator>::reset(_jstring*)+124)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] native: #12 pc 000000000012acf8 /data/app/tonlabs.uikit-XCQ7JaVxKF4rd3gK_fNl8g==/lib/arm64/libreanimated.so (facebook::jni::base_owned_ref<facebook::jni::JString, facebook::jni::LocalReferenceAllocator>::reset()+28)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at com.swmansion.reanimated.Scheduler.triggerUI(Native method)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at com.swmansion.reanimated.Scheduler.access$100(Scheduler.java:9)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at com.swmansion.reanimated.Scheduler$1.run(Scheduler.java:21)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at android.os.Handler.handleCallback(Handler.java:873)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at android.os.Handler.dispatchMessage(Handler.java:99)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at android.os.Looper.loop(Looper.java:214)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at android.app.ActivityThread.main(ActivityThread.java:7050)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at java.lang.reflect.Method.invoke(Native method)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
08-19 13:10:51.335 7476 7476 F tonlabs.uikit: java_vm_ext.cc:542]
Well, the given by log getInterpolateCacheRGBA
function was presented in the following commit:
https://github.com/software-mansion/react-native-reanimated/commit/5d2cf0f7b6053a1b94b1d27570dee649f7d022a8#diff-7d21e3d74f24354efa89336b8bf8f70b6a9361923678365bd8219753da3f53c4R693
@piaskowyk, maybe it helps.
Turning off Hermes and rebuilding seemed to remove this std::runtime_error: Unable to retrieve jni environment. Is the thread attached?
but then i wouldn't expect the library to work if Hermes is not being used 🤷🏻♂️
Turning off Hermes and rebuilding seemed to remove this
std::runtime_error: Unable to retrieve jni environment. Is the thread attached?
but then i wouldn't expect the library to work if Hermes is not being used 🤷🏻♂️
AFAIK this library solution is JS engine agnostic now.
Turning off Hermes and rebuilding seemed to remove this
std::runtime_error: Unable to retrieve jni environment. Is the thread attached?
but then i wouldn't expect the library to work if Hermes is not being used 🤷🏻♂️AFAIK this library solution is JS engine agnostic now.
Which is great. The docs still state that Hermes must be turned on though.
that's what i got in the console after app starts
new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method. WARN `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method. WARN `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method. WARN `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method. WARN If you want to use Reanimated 2 then go through our installation steps https://docs.swmansion.com/react-native-reanimated/docs/installation ERROR ReferenceError: Can't find variable: shouldBeUseWeb ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
I can run in my old version device, But crash happened in my new device. RN0.65 & react native reanimated 2.3.0 alpha 2
WARN new NativeEventEmitter()
was called with a non-null argument without the required addListener
method.
WARN new NativeEventEmitter()
was called with a non-null argument without the required removeListeners
method.
WARN new NativeEventEmitter()
was called with a non-null argument without the required addListener
method.
WARN new NativeEventEmitter()
was called with a non-null argument without the required removeListeners
method.
LOG Running "activity" with {"rootTag":1}
that's what i got in the console after app starts
new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method. WARN `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method. WARN `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method. WARN `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method. WARN If you want to use Reanimated 2 then go through our installation steps https://docs.swmansion.com/react-native-reanimated/docs/installation ERROR ReferenceError: Can't find variable: shouldBeUseWeb ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
Finally I have the same error just this moment lol. It's really broken LOL.
About the "new NativeEventEmitter()..." warning: #2297
React Native: 0.65.1 React Native Reanimated: 2.3.0-alpha.2
I was just able to test with android, ios.
TypeError: _reactNativeReanimated.default.useSharedValue is not a function. (In '_reactNativeReanimated.default.useSharedValue(0)', '_reactNativeReanimated.default.useSharedValue' is undefined)
Android | Ios |
---|---|
import React from "react";
import { StyleSheet } from "react-native";
import { useAppSelector } from "reduxs/reducer";
import Animated from "react-native-reanimated";
const UpdateView = React.memo(() => {
const { show, progress } = useAppSelector((state) => state.updateCodepush);
const [showView, setShowView] = React.useState(false);
const opacity = Animated.useSharedValue(0);
const dismiss = React.useCallback(() => {
setShowView(false);
}, []);
React.useEffect(() => {
if (show) {
setShowView(true);
opacity.value = Animated.withTiming(1, { duration: 500 });
} else {
opacity.value = Animated.withTiming(
0,
{ duration: 500 },
(isFinished) => {
if (isFinished) {
Animated.runOnJS(dismiss)();
}
}
);
}
}, [show]);
if (!showView) return null;
return (
<Animated.View
style={{ ...StyleSheet.absoluteFillObject, opacity: opacity.value }}
>
</Animated.View>
);
});
export default UpdateView;
const styles = StyleSheet.create({});
In this issue, I can see more than one case, so quick update
new NativeEventEmitter()
- I will fix it.@khunghang16 in your case. Functions from Reanimated v2 don't exist in the default
export scope. You should import these in this way:
import Animated, { useSharedValue, withTiming, runOnJS } from "react-native-reanimated";
Your code with fix:
In this issue, I can see more than one case, so quick update
- Reanimated support react-native@0.65 since 2.3.0-alpha.2 - the newest release of Reanimated.
- I reproduced the problem with
new NativeEventEmitter()
- I will fix it.- The Hermes issue and another fatal crash are not related to this issue. We fix it as soon as possible of course.
Also, what about publishing the patch as 2.2.1
version which has .aar files for RN0.65 to make Android work?
In this issue, I can see more than one case, so quick update
- Reanimated support react-native@0.65 since 2.3.0-alpha.2 - the newest release of Reanimated.
- I reproduced the problem with
new NativeEventEmitter()
- I will fix it.- The Hermes issue and another fatal crash are not related to this issue. We fix it as soon as possible of course.
Also, what about publishing the patch as
2.2.1
version which has .aar files for RN0.65 to make Android work?
please
@khunghang16 in your case. Functions from Reanimated v2 don't exist in the
default
export scope. You should import these in this way:import Animated, { useSharedValue, withTiming, runOnJS } from "react-native-reanimated";
Your code with fix:
code
This work for me, thank you!
"dependencies": { "@babel/plugin-proposal-decorators": "^7.14.5", "@babel/plugin-transform-flow-strip-types": "^7.14.5", "@react-native-async-storage/async-storage": "^1.15.6", "@react-native-community/datetimepicker": "^3.5.2", "@react-native-community/masked-view": "^0.1.11", "@react-native-picker/picker": "^1.16.6", "@react-native-community/push-notification-ios": "^1.10.0", "@react-native-firebase/analytics": "^12.7.2", "@react-native-firebase/app": "^12.7.2", "@react-native-firebase/crashlytics": "^12.7.2", "@react-navigation/bottom-tabs": "^6.0.5", "@react-navigation/drawer": "^6.1.4", "@react-navigation/native": "^6.0.2", "@react-navigation/stack": "^6.0.7", "@sentry/react-native": "^2.6.2", "@stripe/stripe-react-native": "^0.2.0", "buffer": "^6.0.3", "mobx": "^6.3.2", "mobx-react-lite": "^3.2.0", "moment": "^2.29.1", "moment-holiday": "^1.5.1", "moment-timezone": "^0.5.33", "numeral": "^2.0.6", "react": "17.0.2", "react-native": "0.65.1", "react-native-biometrics": "^2.1.4", "react-native-config": "^1.4.3", "react-native-country-picker-modal": "^2.0.0", "react-native-device-info": "^8.3.1", "react-native-elements": "^3.4.2", "react-native-fbsdk": "^3.0.0", "react-native-gesture-handler": "^1.10.3", "react-native-image-crop-picker": "^0.36.2", "react-native-image-pan-zoom": "^2.1.12", "react-native-linear-gradient": "^2.5.6", "react-native-localize": "^2.1.1", "react-native-orientation-locker": "^1.3.1", "react-native-paper": "^4.9.2", "react-native-picker-select": "^8.0.4", "react-native-push-notification": "^8.0.0", "react-native-reanimated": "^2.3.0-alpha.2", "react-native-safe-area-context": "^3.3.0", "react-native-screens": "^3.5.0", "react-native-shimmer-placeholder": "^2.0.7", "react-native-snap-carousel": "^4.0.0-beta.6", "react-native-svg": "^12.1.1", "react-native-vector-icons": "^8.1.0", "react-native-video": "^5.1.1", "react-phone-number-input": "^3.1.25", "reanimated-bottom-sheet": "^1.0.0-alpha.22", "socket.io-client": "4.1.3" }, "devDependencies": { "@babel/core": "^7.15.0", "@babel/plugin-proposal-class-properties": "^7.14.5", "@babel/runtime": "^7.15.3", "@react-native-community/eslint-config": "^3.0.0", "@types/react-phone-number-input": "^3.0.10", "babel-jest": "^27.0.6", "eslint": "^7.32.0", "jest": "^27.0.6", "metro-react-native-babel-preset": "^0.66.2", "react-native-clean-project": "^3.6.4", "react-native-codegen": "^0.0.7", "react-test-renderer": "17.0.2", "reactotron-react-native": "^5.0.0" },
`BUNDLE ./index.js
WARN new NativeEventEmitter()
was called with a non-null argument without the required addListener
method.
WARN new NativeEventEmitter()
was called with a non-null argument without the required removeListeners
method.
WARN new NativeEventEmitter()
was called with a non-null argument without the required addListener
method.
WARN new NativeEventEmitter()
was called with a non-null argument without the required removeListeners
method.
WARN If you want to use Reanimated 2 then go through our installation steps https://docs.swmansion.com/react-native-reanimated/docs/installation
ERROR ReferenceError: Can't find variable: shouldBeUseWeb
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.`
"dependencies": { "@babel/plugin-proposal-decorators": "^7.14.5", "@babel/plugin-transform-flow-strip-types": "^7.14.5", "@react-native-async-storage/async-storage": "^1.15.6", "@react-native-community/datetimepicker": "^3.5.2", "@react-native-community/masked-view": "^0.1.11", "@react-native-picker/picker": "^1.16.6", "@react-native-community/push-notification-ios": "^1.10.0", "@react-native-firebase/analytics": "^12.7.2", "@react-native-firebase/app": "^12.7.2", "@react-native-firebase/crashlytics": "^12.7.2", "@react-navigation/bottom-tabs": "^6.0.5", "@react-navigation/drawer": "^6.1.4", "@react-navigation/native": "^6.0.2", "@react-navigation/stack": "^6.0.7", "@sentry/react-native": "^2.6.2", "@stripe/stripe-react-native": "^0.2.0", "buffer": "^6.0.3", "mobx": "^6.3.2", "mobx-react-lite": "^3.2.0", "moment": "^2.29.1", "moment-holiday": "^1.5.1", "moment-timezone": "^0.5.33", "numeral": "^2.0.6", "react": "17.0.2", "react-native": "0.65.1", "react-native-biometrics": "^2.1.4", "react-native-config": "^1.4.3", "react-native-country-picker-modal": "^2.0.0", "react-native-device-info": "^8.3.1", "react-native-elements": "^3.4.2", "react-native-fbsdk": "^3.0.0", "react-native-gesture-handler": "^1.10.3", "react-native-image-crop-picker": "^0.36.2", "react-native-image-pan-zoom": "^2.1.12", "react-native-linear-gradient": "^2.5.6", "react-native-localize": "^2.1.1", "react-native-orientation-locker": "^1.3.1", "react-native-paper": "^4.9.2", "react-native-picker-select": "^8.0.4", "react-native-push-notification": "^8.0.0", "react-native-reanimated": "^2.3.0-alpha.2", "react-native-safe-area-context": "^3.3.0", "react-native-screens": "^3.5.0", "react-native-shimmer-placeholder": "^2.0.7", "react-native-snap-carousel": "^4.0.0-beta.6", "react-native-svg": "^12.1.1", "react-native-vector-icons": "^8.1.0", "react-native-video": "^5.1.1", "react-phone-number-input": "^3.1.25", "reanimated-bottom-sheet": "^1.0.0-alpha.22", "socket.io-client": "4.1.3" }, "devDependencies": { "@babel/core": "^7.15.0", "@babel/plugin-proposal-class-properties": "^7.14.5", "@babel/runtime": "^7.15.3", "@react-native-community/eslint-config": "^3.0.0", "@types/react-phone-number-input": "^3.0.10", "babel-jest": "^27.0.6", "eslint": "^7.32.0", "jest": "^27.0.6", "metro-react-native-babel-preset": "^0.66.2", "react-native-clean-project": "^3.6.4", "react-native-codegen": "^0.0.7", "react-test-renderer": "17.0.2", "reactotron-react-native": "^5.0.0" },
`BUNDLE ./index.jsWARN
new NativeEventEmitter()
was called with a non-null argument without the requiredaddListener
method. WARNnew NativeEventEmitter()
was called with a non-null argument without the requiredremoveListeners
method. WARNnew NativeEventEmitter()
was called with a non-null argument without the requiredaddListener
method. WARNnew NativeEventEmitter()
was called with a non-null argument without the requiredremoveListeners
method. WARN If you want to use Reanimated 2 then go through our installation steps https://docs.swmansion.com/react-native-reanimated/docs/installation ERROR ReferenceError: Can't find variable: shouldBeUseWeb ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native. ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.`
This is for both Android and IOS.
@JerichoGragasin I can confirm, after updating reanimated to 2.3.0-alpha.2 my android build is successful now while using react-native 0.65.0, thanks
not really
new NativeEventEmitter()
was called with a non-null argument without the requiredaddListener
method.new NativeEventEmitter()
was called with a non-null argument without the requiredremoveListeners
method.new NativeEventEmitter()
was called with a non-null argument without the requiredaddListener
method.and it says that a variable named "shouldUseWeb' not found, i don't remember myself created that in my project also the error still even i remove reanimated from package.json
Hi I have meet this issue too. My fix is add import { nativeShouldBeMock, shouldBeUseWeb } from './PlatformChecker' in src/reanimated2/core.ts
Fixed after installation by this page https://docs.swmansion.com/react-native-reanimated/docs/installation/.
I am having the same error while updating RN to 0.65.1 for rnn-starter that uses wix/react-native-navigation and other libs, including Reanimated.
E/libc++abi: terminating with uncaught exception of type std::runtime_error: Unable to retrieve jni environment. Is the thread attached?
In my case, It happens when I try to change key
of a Root component (when changing ui.themeMode) from utils/designSystem.tsx
-->withThemeModes()
, so it will trigger the whole app update to apply new designs (colors, etc.). Also, when I try to call Navigation.setRoot()
for the second time (not sure if I can do that) during an app launch. Otherwise, the app doesn't crash randomly with the current libs stack.
My current progress is here.
And for the annoying warnings, you can use the following (it will be fixed soon, I guess)
LogBox.ignoreLogs(['EventEmitter.removeListener', '`new NativeEventEmitter()`']);
@sertony @Rubon72 Yes, we decided to release also 2.2.1 with support for react-native@0.65. We want to do it this week.
Fixed with: https://github.com/software-mansion/react-native-reanimated/pull/2316 As I said, we release also patch 2.2.1 with RN65 support, but now I close. Thanks for help for everyone 🙌
@piaskowyk Thank you very much
@piaskowyk Thank you very much. And when can we use 2.2.1 ? ~~~
@BooYeu We want to release 2.2.1 and 2.3.0-alpha.3 this week
@BooYeu We want to release 2.2.1 and 2.3.0-alpha.3 this week
Hey, any news about it? Can't wait to start integration and it's Friday already ;)
Description
After upgrading to react-native version 0.65.0 with reanimated 2.2.0 I got the following error:
I tried react-native 0.65.0 with reanimated version 2.3.0-alpha.2 and then got a new error on startup, which is the following:
I hope this helps somehow. I will downgrade to react-native 0.64.2 again, since there seems to be compatibility issues with reanimated and hermes.
Expected behavior
For react-native-reanimated 2.2.0 I expect react-native 0.65.0 to compile. For 2.3.0-alpha.2 I expect the app not to crash.
Actual behavior & steps to reproduce
I upgraded to 0.65.0. Perhaps it has something to do with the following error: https://github.com/software-mansion/react-native-reanimated/issues/2246
Snack or minimal code example
Package versions
Affected platforms
I was just able to test with android.