skip to Main Content

iOS Build Crashes after installed Reanimated 2. Using React Native 0.71.2

I have also built the Reanimated playground locally and it runs successfully.
When running the iOS Project from the command line (i.e. yarn start) the project hangs with the following:

Build Logs from CLI:

info Found Xcode workspace "GluApp.xcworkspace"
info Found booted iPhone 14, iPhone 14 Plus
info Launching iPhone 14
info Building (using "xcodebuild -workspace GluApp.xcworkspace -configuration Debug -scheme GluApp -destination id=87333F30-59BA-47D3-BC75-5401B963DECF")
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace GluApp.xcworkspace -configuration Debug -scheme GluApp -destination id=87333F30-59BA-47D3-BC75-5401B963DECF

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Prepare packages

Computing target dependency graph and provisioning inputs

Create build description
Build description signature: a8a3776bb009792fd6aef7d31e911c75
Build description path: /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/XCBuildData/a8a3776bb009792fd6aef7d31e911c75-desc.xcbuild

note: Building targets in dependency order
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'fmt' from project 'Pods')
ProcessInfoPlistFile /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Products/Debug-iphonesimulator/fmt/fmt.framework/Info.plist /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods/Target Support Files/fmt/fmt-Info.plist (in target 'fmt' from project 'Pods')
    cd /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods
    builtin-infoPlistUtility /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods/Target Support Files/fmt/fmt-Info.plist -producttype com.apple.product-type.framework -expandbuildsettings -format binary -platform iphonesimulator -o /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Products/Debug-iphonesimulator/fmt/fmt.framework/Info.plist

ProcessInfoPlistFile /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Products/Debug-iphonesimulator/glog/glog.framework/Info.plist /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods/Target Support Files/glog/glog-Info.plist (in target 'glog' from project 'Pods')
    cd /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods
    builtin-infoPlistUtility /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods/Target Support Files/glog/glog-Info.plist -producttype com.apple.product-type.framework -expandbuildsettings -format binary -platform iphonesimulator -o /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Products/Debug-iphonesimulator/glog/glog.framework/Info.plist

WriteAuxiliaryFile /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/libwebp.build/libwebp-all-target-headers.hmap (in target 'libwebp' from project 'Pods')
    cd /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods
    write-file /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/libwebp.build/libwebp-all-target-headers.hmap

WriteAuxiliaryFile /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/libevent.build/libevent-all-target-headers.hmap (in target 'libevent' from project 'Pods')
    cd /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods
    write-file /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/libevent.build/libevent-all-target-headers.hmap

WriteAuxiliaryFile /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Yoga.build/yoga-all-target-headers.hmap (in target 'Yoga' from project 'Pods')
    cd /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods
    write-file /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Yoga.build/yoga-all-target-headers.hmap

WriteAuxiliaryFile /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-perflogger.build/reactperflogger-all-target-headers.hmap (in target 'React-perflogger' from project 'Pods')
    cd /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods
    write-file /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-perflogger.build/reactperflogger-all-target-headers.hmap

WriteAuxiliaryFile /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SDWebImage.build/SDWebImage-all-target-headers.hmap (in target 'SDWebImage' from project 'Pods')
    cd /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods
    write-file /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SDWebImage.build/SDWebImage-all-target-headers.hmap

WriteAuxiliaryFile /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-logger.build/logger-all-target-headers.hmap (in target 'React-logger' from project 'Pods')
    cd /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods
    write-file /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-logger.build/logger-all-target-headers.hmap

WriteAuxiliaryFile /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/PromisesObjC.build/FBLPromises-all-target-headers.hmap (in target 'PromisesObjC' from project 'Pods')
    cd /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods
    write-file /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/PromisesObjC.build/FBLPromises-all-target-headers.hmap

