Skip to content

Android release builds crash on launch: react-native-shiki-engine resolves fbjni:+ to 0.8.1 #13710

Description

@bompus

Fresh Android builds of the mobile app now exit immediately on launch. logcat:

UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__cxa_init_primary_exception"
referenced by ".../base.apk!/lib/arm64-v8a/libfbjni.so"
  at com.facebook.react.internal.featureflags.ReactNativeFeatureFlagsCxxInterop.<clinit>
  at com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
  at ...MainApplication.onCreate(MainApplication.kt:43)

react-native-shiki-engine@0.3.12 declares implementation "com.facebook.fbjni:fbjni:+". fbjni 0.8.1 was published to Maven Central on 2026-09-25, so Gradle resolves the conflict with RN's fbjni:0.7.0 up to 0.8.1 (gradlew :app:dependencyInsight --dependency com.facebook.fbjni:fbjni). That libfbjni.so is built with the NDK 28 toolchain (clang 19). RN 0.86 builds with NDK 27.1 and packages that libc++_shared.so, which lacks the symbol.

Builds with fbjni 0.7.0 already in the Gradle cache may not reproduce this.

Workaround: force RN's version in android/build.gradle:

allprojects {
  configurations.all {
    resolutionStrategy.force 'com.facebook.fbjni:fbjni:0.7.0'
  }
}

A permanent fix could apply this through the app's Expo config plugin, or pin the version in react-native-shiki-engine.

Seen on v0.0.43-nightly.20260925.2269 (4293433e), Pixel 11 Pro XL, arm64-v8a.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions