Commit 45ceacc
Use Hermes V1 by default (#56476)
Summary:
The recent introduction of the `IRuntime` JSI interface moved `ScopeState` from `Runtime` to `IRuntime`, changing the C++ ABI (mangled symbol names). The Android build was still consuming a legacy Hermes nightly (`hermes-compiler@nightly`) that was built against the old JSI headers, causing an `UnsatisfiedLinkError` crash at startup:
```
dlopen failed: cannot locate symbol "_ZN8facebook3jsi7Runtime8popScopeEPNS1_10ScopeStateE" referenced by "libhermesvm.so"
```
This PR aligns Android with how iOS already handles Hermes V1:
1. **`scripts/try-set-nightly-hermes-compiler.js`** — The `yarn install` preinstall hook now installs `hermes-compiler@latest-v1` instead of `hermes-compiler@nightly`. This is the same npm dist-tag that iOS uses in `scripts/ios-prebuild/hermes.js`.
2. **`build.gradle.kts`** — When `hermesV1Enabled=true`, the Hermes version from `package.json` is used as-is (no `-SNAPSHOT` suffix), since V1 stable releases are published as regular Maven artifacts, not snapshots.
3. **`version.properties`** — Bumps `HERMES_V1_VERSION_NAME` from `250829098.0.11` to `250829098.0.12` for release builds and iOS podspec.
## Changelog:
[ANDROID] [FIXED] - Use Hermes V1 stable release instead of legacy nightly to fix startup crash caused by JSI ABI mismatch
Pull Request resolved: #56476
Test Plan:
- Run `yarn install` from the repo root and verify `hermes-compiler` in `packages/react-native/package.json` is set to the `latest-v1` version (currently `250829098.0.12`)
- Run `yarn android` from `packages/rn-tester` and verify the app launches without crashing
- Verify CI `build_android` job passes
Reviewed By: javache
Differential Revision: D101247487
Pulled By: cipolleschi
fbshipit-source-id: c006e76969bb1bc27a9305ea97d5cff4b504ff1f1 parent 089276a commit 45ceacc
3 files changed
Lines changed: 13 additions & 5 deletions
File tree
- packages/react-native/sdks/hermes-engine
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
141 | 149 | | |
142 | 150 | | |
143 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments