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)
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 !!!
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.
@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