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.

Android insta-crash in RN 0.62.2 with hermes enabled

See original GitHub issue

Environment

System:
    OS: macOS 10.15.5
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
    Memory: 71.72 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.17.0 - ~/.nvm/versions/node/v12.17.0/bin/node
    Yarn: 1.22.4 - ~/.yarn/bin/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v12.17.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.2, 29.0.3
      System Images: android-28 | Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 11.5/11E608c - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_252 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0
    react-native: 0.62.2 => 0.62.2
  npmGlobalPackages:
    *react-native*: Not Found

Upgrading version

0.61.5 … to 0.62.2

Description

Android successfully builds in release mode with enableHermes set to true but then crashes instantly on startup with the error message:

com.facebook.jni.CppException: Could not get BatchedBridge, make sure your bundle is packaged correctly
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:1)
        at android.os.Looper.loop(Looper.java:214)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:8)
        at java.lang.Thread.run(Thread.java:919)

We currently have hermes activated with RN 0.61.5 and we can’t simply turn that option off in order to upgrade. Some things I’ve tried without success:

buildToolsVersion = "28.0.3"
minSdkVersion = 21
compileSdkVersion = 28
targetSdkVersion = 28

Reproducible demo

It’s a private github repo and I can’t share the source code, but if I can manage to reproduce it separately I’ll put it up here.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
southerneercommented, Sep 24, 2020

We just tried again with an upgrade to 0.63.2 and the same result. com.facebook.jni.CppException: Could not get BatchedBridge, make sure your bundle is packaged correctly

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Hermes
First, ensure you're using at least version 0.60.4 of React Native to enable Hermes on Android or 0.64 of React Native to enable...
Read more >
Recently Active 'react-native-hermes' Questions
I enabled Hermes Engine for both Android and iOS. ... I've enabled Hermes for my RN (0.61.4) app and followed RN docs instructions...
Read more >
Using Hermes in React Native
Add Hermes, an open-source JavaScript engine, to your React Native application ... Using Hermes in React Native; Enabling Hermes on Android ...
Read more >
React Native App - Automatic Setup
Android - start the Flipper Desktop application and start your project using ... Call FlipperConfiguration.enabled with a specific version in ios/Podfile ...
Read more >
React Native Android Staging Build Crashes On Startup
Automatic React Native crash reporting with Bugsnag helps you detect both native. ... App is crashing when I enable Hermes in android/app/build.gradle.
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