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

Description

I created a project from react-native template version 0.65, I built It’s ok, but then when added reanimated2 and 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.

+ (void)runRunLoop
{
  @autoreleasepool {
    RCT_PROFILE_BEGIN_EVENT(RCTProfileTagAlways, @"-[RCTCxxBridge runJSRunLoop] setup", nil);

    // copy thread name to pthread name
    pthread_setname_np([NSThread currentThread].name.UTF8String);

    // Set up a dummy runloop source to avoid spinning
    CFRunLoopSourceContext noSpinCtx = {0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
    CFRunLoopSourceRef noSpinSource = CFRunLoopSourceCreate(NULL, 0, &noSpinCtx);
    CFRunLoopAddSource(CFRunLoopGetCurrent(), noSpinSource, kCFRunLoopDefaultMode);
    CFRelease(noSpinSource);

    RCT_PROFILE_END_EVENT(RCTProfileTagAlways, @"");

    // run the run loop
    while (kCFRunLoopRunStopped !=
           CFRunLoopRunInMode( com.facebook.react.JavaScript (9): "Could not get BatchedBridge, make sure your bundle is packaged correctly"
               kCFRunLoopDefaultMode, ((NSDate *)[NSDate distantFuture]).timeIntervalSinceReferenceDate, NO)) {
      RCTAssert(NO, @"not reached assertion"); // runloop spun. that's bad.
    }
  }
}

Expected behavior

For react-native-reanimated 2.2.0 I expect react-native 0.65.0 to compile. I expect the app not to crash.

Actual behavior & steps to reproduce

After added reanimated2, it crashed.

Package versions

  • React Native: 0.65.0
  • React Native Reanimated: 2.2.0
  • NodeJS: latest
  • Xcode: Latest
  • Java & Gradle: Latest

Affected platforms

  • Android
  • iOS
  • Web

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 9
  • Comments: 17 (4 by maintainers)

Most upvoted comments

Hey @truongngodang! The 2.2.0 version doesn’t support RN65 yet. You should use 2.3.0-alpha.2 with support for RN65 or you can wait for a patch for 2.2.1 with support for RN65 - we want to release it this week.

Hey @truongngodang! The 2.2.0 version doesn’t support RN65 yet. You should use 2.3.0-alpha.2 with support for RN65 or you can wait for a patch for 2.2.1 with support for RN65 - we want to release it this week.

I keep waiting for it, really really want to know when can I use 2.2.1. Thank you very much !!!

This issue has wasted my whole week! Everything was fine until I decided to include ‘react-native-drawer’ to my RN app. This required react-native-reanimated. But it won’t work at all with the existing stable version 2.2.0. And the most stupid thing is many people are suggesting to follow the steps in the link https://docs.swmansion.com/react-native-reanimated/docs/next/installation which gives you a bunch of useless step which results NOTHING. And after few days of banging my head on the wall with this stupid (and unavoidable) library, they’re telling it’ll take few more days to fix. But my question is… Why can’t I run ‘react-native-drawer’ with the previous versions of reanimated?

You have to downgrade your React native version to make it work.

And by the way, it’s your decision (and also your bad practice) if you don’t read the dependencies and issues before installing libraries. Calm down and be respectful.

Hey @truongngodang 👋 The version 2.2.0 doesn’t support react-native@0.65. If you want to use Reanimated with RN65 you should update it to 2.2.1 or 2.3.0-alpha.2+

We have just released 2.2.1 🎉

@nazishaslam07 The library is actually amazing, they have used TurboModules and JSI which is going to be standard practice in React Native and speeds things up quite dramatically and leads to a much cleaner API.

If you have the issue “Could not get BatchedBridge…” after upgrading to RN 0.65 and you have Hermies in iOS enabled try disabling it for now. This was my issue and has me running again until developers can fix things with the RN upgrade.

You could also down grade to 0.64.2 until other third party packages are updated, this is often the trouble with being an early adopter.

Ok, thanks for the info, so I reopen.

Hey @truongngodang! The 2.2.0 version doesn’t support RN65 yet. You should use 2.3.0-alpha.2 with support for RN65 or you can wait for a patch for 2.2.1 with support for RN65 - we want to release it this week.

@truongngodang If you could shed any news about the upcoming patch? Hate to ask this… but it’s kind of important to planning tasks in our project… Thank you!

this needs quick love