-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Did you test using the latest Detox?
- I have tested this issue on the latest Detox release and it still reproduces.
Did your test fail and you're not sure why?
- I have read the troubleshooting guide and it didn't help me.
What happened?
After upgrading to React Native 0.76.9, Detox tests on iOS consistently fail during device.launchApp() with a timeout error, indicating the app is stuck with pending work items on the main dispatch queue. The error suggests a synchronization issue, as Detox waits indefinitely for the app to become idle. Android tests run successfully, and the issue is specific to iOS. This behavior persists across multiple Detox versions (20.32+), Xcode versions (18.5), and iOS simulator versions (17.5, 18.5).
The error matches the pattern in several existing issues (e.g., #3949, #2569, #3051), but none provide a clear resolution for RN 0.76.9. The app launches in the simulator, but Detox times out, suggesting a blockage in the React Native bridge initialization or native tasks (e.g., animations, network calls, or splash screen).
What was the expected behaviour?
Detox should successfully launch the app, complete the test, mark it as passed, and exit cleanly without timing out.
Help us reproduce this issue!
Reproducible Demo
Repository: beijeco/detox-issue-repro
Public link: https://github.com/beijeco/detox-issue-repro
Contains minimal RN 0.76.9 + Detox setup + a simple test that exhibits the failure.
Installation & Reproduction Steps
git remote add origin [email protected]:beijeco/detox-issue-repro.git
cd SampleRN76ProjectTestDetox
pnpm install
pnpm e2e:build-ios-debug
pnpm e2e:test-ios-debug --debug-synchronization 1000
In what environment did this happen?
Detox version: 20.40.2 (also tested with all 20.32-40 versions)
React Native version: 0.76.9
Has Fabric enabled: no
Node version: >=18
Device model: iPhone 15/16 simulator
iOS version: 17.5, 18.5
macOS version: Sequoia 15.5
Xcode version: 18.5
Test-runner: jest
Detox logs
Detox logs
Device logs
Device logs
paste your device.log here!
More data, please!
No response