react-native-reanimated
react-native-reanimated copied to clipboard
TypeError: undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions']
Description
tried upgrade on IOS reanimated to version 2 and getting this error TypeError: undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions'] on all kind of 2.x versions and android works fine!
Expected behavior
IOS app to work properly
Actual behavior & steps to reproduce
Snack or minimal code example
Package versions
name | version |
---|---|
react-native | 0.66 |
react-native-reanimated | 2.x |
NodeJS | |
Xcode | |
Java | |
Gradle | |
expo |
Affected platforms
- [ ] Android
- [ X] iOS
- [ ] Web
Hey! 👋
It looks like you've omitted a few important sections from the issue template.
Please complete Snack or minimal code example section.
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snippet of code, a snack or a link to a GitHub repository that reproduces the problem?
Hello @alexg-93! Thanks for submitting the issue.
Did you remember to run pod install
in ios
directory of your app after upgrading to Reanimated 2?
Hello @alexg-93! Thanks for submitting the issue.
Did you remember to run
pod install
inios
directory of your app after upgrading to Reanimated 2?
yes i did .. it didnt help this error after pod install when opening the app
Okay. Did you remember to add plugins: ['react-native-reanimated/plugin']
in babel.config.js
of your app as mentioned in the docs?
Okay. Did you remember to add
plugins: ['react-native-reanimated/plugin']
inbabel.config.js
of your app as mentioned in the docs?
also did that yes..
Okay, now please run one of the following commands, depending on which package manager you use, in order to clear your application cache:
-
yarn start --reset-cache
-
npm start -- --reset-cache
-
expo start -c
Then reload the app and let us know if it works for you.
Okay, now please run one of the following commands, depending on which package manager you use, in order to clear your application cache:
yarn start --reset-cache
npm start -- --reset-cache
expo start -c
Then reload the app and let us know if it works for you.
i have done reset cache but still no luck.. and im using standalone rn cli (not expo)
another question ..its true that the debugger not working with reanimated v2?? it’s a deal breaker ..if there is no support yet for debugger then i’ll stay with reanimated 1 untill this package supports using debugger mode
i have done reset cache but still no luck.. and im using standalone rn cli (not expo)
Is it a regular setup of React Native or is it a custom (brownfield) setup?
Also, can you paste babel.config.js
of your app here?
another question ..its true that the debugger not working with reanimated v2?? it’s a deal breaker ..if there is no support yet for debugger then i’ll stay with reanimated 1 untill this package supports using debugger mode
Reanimated 2, like many other libraries nowadays, uses JSI (calling C++ code from JS). You can still use Chrome Debugger but when the debugger is connected, Reanimated will run animations using JS (like on web version). Apart from this, measure
and scrollTo
functions will not work (instead, a warning will be shown).
The recommended tool for debugging is using Flipper which connects to a device via WebSockets and thus supports JSI-enabled libraries etc.
i have done reset cache but still no luck.. and im using standalone rn cli (not expo)
Is it a regular setup of React Native or is it a custom (brownfield) setup?
Also, can you paste
babel.config.js
of your app here?another question ..its true that the debugger not working with reanimated v2?? it’s a deal breaker ..if there is no support yet for debugger then i’ll stay with reanimated 1 untill this package supports using debugger mode
Reanimated 2, like many other libraries nowadays, uses JSI (calling C++ code from JS). You can still use Chrome Debugger but when the debugger is connected, Reanimated will run animations using JS (like on web version). Apart from this,
measure
andscrollTo
functions will not work (instead, a warning will be shown).The recommended tool for debugging is using Flipper which connects to a device via WebSockets and thus supports JSI-enabled libraries etc.
its a regular rn setup not brownfield.. im not yet on the pc but i’ll paste the babel code later but the code there as mentioned in the docs (also its working on android fine) but on ios not.
about the debugger.. can you use react native debugger tool?
Here's some more things you can check:
- Try adding
import Animated from 'react-native-reanimated'; console.log(Animated);
inindex.js
of your app - Make sure you don't set
DONT_AUTOINSTALL_REANIMATED
flag for compiling inPodfile
of your app - Make sure
AppDelegate.{m,mm,h}
of your app are identical with those from the original RN template
You can also try some solutions from these closed issues:
- https://github.com/software-mansion/react-native-reanimated/issues/2525
- https://github.com/software-mansion/react-native-reanimated/issues/846
about the debugger.. can you use react native debugger tool?
I'm not 100% sure now but right now we are adding a section about debugging apps with Reanimated to our docs and we hope to have answers early next week.
I m also facing this issue, working fine in 2.2.4, but in 2.10.0 facing same issue
@guptaprnv Hey, did you remember to run pod install
?
yes i ran pod install, cleaned node module also
i think issue is something about babel plugin, or babel versions. as it getting undefined value from this this.InnerNativeModule = global.__reanimatedModuleProxy; in src/reanimated2/NativeReanimated/NativeReanimated.ts
same here ,rn 0.69.4 , reanimated 2.10.0
- Make sure
AppDelegate.{m,mm,h}
of your app are identical with those from the original RN template
What if my AppDelegate is different from the default one? (there was a migration from the native application to the RN).
- Make sure
AppDelegate.{m,mm,h}
of your app are identical with those from the original RN templateWhat if my AppDelegate is different from the default one? (there was a migration from the native application to the RN).
did you managed to get it fixed?
@tomekzaw have u find any fix for this
@guptaprnv @alexg-93 Actually yes. This patch helps: https://github.com/software-mansion/react-native-reanimated/issues/2791#issuecomment-1004779673
this solution works for me https://stackoverflow.com/questions/70968067/typeerror-undefined-is-not-an-object-evaluating-innernativemodule-installcore
2.2.4
Thanks @guptaprnv !You saved my life. It is working for me now.
@vijaydokrimare-gep , can you tell me how to fix it, i am having the same problem as you on rn 0.68.5 , Thank you so much
Same issue with RN - 0.71.6 and xCode - 14.3. 1 changing to 2.2.4 loops to https://github.com/software-mansion/react-native-reanimated/pull/3969
Same issue with RN - 0.71.6 and xCode - 14.3. 1 changing to 2.2.4 loops to #3969
https://github.com/software-mansion/react-native-reanimated/issues/2791#issuecomment-1004779673 this patch works.
Same issue with RN - 0.71.6 and xCode - 14.3. 1 changing to 2.2.4 loops to #3969
#2791 (comment) this patch works.
"react": "18.2.0", "react-native": "0.71.4", "react-native-reanimated": "^3.1.0",
this patch doesn't work for me, still got the same error, and I found this problem only happens on iOS, android works fine
Same having this issue on RN 0.71.8 and Reanimated 3.2.0
It's wild I get some variation of this error, or the TypeError: undefined is not an object (evaluating 'cppVersion.match')
error, or the dreaded Couldn't determine the version of the native part of Reanimated.
error on so many versions but 2.2.4 works somehow. I have tried most of the 2 minor v2 releases. not sure what's going on, but this will allow me to slowly update the app i'm working on to the updated API so I can move to v3 🤞
Closing since we are dropping support for Reanimated 2, also no reproduction code was provided.