WriteAuxiliaryFile /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsinspector.build/jsinspector-all-target-headers.hmap (in target 'React-jsinspector' from project 'Pods')
    cd /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods
    write-file /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsinspector.build/jsinspector-all-target-headers.hmap

WriteAuxiliaryFile /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DoubleConversion.build/DoubleConversion-all-target-headers.hmap (in target 'DoubleConversion' from project 'Pods')
    cd /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods
    write-file /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DoubleConversion.build/DoubleConversion-all-target-headers.hmap

WriteAuxiliaryFile /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/GTMSessionFetcher.build/GTMSessionFetcher-all-target-headers.hmap (in target 'GTMSessionFetcher' from project 'Pods')
    cd /Users/chaserobbins/Documents/GitHub/glu-rn/ios/Pods
    write-file /Users/chaserobbins/Library/Developer/Xcode/DerivedData/GluApp-exnhohxglkpavifmejwmwogxilfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/GTMSessionFetcher.build/GTMSessionFetcher-all-target-headers.hmap

PhaseScriptExecution [CP] Co

Errors when launching from xCode:

Undefined symbol: hermes::vm::NopCrashManager::~NopCrashManager()

Undefined symbol: facebook::jsi::HostObject::getPropertyNames(facebook::jsi::Runtime&)

Undefined symbol: facebook::jsi::HostObject::get(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&)

Undefined symbol: facebook::jsi::HostObject::set(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&, facebook::jsi::Value const&)

Undefined symbol: facebook::jsi::HostObject::~HostObject()

Undefined symbol: facebook::jsi::Value::Value(facebook::jsi::Value&&)

Undefined symbol: facebook::jsi::Value::Value(facebook::jsi::Runtime&, facebook::jsi::Value const&)

Undefined symbol: facebook::jsi::Value::~Value()

Undefined symbol: facebook::jsi::Buffer::~Buffer()

Undefined symbol: facebook::jsi::JSError::JSError(facebook::jsi::Runtime&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)

Undefined symbol: facebook::jsi::JSError::~JSError()

Undefined symbol: facebook::react::HermesExecutorFactory::defaultRuntimeConfig()

Undefined symbol: facebook::hermes::makeHermesRuntime(hermes::vm::RuntimeConfig const&)

Undefined symbol: facebook::jsi::Value::asNumber() const

Undefined symbol: facebook::jsi::Value::toString(facebook::jsi::Runtime&) const

Undefined symbol: facebook::jsi::Object::getPropertyAsObject(facebook::jsi::Runtime&, char const*) const

Undefined symbol: facebook::jsi::Object::getPropertyAsFunction(facebook::jsi::Runtime&, char const*) const

Undefined symbol: facebook::jsi::Value::asObject(facebook::jsi::Runtime&) const &

Undefined symbol: facebook::jsi::Value::asString(facebook::jsi::Runtime&) const &

Undefined symbol: facebook::jsi::Value::asSymbol(facebook::jsi::Runtime&) const &

Undefined symbol: facebook::jsi::Object::asFunction(facebook::jsi::Runtime&) const &

Undefined symbol: facebook::jsi::Object::asArray(facebook::jsi::Runtime&) const &

Undefined symbol: facebook::jsi::Value::asObject(facebook::jsi::Runtime&) &&

Undefined symbol: facebook::jsi::Value::asString(facebook::jsi::Runtime&) &&

Undefined symbol: facebook::jsi::Object::asFunction(facebook::jsi::Runtime&) &&

Undefined symbol: facebook::jsi::Object::asArray(facebook::jsi::Runtime&) &&

Undefined symbol: typeinfo for facebook::jsi::HostObject

Undefined symbol: typeinfo for facebook::jsi::Buffer

Undefined symbol: typeinfo for facebook::jsi::JSError

Undefined symbol: vtable for hermes::vm::CrashManager

Undefined symbol: vtable for hermes::vm::NopCrashManager

Undefined symbol: vtable for facebook::jsi::HostObject

Undefined symbol: vtable for facebook::jsi::Buffer

