Repository navigation
ci(ios): capture diagnostics when a Detox e2e test fails - #4418
Merged
Merged
Conversation
mfazekas
force-pushed
the
ci/ios-detox-diagnostics
branch
2 times, most recently
from
October 27, 2026 13:24
3da3008 to
ee82e79
Compare
mfazekas
force-pushed
the
ci/ios-detox-diagnostics
branch
from
October 27, 2026 13:48
ee82e79 to
40080b7
Compare
mfazekas
force-pushed
the
ci/ios-detox-diagnostics
branch
from
October 27, 2026 14:19
40080b7 to
96b3018
Compare
When a test or hook fails, capture host processes, memory, the booted simulators and a connect/TLS probe to api.mapbox.com while the app is still in the failing state. After a failed run, also collect crash reports and the simulator and CoreSimulator logs, capture the view hierarchy on failure, and keep the artifacts per attempt for 14 days.
mfazekas
force-pushed
the
ci/ios-detox-diagnostics
branch
from
October 27, 2026 14:49
96b3018 to
0da3a23
Compare
mfazekas
marked this pull request as ready for review
October 27, 2026 15:22
4 of 8 tasks
This branch was previously deployed
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.
Description
The iOS Detox job has failed 5 times out of 94 runs since e2e tests were turned on in #4379, and every PR retry passed. Two kinds of failure showed up in the existing artifacts:
xcrun simctl get_app_containercall insidelaunchApptook 2 min 4 s. That ran past the 120 sbeforeAlltimeout. The "busy main queue / bundle load / localhost:8081/status" messages that followed came fromafterEach'sreloadReactNativeracing the launch that was still running. Metro isn't used: the Debug build embeds the bundle, and the 8081/8097 probes are refused within milliseconds.streets-v12style request never got a connection to api.mapbox.com and timed out after 30 s three times in a row, with nothing sent. In the other runs the runner was just very slow: TLS connects took 7–8 s, or the first Mapbox request started 90 s into the test.Both look like runner or network conditions rather than an app bug, so this PR adds no fix, only diagnostics for the next failure:
example/e2e/environment.jswraps Detox's Jest environment. On CI, when a test or hook fails, it capturesps(shows a stuck simctl/applesimutils call and any CPU hogs),vm_stat, the booted simulators, and a curl connect/TLS timing to api.mapbox.com, while the app is still in the failing state. It stops after 3 captures per file and does nothing on the passing path.--capture-view-hierarchy(failures only).detox-artifacts-attempt-<n>artifact underdiagnostics/, kept for 14 days, next to Detox's existing logs, screenshots and device logs.I checked this with a temporary failing assertion (since removed); see run 40520078616. Sampling the app's main thread with
sample(with sudo) attached but captured no stacks for the simulator process, so it isn't included.Checklist
CONTRIBUTING.mdyarn generatein the root folder/exampleapp./example)