Draft
Harden React Native iOS Detox CI against simulator shell crashes#29626
Conversation
Copilot
AI
changed the title
[WIP] Fix flaky iOS E2E tests in React Native CI workflow
Harden React Native iOS Detox CI against simulator shell crashes
Jul 8, 2026
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 React Native iOS E2E job is intermittently failing on GitHub-hosted macOS runners due to iOS Simulator instability during Detox teardown/termination. This change makes the workflow more fault-tolerant by isolating build/test phases and resetting simulator state before test execution.
detox build --configuration ios.sim.releasedetox test ... --configuration ios.sim.releasereact_native_ci_ios_e2e_tests:xcrun simctl shutdown all || truexcrun simctl erase all || truekillall Simulator || truekillall com.apple.CoreSimulator.CoreSimulatorService || true--cleanupto the Detox test invocation to enforce post-test app/simulator cleanup..github/workflows/react_native.yml.Motivation and Context
The failing job pattern shows simulator process instability (
failed to terminate ...,system shell probably crashed) rather than deterministic test logic failures. Resetting simulator state before Detox test execution and enforcing cleanup reduces stale/broken simulator carryover and lowers iOS E2E flake rate in CI.