Undefined symbol: vtable for facebook::react::HermesExecutorFactory

Podfile:

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

platform :ios, min_ios_version_supported
prepare_react_native_project!

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

target 'GluApp' do
  use_frameworks!
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # Hermes is now enabled by default. Disable by setting this flag to false.
    # Upcoming versions of React Native may rely on get_default_flags(), but
    # we make it explicit here to aid in the React Native upgrade process.
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    # :flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'GluAppTests' do
    inherit! :complete
    # Pods for testing
  end

  post_install do |installer|
    react_native_post_install(
      installer,
      # Set `mac_catalyst_enabled` to `true` in order to apply patches
      # necessary for Mac Catalyst builds
      :mac_catalyst_enabled => false
    )
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end

package.json

  "name": "GluApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "@cometchat-pro/react-native-chat": "3.0.11",
    "@firebase/app": "^0.9.3",
    "@firebase/auth": "^0.21.3",
    "@react-native-async-storage/async-storage": "^1.17.11",
    "@react-native-firebase/app": "^17.1.0",
    "@react-native-firebase/auth": "^17.1.0",
    "@react-navigation/native": "^6.1.3",
    "@react-navigation/native-stack": "^6.9.9",
    "@react-query-firebase/auth": "^1.0.0-dev.2",
    "firebase": "^9.17.1",
    "react": "18.2.0",
    "react-native": "0.71.2",
    "react-native-confirmation-code-field": "^7.3.1",
    "react-native-fast-image": "^8.6.3",
    "react-native-flatlist-alphabet": "^1.1.2",
    "react-native-reanimated": "^2.14.4",
    "react-native-safe-area-context": "^4.5.0",
    "react-native-screens": "^3.19.0",
    "react-native-sheet": "^0.1.6",
    "react-native-vector-icons": "^9.2.0",
    "react-query": "^3.39.3"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native-community/eslint-config": "^3.2.0",
    "@tsconfig/react-native": "^2.0.2",
    "@types/jest": "^29.2.1",
    "@types/react": "^18.0.24",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.2.1",
    "eslint": "^8.19.0",
    "jest": "^29.2.1",
    "metro-react-native-babel-preset": "0.73.7",
    "prettier": "^2.4.1",
    "react-test-renderer": "18.2.0",
    "typescript": "4.8.4"
  },
  "jest": {
    "preset": "react-native"
  }
}

2

Answers


  1. Have you added the react-native-reanimated babel plugin in the babel.config.js file?

    On React Native CLI:

    module.exports = {
      presets: ['module:metro-react-native-babel-preset'],
      plugins: ['react-native-reanimated/plugin'],
    };
    

    If you’re using Expo:

    module.exports = function (api) {
      api.cache(true);
      return {
        presets: ['babel-preset-expo'],
        plugins: ['react-native-reanimated/plugin'],
      };
    };
    
    Login or Signup to reply.
  2. I just ran into this problem too and was able to solve it.

    In your podfile the line use_frameworks! uses frameworks instead of static libraries. I believe some React Native libraries don’t like this?

    The solutions are:

    • Replace use_frameworks! with use_frameworks! :linkage => :static
    • Replace use_frameworks! with (included in react-native starter template):
    linkage = ENV['USE_FRAMEWORKS']
    if linkage != nil
      Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
      use_frameworks! :linkage => linkage.to_sym
    end
    

    Edit: Looking further into this, I have more information.

    use_framework was not compatible with Flipper, Hermes, and the new RN Architecture (Fabric).

    In react-native release 0.69.1 a fix allows Hermes to work with use_frameworks!. To use use_frameworks with Hermes, make sure you have set static linkage with use_frameworks! :linkage => :static.

    See this also: https://github.com/software-mansion/react-native-reanimated/pull/3491

    From what i’ve gathered, static libraries have faster app load times anyway. Might be worth opting out of dynamic libraries.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search