Skip to content

[Due for payment 2026-09-02] [Android] Build fails with "CMake '3.30.5' was not found" when react-native is built from source #98563

Closed
1 of 1 issue completed

Description

@war-in

Version Number: 9.4.53-3
Reproducible in staging?: Yes (staging deploy build failed)
Reproducible in production?: N/A — CI build failure, never reached production
If this was caught during regression testing, add the test name, ID and link from BrowserStack: N/A
Email or phone of affected tester (no customers): N/A
Logs: https://github.com/Expensify/App/actions/runs/31680429984/job/94384592071
Expensify/Expensify Issue URL:
Issue reported by: internal
Slack conversation (hyperlinked to channel name):

Action Performed:

  1. Merge a PR that adds or modifies a React Native patch under patches/react-native/ (here: #98507, which added react-native+0.86.0+037+fix-stale-font-scale.patch).
  2. Cherry-pick it to staging, triggering the Deploy code to staging or production workflow.
  3. Watch the Build Android HybridApp / Build Android app job.

Expected Result:

The Android build completes. When no prebuilt React Native artifact matches the current patches hash, the job falls back to compiling React Native from source and that fallback succeeds.

Actual Result:

The Android build failed:

[PatchedArtifacts] No matching artifacts version found for react-hybrid. Building react-native from source.
...
Execution failed for task ':react-native:packages:react-native:ReactAndroid:hermes-engine:configureCMakeMinSizeRel[arm64-v8a]'.
> [CXX1300] CMake '3.30.5' was not found in SDK, PATH, or by cmake.dir property.

Two independent problems combined.

1. The source-build fallback raced artifact publication. The patch changed the patches hash, so no published react-hybrid:react-android artifact matched and Gradle fell back to building React Native from source. com.expensify.react-hybrid.react-android:0.86.0-2 was only published at 08:29:59, while the staging deploy started at 08:04:08 and the Android job failed at 08:10:52.

2. The source-build fallback is not reliable. CMake was never installed on the runner because Gradle skipped the task that installs it:

> Task :...:ReactAndroid:hermes-engine:installCMake UP-TO-DATE
> Task :...:ReactAndroid:hermes-engine:downloadHermes UP-TO-DATE
> Task :...:ReactAndroid:hermes-engine:configureBuildForHermes UP-TO-DATE
> Task :...:hermes-engine:configureCMakeMinSizeRel[arm64-v8a] FAILED

installCMake (ReactAndroid/hermes-engine/build.gradle.kts) runs sdkmanager --install cmake;<version>, i.e. its only effect is on the Android SDK at $ANDROID_HOME/cmake/<version>. It declares no real outputs (CustomExecTask only has optional, unset @OutputFile properties), so Gradle's up-to-date check cannot see that CMake is missing.

The stale state reaches the job via the cache: Mobile-Expensify/Android/settings.gradle uses includeBuild("$newDotNodeModules/react-native"), so the included build's task execution history lives at node_modules/react-native/.gradle — inside the node_modules Blacksmith sticky disk shared across jobs. The Android SDK is not cached. A job that compiled React Native from source committed its history to that disk; a later job on a fresh runner restored it and trusted it. All 65 up-to-date tasks in the failing build belong to node_modules-resident projects (41 react-native, 18 expo-gradle-plugin, 13 gradle-plugin, 5 expo-module-gradle-plugin), none to the app module.

This makes the failure state-dependent, not deterministic. The adhoc build for the same patch (run 31649688731) also compiled React Native from source and passed, because its Gradle state was cold — 1723 actionable tasks: 1723 executed, zero up-to-date — so installCMake actually ran and downloaded cmake-3.30.5-linux.zip.

Workaround:

Re-run the failed job once the matching artifacts have been published (~30 min after merge to main), so the build downloads prebuilt artifacts instead of compiling React Native from source. Blocks staging builds and any further cherry-picks until then.

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

N/A — CI build failure, see linked workflow logs.

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @collectioneur

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 13, 2026
  2. changed the title [-][Android] Build fails with "CMake '3.30.5' was not found" when react-native is built from source[/-] [+][Due for payment 2026-08-28] [Android] Build fails with "CMake '3.30.5' was not found" when react-native is built from source[/+] on Aug 21, 2026
  3. melvin-bot commented on Aug 21, 2026

    @melvin-bot

    @mountiny @collectioneur

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.57-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-08-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]

  4. added and removed on Aug 21, 2026
  5. changed the title [-][Due for payment 2026-08-28] [Android] Build fails with "CMake '3.30.5' was not found" when react-native is built from source[/-] [+][Android] Build fails with "CMake '3.30.5' was not found" when react-native is built from source[/+] on Aug 21, 2026
  6. mountiny commented on Aug 21, 2026

    @mountiny
    Contributor

    We need to follow up still

  7. added
    ReviewingHas a PR in review
    and removed
    ReviewingHas a PR in review
    on Aug 25, 2026
  8. changed the title [-][Android] Build fails with "CMake '3.30.5' was not found" when react-native is built from source[/-] [+][Due for payment 2026-09-02] [Android] Build fails with "CMake '3.30.5' was not found" when react-native is built from source[/+] on Aug 26, 2026
  9. melvin-bot commented on Aug 26, 2026

    @melvin-bot

    @mountiny @collectioneur

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.61-4 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-09-02. 🎊

    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]

  10. mountiny commented on Aug 30, 2026

    @mountiny
    Contributor

    @collectioneur before closing, can you please confirm this issue has also been resolved by the sticky disks change?

  11. collectioneur commented on Aug 31, 2026

    @collectioneur
    Contributor

    I took a look at the newer sticky disks (the ones created after the new seeding strategy), it looks like they only contain node_modules (with minor changes between versions) and no cache. Since the issue shouldn't happen again, I believe it's safe to close this out 😄

    For reference, I've left the workflow links below, where we can look up what's inside the sticky disks:
    https://github.com/Expensify/App/actions/runs/33382745170/job/99458545645?pr=99893
    https://github.com/Expensify/App/actions/runs/33382745170/job/99458545209?pr=99893
    https://github.com/Expensify/App/actions/runs/33382745170/job/99458545551?pr=99893
    https://github.com/Expensify/App/actions/runs/33382745170/job/99458545489?pr=99893

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions