Skip to content

Use Hermes V1 by default (#56476)#56476

Closed
cipolleschi wants to merge 1 commit intomainfrom
cipolleschi/use-hermes-v1-by-default
Closed

Use Hermes V1 by default (#56476)#56476
cipolleschi wants to merge 1 commit intomainfrom
cipolleschi/use-hermes-v1-by-default

Conversation

@cipolleschi
Copy link
Copy Markdown
Contributor

@cipolleschi cipolleschi commented Apr 16, 2026

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

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

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 16, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 16, 2026

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D101247487.

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


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
@meta-codesync meta-codesync Bot changed the title [Android] Use Hermes V1 by default Use Hermes V1 by default (#56476) Apr 22, 2026
@meta-codesync meta-codesync Bot force-pushed the cipolleschi/use-hermes-v1-by-default branch from 19cba09 to c784ea8 Compare April 22, 2026 09:03
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 22, 2026

@cipolleschi has exported this pull request. If you are a Meta employee, you can view the originating Diff in D101247487.

@meta-codesync meta-codesync Bot closed this in 45ceacc Apr 22, 2026
@facebook-github-tools facebook-github-tools Bot added the Merged This PR has been merged. label Apr 22, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 22, 2026

@cipolleschi merged this pull request in 45ceacc.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @cipolleschi in 45ceacc

When will my fix make it into a release? | How to file a pick request?

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants