Repository navigation
fix(install): warn when dependencies come from a bun other than .bun-version - #8618
saddlepaddle wants to merge 1 commit into
Conversation
…version A cloud box keeps the bun its image was built with: bun is installed in the image only, and nightly bundle updates do not replace it. A box from an image built before 2026-10-03 still runs bun 1.3.14. That bun names the node_modules/.bun store entries of @expo/dom-webview, @expo/log-box and expo-symbols differently (+74e171d88a660d73 instead of +6dc057f194158d3d), and the mobile runtime version is a fingerprint of those paths. So eas-dev.sh found no build with that fingerprint, started a new one, and the build failed at "Configure expo-updates". The install now says so, and says how to recover.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
[Low impact] The PR appears safe to merge; the new check warns without stopping installation. SummaryAdds a warning when the Bun used during installation differs from
Reviews (1) · Last reviewed commit: "fix(install): warn when dependencies com..." · Reviewed by Greptile |
- Pass disableAutoLaunch=1&disableFab=1 on every dev-client load, so no dev menu opens at launch and no gear covers the toolbar (replaces #8616). - Keep egress and Metro logs and PIDs in .tmp/eas-dev/ of the checkout, and kill a PID only when it is still an egress client, so two checkouts no longer stop each other's tunnel. - On macOS, find a client's cwd with lsof instead of matching every client. - Confirm a load from the Metro log only when this script started Metro. - Treat the tunnel as healthy only when its last state is "connected". - Refuse the fingerprint lookup when bun differs from .bun-version, instead of starting a build that fails (the root cause behind #8618). - Exit when Metro does not start; reject --new with --reload.
) * fix(mobile): make eas-dev.sh survive new sessions and first loads --new used to keep the egress client of the old session, so the app could not reach Metro. The script now records the client it starts, replaces it whenever a session starts or the client is not connected to the current session, and keeps a healthy one on reuse. After the tunnel connects, it loads the app through the dev-client URL and waits for a new "iOS Bundled" line in the Metro log, three tries. --reload does only that, so agents never need agent-device open Superset. simctl is out of reach, so on a new session the script opens the keyboard once in Settings and dismisses the slide-to-type intro. Docs: how to reload and switch sessions, and that SwiftUI menu items need coordinate taps. * fix(mobile): eas-dev.sh hides dev overlays and keeps state per checkout - Pass disableAutoLaunch=1&disableFab=1 on every dev-client load, so no dev menu opens at launch and no gear covers the toolbar (replaces #8616). - Keep egress and Metro logs and PIDs in .tmp/eas-dev/ of the checkout, and kill a PID only when it is still an egress client, so two checkouts no longer stop each other's tunnel. - On macOS, find a client's cwd with lsof instead of matching every client. - Confirm a load from the Metro log only when this script started Metro. - Treat the tunnel as healthy only when its last state is "connected". - Refuse the fingerprint lookup when bun differs from .bun-version, instead of starting a build that fails (the root cause behind #8618). - Exit when Metro does not start; reject --new with --reload. * fix(mobile): eas-dev.sh matches only the exact connected line * fix(mobile): eas-dev.sh touches only egress clients in this checkout * fix(mobile): eas-dev.sh compares physical paths to find its egress clients
|
Closing: the warning reported the symptom but left the cause. Workspaces made before the Bun 1.4.2 pin (#8101, Oct 3) keep the image's Bun 1.3.14, because bundle updates never upgrade it. The image already installs the version in |
Where the cause is: the root cause is outside
apps/mobile. It is the version of bun that installs the dependencies on a cloud box. This PR changes root install config (scripts/postinstall.sh).fingerprint.config.jsandeas.jsonstay unchanged: they are already correct.Problem
A cloud sandbox computed a different
development-simulatorfingerprint than EAS.eas-dev.shfound no matching build, started a ~15 min build, and that build failed at "Configure expo-updates". The workaround wasMOBILE_EAS_BUILD_ID.Cause
The "Configure expo-updates" log of the failed builds
f8ebea6aandfbc879f6(commit035965bc, 2026-10-17) gives the fingerprint diff. Only three autolinked sources differ, and only in the bun store suffix:@expo/dom-webview@57.0.1/ios+74e171d88a660d73+6dc057f194158d3d@expo/log-box@57.0.4+74e171d88a660d73+6dc057f194158d3dexpo-symbols@57.0.3/ios+945b7335f0d7483f+5d9a54ca60cce305The
expoAutolinkingConfig:iospodspec dirs that contain these paths differ too.+74e171d…is bun 1.3.14's name for these entries. Buildccee2940(2026-10-08) shows the same pair the other way round: EAS was still on its default bun 1.3.14 then, and the submitting machine was on 1.4.2. #8313 pinned EAS to 1.4.2. On 10-17 the sandbox was on 1.3.14:.bun-versionwas 1.3.14 until e1347c7 (2026-10-03).packages/sandbox/src/image.tsinstalls bun only in the image (npm install -g bun@${BUN_VERSION}). The nightly bundle updates do not install bun, so a box made from an older image keeps 1.3.14.Reproduced at this branch's HEAD from a clean
bun install --frozen-lockfilein a scratch worktree, using the same commandeas-dev.shruns (eas fingerprint:generate -p ios --build-profile development-simulator, withoutEXPO_PUBLIC_*):01c85500dc2cfe18731792da3b7498af320743a6: exactly the "local machine" runtime of the failed builds9245768a665fbc158a16bdc248da6532799346c8: what EAS resolved for those buildsbun installwith 1.4.2 on top9245768a…: a reinstall with the right bun is enough to recover--os/--cpuoverrides (linux-arm64, darwin-arm64), non-frozen and--productioninstalls all give6dc057…, so platform and install flags do not cause it.Fix
scripts/postinstall.shnow warns on stderr whenbun --versiondiffers from.bun-version, and tells you how to recover (install the pinned bun, thenrm -rf node_modules && bun install). It only warns, because developers on a newer bun can still install. Nothing is ignored in the fingerprint: the store path is the only input that differs, and fingerprint config cannot rewrite a path without skipping all autolinked native modules.A box that is already on the right bun needs no change. This box (image of 2026-10-15, bun 1.4.2) already gets the EAS hash.
Verification
19cecc9cand on EAS:9245768a665fbc158a16bdc248da6532799346c8.47f68dac(commitc1d34872, the latest finisheddevelopment-simulatorbuild) records9245768a665fbc158a16bdc248da6532799346c8.9245768a…for both builds of035965bc, the commit the sandbox failed on.apps/mobile/scripts/eas-dev.shwith noMOBILE_EAS_BUILD_ID: it installed47f68dacwithout starting a build, and the app loaded from Metro (signed-in home screen). I stopped the session afterwards.bun test apps/mobile/eas-runtime-version.test.ts: 3 pass.Note: the dev menu shows runtime
0462196c…. That is Metro's manifest, which is computed with the dev.envloaded. It is not the build's runtime, and the build lookup does not use it.Follow-ups (other owners)
packages/sandbox: install the pinned bun from the bundle, not only the image, so older boxes are upgraded.apps/mobile/scripts/eas-dev.sh: before the fingerprint lookup, stop whenbun --versiondiffers from.bun-version, instead of starting a build that will fail.Summary by cubic
Fixes a silent mismatch between the bun version used during install and the one pinned in
.bun-version, which causedapps/mobileto compute a different development-simulator fingerprint than EAS, makingeas-dev.shstart a build that failed at "Configure expo-updates". The root cause is that cloud boxes keep the bun from their image, which can be older.scripts/postinstall.shnow warns on stderr when bun version differs and explains how to recover (install the pinned bun, thenrm -rf node_modules && bun install). It only warns; the install still succeeds.Written for commit 75bb608. Summary will update on new commits.
Summary by CodeRabbit