Skip to content

[Due for payment 2026-11-02] Fix Hermes version mismatch between prebuilt iOS React Native artifacts and the app build #100503

Open

Description

@MelvinBot

Problem

A Hermes version mismatch was found between the prebuilt iOS React Native artifacts we publish and the app that consumes them. Discovered while working on Expensify/App#86437 (Slack thread).

When the Hermes the artifacts were built against differs from the Hermes the app links, we get a mismatch at build/run time rather than a clean "no matching artifact, build from source" fallback.

Starting hypothesis (needs confirmation)

Two things look like they could produce this, both in Expensify/App:

  1. The Hermes V1 flag is only set on the consumer side. ios/Podfile:90 sets ENV['RCT_HERMES_V1_ENABLED'] = '1', and that is the only place in the repo it is set. The publishing workflow only passes HERMES_VERSION when it sets up the prebuild workspace (.github/workflows/publishReactNativeiOSArtifacts.yml:65-77) and never sets RCT_HERMES_V1_ENABLED. So artifacts may be built without Hermes V1 while the app is built with it.

  2. The Hermes configuration is not part of the artifact resolution key. Artifacts are matched on react-native version plus a hash of our patches (scripts/artifacts-utils/lib/artifactsResolver.ts). Nothing about Hermes (version or the V1 flag) is in the key, so an artifact built against a different Hermes still resolves as a match instead of falling back to a source build.

This is a code-reading hypothesis, not a verified root cause — the investigation should confirm it against a real failing build before fixing.

Solution

  1. Confirm the actual mismatch — which Hermes the published artifacts were built against versus which one the app links.
  2. Make the publish workflow and the consumer build agree on the Hermes configuration (including RCT_HERMES_V1_ENABLED).
  3. Include the Hermes identity in the artifact resolution key so a mismatched artifact can never resolve as a match, and the build falls back to source instead of failing.

Context

Follow-up to Expensify/App#86437. Related earlier note on Hermes V1 versus RN core prebuilds: comment.

Issue OwnerCurrent Issue Owner: @aimane-chnaif

Activity

  1. self-assigned this
    on Sep 7, 2026
  2. mateuuszzzzz commented on Sep 9, 2026

    @mateuuszzzzz
    Contributor

    PR was merged, we just need to trigger artifacts build with this new change

  3. roryabraham commented on Sep 9, 2026

    @roryabraham
    Contributor

    @mateuuszzzzz doesn't it happen on merge?

  4. melvin-bot commented on Sep 10, 2026

    @melvin-bot

    @roryabraham @mateuuszzzzz

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.75-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

  5. mateuuszzzzz commented on Sep 11, 2026

    @mateuuszzzzz
    Contributor

    @roryabraham I have very hazy memories of how it used to work in the past. But I think it does not trigger build in case of workflow edits. Let me know if you prefer it to work this way and I'll raise a PR with a fix of current behavior 👍

  6. 17 remaining items

  7. mateuuszzzzz commented on Oct 20, 2026

    @mateuuszzzzz
    Contributor

    I think both PRs are in final shape. But I would like to merge #103149 first and then slightly adjust #103317 based on changes from the first one. We also need to build artifacts for #103317 before merging it.

  8. roryabraham commented on Oct 20, 2026

    @roryabraham
    Contributor

    #103149 merged. Let me know when #103317 is ready to have artifacts built.

  9. changed the title [-]Fix Hermes version mismatch between prebuilt iOS React Native artifacts and the app build[/-] [+][Due for payment 2026-10-28] Fix Hermes version mismatch between prebuilt iOS React Native artifacts and the app build[/+] on Oct 21, 2026
  10. melvin-bot commented on Oct 21, 2026

    @melvin-bot

    @aimane-chnaif

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.15-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-10-28. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  11. mateuuszzzzz commented on Oct 22, 2026

    @mateuuszzzzz
    Contributor

    24. #103149 merged. Let me know when #103317 is ready to have artifacts built.

    @roryabraham PR is ready to build artifacts from it. Before merging let's double check that POM file includes hermes version

  12. changed the title [-][Due for payment 2026-10-28] Fix Hermes version mismatch between prebuilt iOS React Native artifacts and the app build[/-] [+][Due for payment 2026-11-02] Fix Hermes version mismatch between prebuilt iOS React Native artifacts and the app build[/+] on Oct 26, 2026
  13. melvin-bot commented on Oct 26, 2026

    @melvin-bot

    @aimane-chnaif

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.20-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-11-02. 🎊

  14. melvin-bot commented on Oct 26, 2026

    @melvin-bot

    @aimane-chnaif Eep! 4 days overdue now. Issues have feelings too...

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions