react-native: "Could not get BatchedBridge, make sure your bundle is packaged correctly" since react-native 0.65 using Release schema

Description

Since upgrading to react-native version 0.65, whenever building and starting the app on IOS, I receive an error saying “Could not get BatchedBridge, make sure your bundle is packaged correctly”. Whenever running on the Debug schema, the app successfully starts.

React Native version:

System:
    OS: macOS 11.4
    CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
    Memory: 60.82 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.19.0 - ~/.nvm/versions/node/v12.19.0/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v12.19.0/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v12.19.0/bin/npm
    Watchman: 2021.06.07.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK: Not Found
  IDEs:
    Android Studio: 4.2.2 4.2.2
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: 14.0.2 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: ^17.0.2 => 17.0.2 
    react-native: ^0.65.0 => 0.65.0 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Upgrade to react-native 0.65
  2. Build IOS app with Release schema
  3. Start the app and wait for it to crash on startup

Notes

  • Hermes is enabled in the Podfile

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 15
  • Comments: 23

Most upvoted comments

Same problem +

But the app successfully starts with :hermes_enabled => false in the Podfile. With enabled Hermes release schema crashes.

Upgraded react-native-reanimated from 2.2.0 to 2.3.0-alpha.2 worked for me

I investigated, This problem is caused by react-native-reanimated@2.2.0

Another observation I realised my ios device and macbook was on different network subnets, and the ios device wasn’t able to reach metro. Once i made sure they could reach each other, the problem went away. So it might be something to do with the initial load from xcode, that isn’t bundled correctly? And once the ios device grabs a hold on Metro, then it grabs the newest correctly bundled code?

that doesn’t explain why it doesn’t bundle when built with archive from xcode