question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:9
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

20reactions
piaskowykcommented, Aug 24, 2021

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.

19reactions
BooYeucommented, Sep 1, 2021

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 !!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Could not get BatchedBridge, make sure your bundle is ...
"Could not get BatchedBridge, make sure your bundle is packaged correctly" since react-native 0.65 using Release schema #32028.
Read more >
error "Could not get BatchedBridge, make sure your bundle is ...
I ran manually the following command which the debug build command should have created ideally. node node_modules/react-native/local-cli/cli.js ...
Read more >
error "Could not get BatchedBridge, make sure your bundle is ...
Android : error " Could not get BatchedBridge, make sure your bundle is packaged properly " on start of app [ Beautify Your...
Read more >
ios Could not get BatchedBridge, make sure your bundle is ...
iOS : ios Could not get BatchedBridge, make sure your bundle is packaged properly [ Beautify Your Computer ...
Read more >
types/react-native/index.d.ts - UNPKG
288, * another native view, this will give you the absolute coordinates. If. 289, * successful, the callback will be called with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found