Repository navigation
ci(ios): embed the JS bundle for Detox instead of running Metro - #753
Merged
Merged
Conversation
master's Detox failed on the first app launch: the app started but the home screen never showed within 240 s, while the 4 later launches worked. Metro served 4 bundle requests for 5 launches: the first launch never asked for one. A Debug app only uses Metro if RCTBundleURLProvider's /status check (6 s timeout) passes, and on the first launch on a freshly booted simulator it didn't, so the app fell back to a main.jsbundle that Debug builds don't contain. This is the first-launch timeout seen across #744/#746/#748/#749/#752. Build with FORCE_BUNDLING=1 (react-native-xcode.sh then embeds the dev bundle) and drop Metro: with nothing on :8081 the check fails at once and every launch loads the embedded bundle. It also removes Metro's workers from the build's CPU. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Image screen's JPEG capture differs from the reference by 0.112% of pixels (threshold 0.1%), scattered compression noise in the photo's textured areas: the asset now loads from the app bundle instead of over HTTP from Metro. From this branch's CI run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
master's CI is red after #748/#752: iOS Detox fails on the very first app launch. The app starts, but the home screen never appears, even after 240 s. The next 4 launches work in about 30 s each.Cause: the uploaded
metro.logshows 4 bundle requests for 5 launches: the first launch never asked Metro for its bundle. A Debug app only uses Metro ifRCTBundleURLProvider's/statuscheck (6 s timeout,isPackagerRunning) passes. Otherwise it falls back tomain.jsbundle, which a Debug build doesn't contain, so it has no JS. On the first launch on a freshly booted simulator, that check fails. This is the intermittent first-launch timeout seen on #744, #746, #748, #749 and #752 (#752's prefetch-URL fix wasn't the cause).Fix: build with
FORCE_BUNDLING=1, soreact-native-xcode.shembeds the dev bundle (same JS,__DEV__), and drop Metro from the job. With nothing listening on :8081, the check fails immediately and every launch loads the embedded bundle, deterministically. Bonus: Metro's workers no longer compete with the build for CPU. Local development is unchanged (Metro as before).🤖 Generated with Claude Code