Skip to content

Commit 7b95167

Browse files
kraenhansenclaude
andcommitted
vendor-hermes: advance the pin past Hermes' JSI_UNSTABLE default flip
The Android test app crashed on startup, in `NodeApiHostPackage.<init>`: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZTIN8facebook3jsi10SerializedE" referenced by ".../libhermesvm.so" com.facebook.soloader.SoLoaderDSONotFoundError: couldn't find DSO to load: libhermesvm.so That symbol is `typeinfo for facebook::jsi::Serialized`. JSI's `Serialized` / `ISerialization` APIs sit behind `#ifdef JSI_UNSTABLE`, and React Native never defines it when building the `libjsi.so` it ships in the ReactAndroid AAR. Our pinned Hermes still defaulted `JSI_UNSTABLE` to ON, so `hermesvm` compiled those APIs in and referenced symbols that nothing in the APK defines. Apple builds are unaffected because JSI is compiled into the `hermesvm` framework itself; on Android the two are separate shared libraries, and RN's hermes-engine build imports `libjsi.so` rather than packaging the copy Hermes builds for itself. facebook/hermes 5a795c9f8 ("Fix: JSI_UNSTABLE CMake flag should be OFF by default") is the immediate child of the previous pin, so this picks up the one-line fix and nothing else. Verified by rebuilding the release APK for x86_64: `libhermesvm.so` no longer references `jsi::Serialized`, and every undefined JSI symbol it does have is defined by a library shipped in the APK. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 84cf4cc commit 7b95167

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎packages/host/src/node/cli/hermes.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,16 @@ const HERMES_GIT_URL = "https://github.com/facebook/hermes.git";
3030
// framework hit "Undefined symbol: hermes_napi_create_env". We used to patch
3131
// the header ourselves after cloning; now that the fix is upstream at this pin,
3232
// no header patching is required.
33-
const HERMES_GIT_SHA = "efcf68e285865fd9d952070b08e751bcad63f25e";
33+
//
34+
// It also includes the immediately following commit, which flips Hermes'
35+
// `JSI_UNSTABLE` CMake flag back to OFF by default. With it ON, Hermes compiles
36+
// JSI's unstable `Serialized` / `ISerialization` APIs into `hermesvm`, but
37+
// React Native never defines `JSI_UNSTABLE` when building the `libjsi.so` it
38+
// ships in the ReactAndroid AAR. On Android the two are separate shared
39+
// libraries, so `libhermesvm.so` ended up with undefined references to
40+
// `facebook::jsi::Serialized` that nothing in the APK defined, and the app died
41+
// on startup with "cannot locate symbol _ZTIN8facebook3jsi10SerializedE".
42+
const HERMES_GIT_SHA = "5a795c9f880002c862c9254a26b57199819c97f7";
3443

3544
const platformOption = new Option(
3645
"--react-native-package <package-name>",

0 commit comments

Comments
 (0)