question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS Detox tests fail in Github actions CI with multiple workers - Exceeded timeout of 300000ms while handling jest-circus "setup" event

See original GitHub issue

What happened?

First reported with a comment on a separate issue: https://github.com/wix/Detox/issues/3342#issuecomment-1228850607

Running tests for iOS with 3 workers using the detox cli --workers leads to intermittent test failures. It seems to have something to do with the instantiation of new simulators to support the concurrent workers. When running only 1 worker, I am unable to reproduce this issue.

CI: Github Actions

As a workaround, I have created a simple test suite consisting of only 3 tests. These tests run with 3 workers so that Detox will create new simulator instances for them. This 3 tests usually fail with the timeout issue, however, when the actual test suite runs immediately after, it does not encounter the timeout issue. This leads me to believe that if the simulators have already been created, Detox bypasses this step, and bypasses the bug altogether.

Attached are the logs with trace logging enabled from when the errors occurred.

The command to run this step is as follows

 - name: Initialize Detox Tests
        id: detox-init
        continue-on-error: true
        run: yarn detox test --use-custom-logger false --loglevel warn --configuration ios.sim.gha --cleanup --workers 3 --runner-config e2e/InitCITests/config.json --keepLockFile true

What was the expected behaviour?

The jest-circus setup step would not timeout.

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version: 19.10.0 React Native version: 0.67.2 Node version: 14.18.1 Device model: iPhone 13 iOS version: 14.5 macOS version: 12 Xcode version: 13.4.1 Test-runner (select one): jest-circus

Detox logs

Detox logs

18_Initialize Detox Tests-1.txt

Device logs

Device logs
paste logs here!

More data, please!

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:3
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AdamTylercommented, Oct 28, 2022

I’m having this issue on GH Actions after updating the runner from macos-11 to macos-12.

It seems the simulator doesn’t boot fast enough since its the first use of it. I have maxWorkers at 1. bootstatus is run but doesn’t seem to report anything and eventually the timeout is fired and the tests don’t get assigned to a simulator:

Oct 28 15:53:59 detox[45848] DEBUG: [EXEC_CMD, #2] /usr/bin/xcrun simctl boot 0336474D-27B1-4220-8EC9-DD82EDEBC404 
Oct 28 15:53:59 detox[45848] DEBUG: [EXEC_TRY, #2] Booting device 0336474D-27B1-4220-8EC9-DD82EDEBC404...
Oct 28 15:54:02 detox[45848] TRACE: [EXEC_SUCCESS, #2] 
Oct 28 15:54:02 detox[45848] DEBUG: [EXEC_CMD, #3] /usr/bin/xcrun simctl bootstatus 0336474D-27B1-4220-8EC9-DD82EDEBC404
Oct 28 15:55:58 detox[45848] ERROR: Exceeded timeout of 120000ms while handling jest-circus "setup" event
Oct 28 15:56:09 detox[45848] INFO:  Signup (Phone) is assigned to undefined
1reaction
gabrieldonadelcommented, Oct 16, 2022

Can we reopen this @d4vidi ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS Detox tests fail in Github actions CI with multiple workers ...
iOS Detox tests fail in Github actions CI with multiple workers - Exceeded timeout of 300000ms while handling jest-circus "setup" event #2528.
Read more >
Exceeded timeout of 300000ms while handling jest-circus ...
The error message is Exceeded timeout of 300000ms while handling jest-circus "setup" event . What was the expected behaviour? Running detox test ......
Read more >
iOS Detox tests fail in Github actions CI with multiple workers ...
iOS Detox tests fail in Github actions CI with multiple workers - Exceeded timeout of 300000ms while handling jest-circus "setup" event iOS Detox...
Read more >
Publish 19.12.6 [ci skip] · wix/Detox@4ee1756 · GitHub
iOS Detox tests fail in Github actions CI with multiple workers - Exceeded timeout of 300000ms while handling jest-circus "setup" event #2350.
Read more >
App has not responded to the network requests below: (id ...
Unresponded network requests might result in timeout errors in Detox tests. macOS version: 10.15.6. Xcode version: 11.7 detox version : 17.8.3.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found