react-native-reanimated icon indicating copy to clipboard operation
react-native-reanimated copied to clipboard

TypeError: undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions']

Open alexg-93 opened this issue 2 years ago • 18 comments

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

alexg-93 avatar Jul 28 '22 13:07 alexg-93

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Snack or minimal code example section.

github-actions[bot] avatar Jul 28 '22 13:07 github-actions[bot]

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?

github-actions[bot] avatar Jul 28 '22 13:07 github-actions[bot]

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?

tomekzaw avatar Jul 29 '22 07:07 tomekzaw

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?

yes i did .. it didnt help this error after pod install when opening the app

alexg-93 avatar Jul 29 '22 07:07 alexg-93

Okay. Did you remember to add plugins: ['react-native-reanimated/plugin'] in babel.config.js of your app as mentioned in the docs?

tomekzaw avatar Jul 29 '22 07:07 tomekzaw

Okay. Did you remember to add plugins: ['react-native-reanimated/plugin'] in babel.config.js of your app as mentioned in the docs?

also did that yes..

alexg-93 avatar Jul 29 '22 07:07 alexg-93

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.

tomekzaw avatar Jul 29 '22 07:07 tomekzaw

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

alexg-93 avatar Jul 29 '22 07:07 alexg-93

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.

tomekzaw avatar Jul 29 '22 07:07 tomekzaw

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.

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?

alexg-93 avatar Jul 29 '22 08:07 alexg-93

Here's some more things you can check:

  • Try adding import Animated from 'react-native-reanimated'; console.log(Animated); in index.js of your app
  • Make sure you don't set DONT_AUTOINSTALL_REANIMATED flag for compiling in Podfile 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.

tomekzaw avatar Jul 29 '22 08:07 tomekzaw

I m also facing this issue, working fine in 2.2.4, but in 2.10.0 facing same issue

guptaprnv avatar Aug 30 '22 12:08 guptaprnv

@guptaprnv Hey, did you remember to run pod install?

tomekzaw avatar Aug 30 '22 12:08 tomekzaw

yes i ran pod install, cleaned node module also

guptaprnv avatar Aug 30 '22 12:08 guptaprnv

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

guptaprnv avatar Aug 30 '22 12:08 guptaprnv

same here ,rn 0.69.4 , reanimated 2.10.0

onegaop avatar Sep 01 '22 02:09 onegaop

  • 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).

AndreyBubnov avatar Sep 01 '22 20:09 AndreyBubnov

  • 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).

did you managed to get it fixed?

alexg-93 avatar Sep 04 '22 09:09 alexg-93

@tomekzaw have u find any fix for this

guptaprnv avatar Oct 13 '22 09:10 guptaprnv

@guptaprnv @alexg-93 Actually yes. This patch helps: https://github.com/software-mansion/react-native-reanimated/issues/2791#issuecomment-1004779673

AndreyBubnov avatar Oct 13 '22 10:10 AndreyBubnov

this solution works for me https://stackoverflow.com/questions/70968067/typeerror-undefined-is-not-an-object-evaluating-innernativemodule-installcore

AppDevloper23 avatar Oct 21 '22 14:10 AppDevloper23

2.2.4

Thanks @guptaprnv !You saved my life. It is working for me now.

vijaydokrimare-gep avatar Jan 02 '23 08:01 vijaydokrimare-gep

@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

SilverPham08091998 avatar Mar 02 '23 15:03 SilverPham08091998

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

yasodha-r avatar May 03 '23 09:05 yasodha-r

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.

yasodha-r avatar May 05 '23 07:05 yasodha-r

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

LastStranger avatar May 16 '23 09:05 LastStranger

Same having this issue on RN 0.71.8 and Reanimated 3.2.0

thomasarogers avatar Jun 02 '23 10:06 thomasarogers

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 🤞

ahardy42 avatar Dec 01 '23 19:12 ahardy42

Closing since we are dropping support for Reanimated 2, also no reproduction code was provided.

Latropos avatar Mar 05 '24 10:03 Latropos