react-native-reanimated: TypeError: undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions')

Description

App crashes with this error:

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

Expected behavior

App should not crash.

Actual behavior & steps to reproduce

NA

Snack or minimal code example

NA

Package versions

  • React Native: 0.66
  • React Native Reanimated: 2.3.0-beta.2
  • NodeJS: v14.17.6
  • Xcode: 13
  • Java & Gradle: latest

Affected platforms

  • Android
  • iOS
  • Web

image

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 32 (6 by maintainers)

Most upvoted comments

I temporarily resolved that way

downgrade from 2.3.1 to 2.2.4

yarn remove react-native-reanimated
yarn add react-native-reanimated@2.2.4 -E

and with these installation instructions: https://docs.swmansion.com/react-native-reanimated/docs/2.2.0/installation

my environment is like this

"react": "17.0.2",
"react-native": "0.66.4"
"react-native-reanimated": "2.2.4"
...

Has anyone got this issue still?

I’ve figured it out - there are some steps in the installation docs that must not have been there when I initially installed this package. Step 2 here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/#android My app is now starting up successfully. Thanks for the nudge @mjmasn.

Running into the same Issue trying to use reanimated within a Swift Framework.

I temporarily resolved that way

downgrade from 2.3.1 to 2.2.4

yarn remove react-native-reanimated
yarn add react-native-reanimated@2.2.4 -E

and with these installation instructions: https://docs.swmansion.com/react-native-reanimated/docs/2.2.0/installation

my environment is like this

"react": "17.0.2",
"react-native": "0.66.4"
"react-native-reanimated": "2.2.4"
...

Thx!!!

I do expereince the same issue, but in my case it fails for App Clip https://developer.apple.com/app-clips/ iOS target. It works for ordinary iOS target.

Here is my Pofdile

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'

target 'UnrollMe' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'Unroll.me' do
    inherit! :complete
  end
end

and react-native info

info Fetching system and libraries information...
System:
    OS: macOS 11.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 487.94 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.18.0 - ~/.nvm/versions/node/v14.18.0/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.14.15 - ~/.nvm/versions/node/v14.18.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
    Android SDK:
      API Levels: 23, 24, 25, 26, 28, 29
      Build Tools: 28.0.3, 29.0.2, 29.0.3
      System Images: android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6626763
    Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
  Languages:
    Java: 16.0.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.66.0 => 0.66.0 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

@piaskowyk OK so it looks like some changes were made in React Native version 0.58.6 (three years ago!!) that in our case were missing from our AppDelegate.h / AppDelegate.m. We actually generated these using Salesforce’s forcereact CLI tool so I think they might need to update their templates 😂 No more crash on start for us now 🎉

@gavrichards and anyone else still seeing this issue, do you follow the upgrade helper every time you upgrade React Native?

You can see the changes I mean here in AppDelegate.h / AppDelegate.m: https://react-native-community.github.io/upgrade-helper/?from=0.58.6&to=0.66.0

Must be some similar changes on the Android side that we’d already made.