My tests only pass when I enable "debug with chrome"
See original GitHub issueWhat happened?
I have a very small test suite which used to run and pass. However, recently the tests have stopped passing. After considerable investigation I figured out that if I run the tests, wait for the app to load, trigger the shake gesture (open dev menu), and then tap “debug with chrome” the individual test will suddenly pass. I’ve disabled flipper, however that hasn’t changed anything.
Before I tap “debug with chrome”, I see messages over and over about a timer:
12:59:19.717 detox[76569] INFO: [APP_STATUS] The app is busy with the following tasks:
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
• 1 enqueued JavaScript timers:
- Timer #1:
+ JS timer ID: 786.
+ Duration: 0.05.
+ Is recurring: NO.
• Run loop "Main Run Loop" is awake.
I’m not sure how to figure out what is setting this timer, and I am further confused by the fact that connecting the chrome debugger suddenly allows the test to complete.
What was the expected behaviour?
The tests to pass without manually tapping “debug with chrome” for each test.
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?
- I have followed the instructions under Identifying which synchronization mechanism causes us to wait too much.
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version: 19.4.5 React Native version: 0.64.2 Node version: 14.18.0 Device model: iPhone 13 iOS version: 15.2 macOS version: 12.2.1 Xcode version: 13.2.1 Test-runner (select one): jest-circus
Detox logs
Detox logs
13:15:11.650 detox[77975] INFO: [AppleSimUtils.js] com.joinpapa.papapal launched. To watch simulator logs, run:
/usr/bin/xcrun simctl spawn D1990928-5772-4D8C-8385-CA0803CC5515 log stream --level debug --style compact --predicate 'process == "Papa Pal"'
13:15:11.652 detox[78405] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onLaunchApp({
bundleId: 'com.joinpapa.papapal',
deviceId: 'D1990928-5772-4D8C-8385-CA0803CC5515',
launchArgs: {
detoxServer: 'ws://localhost:64818',
detoxSessionId: '06d4ed5e-c1bf-efd1-f635-660ddcfaf35a',
detoxURLBlacklistRegex: ' \\("https://codepush.appcenter.ms","https://api.segment.io","https://*.googleapis.com"\\,"localhost:8081")',
DTXEnableVerboseSyncSystem: 'YES',
DTXEnableVerboseSyncResources: 'YES',
detoxDisableHierarchyDump: 'YES'
},
pid: 78405
})
13:15:12.460 detox[77975] DEBUG: [WSS_CONNECTION, #65094] registered a new connection.
13:15:12.905 detox[77975] TRACE: [WSS_GET_FROM, #65094] {"type":"login","params":{"sessionId":"06d4ed5e-c1bf-efd1-f635-660ddcfaf35a","role":"app"},"messageId":0}
13:15:12.906 detox[77975] TRACE: [WSS_SEND_TO, #app] {"type":"loginSuccess","params":{"testerConnected":true,"appConnected":true},"messageId":0}
13:15:12.907 detox[77975] TRACE: [SESSION_JOINED] app joined session 06d4ed5e-c1bf-efd1-f635-660ddcfaf35a
13:15:12.907 detox[77975] TRACE: [WSS_SEND_TO, #tester] {"type":"appConnected"}
13:15:12.908 detox[77975] TRACE: [WS_MESSAGE] {"type":"appConnected"}
13:15:12.911 detox[77975] TRACE: [WS_SEND] {"type":"isReady","params":{},"messageId":-1000}
13:15:12.912 detox[77975] TRACE: [WSS_GET_FROM, #tester] {"type":"isReady","params":{},"messageId":-1000}
13:15:12.913 detox[77975] TRACE: [WSS_SEND_TO, #app] {"type":"isReady","params":{},"messageId":-1000}
13:15:22.911 detox[77975] TRACE: [WS_SEND] {"type":"currentStatus","params":{},"messageId":1}
13:15:22.912 detox[77975] TRACE: [WSS_GET_FROM, #tester] {"type":"currentStatus","params":{},"messageId":1}
13:15:22.912 detox[77975] TRACE: [WSS_SEND_TO, #app] {"type":"currentStatus","params":{},"messageId":1}
13:15:22.914 detox[77975] TRACE: [WSS_GET_FROM, #app] {"params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":774,"duration":0.050000000000000003}]}}],"app_status":"busy"},"messageId":1},"messageId":1,"type":"currentStatusResult"}
13:15:22.914 detox[77975] TRACE: [WSS_SEND_TO, #tester] {"params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":774,"duration":0.05}]}}],"app_status":"busy"},"messageId":1},"messageId":1,"type":"currentStatusResult"}
13:15:22.915 detox[77975] TRACE: [WS_MESSAGE] {"params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":774,"duration":0.05}]}}],"app_status":"busy"},"messageId":1},"messageId":1,"type":"currentStatusResult"}
13:15:22.918 detox[77975] INFO: [APP_STATUS] The app is busy with the following tasks:
• Run loop "Main Run Loop" is awake.
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
• 1 enqueued JavaScript timers:
- Timer #1:
+ JS timer ID: 774.
+ Duration: 0.05.
+ Is recurring: NO.
13:15:32.920 detox[77975] TRACE: [WS_SEND] {"type":"currentStatus","params":{},"messageId":2}
13:15:32.920 detox[77975] TRACE: [WSS_GET_FROM, #tester] {"type":"currentStatus","params":{},"messageId":2}
13:15:32.920 detox[77975] TRACE: [WSS_SEND_TO, #app] {"type":"currentStatus","params":{},"messageId":2}
13:15:32.922 detox[77975] TRACE: [WSS_GET_FROM, #app] {"type":"currentStatusResult","messageId":2,"params":{"messageId":2,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":936,"duration":0.050000000000000003}]}}],"app_status":"busy"}}}
13:15:32.922 detox[77975] TRACE: [WSS_SEND_TO, #tester] {"type":"currentStatusResult","messageId":2,"params":{"messageId":2,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":936,"duration":0.05}]}}],"app_status":"busy"}}}
13:15:32.922 detox[77975] TRACE: [WS_MESSAGE] {"type":"currentStatusResult","messageId":2,"params":{"messageId":2,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":936,"duration":0.05}]}}],"app_status":"busy"}}}
13:15:32.922 detox[77975] INFO: [APP_STATUS] The app is busy with the following tasks:
• Run loop "Main Run Loop" is awake.
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
• 1 enqueued JavaScript timers:
- Timer #1:
+ JS timer ID: 936.
+ Duration: 0.05.
+ Is recurring: NO.
13:15:42.923 detox[77975] TRACE: [WS_SEND] {"type":"currentStatus","params":{},"messageId":3}
13:15:42.923 detox[77975] TRACE: [WSS_GET_FROM, #tester] {"type":"currentStatus","params":{},"messageId":3}
13:15:42.924 detox[77975] TRACE: [WSS_SEND_TO, #app] {"type":"currentStatus","params":{},"messageId":3}
13:15:42.925 detox[77975] TRACE: [WSS_GET_FROM, #app] {"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":1114,"duration":0.050000000000000003}]}}],"app_status":"busy"},"messageId":3},"messageId":3}
13:15:42.925 detox[77975] TRACE: [WSS_SEND_TO, #tester] {"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":1114,"duration":0.05}]}}],"app_status":"busy"},"messageId":3},"messageId":3}
13:15:42.925 detox[77975] TRACE: [WS_MESSAGE] {"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":1114,"duration":0.05}]}}],"app_status":"busy"},"messageId":3},"messageId":3}
13:15:42.925 detox[77975] INFO: [APP_STATUS] The app is busy with the following tasks:
• Run loop "Main Run Loop" is awake.
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
• 1 enqueued JavaScript timers:
- Timer #1:
+ JS timer ID: 1114.
+ Duration: 0.05.
+ Is recurring: NO.
13:15:52.927 detox[77975] TRACE: [WS_SEND] {"type":"currentStatus","params":{},"messageId":4}
13:15:52.927 detox[77975] TRACE: [WSS_GET_FROM, #tester] {"type":"currentStatus","params":{},"messageId":4}
13:15:52.928 detox[77975] TRACE: [WSS_SEND_TO, #app] {"type":"currentStatus","params":{},"messageId":4}
13:15:52.929 detox[77975] TRACE: [WSS_GET_FROM, #app] {"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":1293,"duration":0.050000000000000003}]}}],"app_status":"busy"},"messageId":4},"messageId":4}
13:15:52.929 detox[77975] TRACE: [WSS_SEND_TO, #tester] {"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":1293,"duration":0.05}]}}],"app_status":"busy"},"messageId":4},"messageId":4}
13:15:52.929 detox[77975] TRACE: [WS_MESSAGE] {"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":1293,"duration":0.05}]}}],"app_status":"busy"},"messageId":4},"messageId":4}
13:15:52.930 detox[77975] INFO: [APP_STATUS] The app is busy with the following tasks:
• Run loop "Main Run Loop" is awake.
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
• 1 enqueued JavaScript timers:
- Timer #1:
+ JS timer ID: 1293.
+ Duration: 0.05.
+ Is recurring: NO.
Device logs
Device logs
Mar 2 13:27:37 detox[79085] TRACE: [WS_SEND] {"type":"currentStatus","params":{},"messageId":25}
Mar 2 13:27:37 detox[79085] TRACE: [WSS_GET_FROM, #tester] {"type":"currentStatus","params":{},"messageId":25}
Mar 2 13:27:37 detox[79085] TRACE: [WSS_SEND_TO, #app] {"type":"currentStatus","params":{},"messageId":25}
Mar 2 13:27:37 detox[79085] TRACE: [WSS_GET_FROM, #app] {"params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":4791,"duration":0.050000000000000003}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"},"messageId":25},"messageId":25,"type":"currentStatusResult"}
Mar 2 13:27:37 detox[79085] TRACE: [WSS_SEND_TO, #tester] {"params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":4791,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"},"messageId":25},"messageId":25,"type":"currentStatusResult"}
Mar 2 13:27:37 detox[79085] TRACE: [WS_MESSAGE] {"params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":4791,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"},"messageId":25},"messageId":25,"type":"currentStatusResult"}
Mar 2 13:27:37 detox[79085] INFO: [APP_STATUS] The app is busy with the following tasks:
• Run loop "Main Run Loop" is awake.
• 1 enqueued JavaScript timers:
- Timer #1:
+ JS timer ID: 4791.
+ Duration: 0.05.
+ Is recurring: NO.
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
Mar 2 13:27:47 detox[79085] TRACE: [WS_SEND] {"type":"currentStatus","params":{},"messageId":26}
Mar 2 13:27:47 detox[79085] TRACE: [WSS_GET_FROM, #tester] {"type":"currentStatus","params":{},"messageId":26}
Mar 2 13:27:47 detox[79085] TRACE: [WSS_SEND_TO, #app] {"type":"currentStatus","params":{},"messageId":26}
Mar 2 13:27:47 detox[79085] TRACE: [WSS_GET_FROM, #app] {"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":4955,"duration":0.050000000000000003}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"},"messageId":26},"messageId":26}
Mar 2 13:27:47 detox[79085] TRACE: [WSS_SEND_TO, #tester] {"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":4955,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"},"messageId":26},"messageId":26}
Mar 2 13:27:47 detox[79085] TRACE: [WS_MESSAGE] {"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":4955,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"},"messageId":26},"messageId":26}
Mar 2 13:27:47 detox[79085] INFO: [APP_STATUS] The app is busy with the following tasks:
• Run loop "Main Run Loop" is awake.
• 1 enqueued JavaScript timers:
- Timer #1:
+ JS timer ID: 4955.
+ Duration: 0.05.
+ Is recurring: NO.
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
Mar 2 13:27:57 detox[79085] TRACE: [WS_SEND] {"type":"currentStatus","params":{},"messageId":27}
Mar 2 13:27:57 detox[79085] TRACE: [WSS_GET_FROM, #tester] {"type":"currentStatus","params":{},"messageId":27}
Mar 2 13:27:57 detox[79085] TRACE: [WSS_SEND_TO, #app] {"type":"currentStatus","params":{},"messageId":27}
Mar 2 13:27:57 detox[79085] TRACE: [WSS_GET_FROM, #app] {"messageId":27,"params":{"messageId":27,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5119,"duration":0.050000000000000003}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"}},"type":"currentStatusResult"}
Mar 2 13:27:57 detox[79085] TRACE: [WSS_SEND_TO, #tester] {"messageId":27,"params":{"messageId":27,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5119,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"}},"type":"currentStatusResult"}
Mar 2 13:27:57 detox[79085] TRACE: [WS_MESSAGE] {"messageId":27,"params":{"messageId":27,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5119,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"}},"type":"currentStatusResult"}
Mar 2 13:27:57 detox[79085] INFO: [APP_STATUS] The app is busy with the following tasks:
• Run loop "Main Run Loop" is awake.
• 1 enqueued JavaScript timers:
- Timer #1:
+ JS timer ID: 5119.
+ Duration: 0.05.
+ Is recurring: NO.
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
Mar 2 13:28:07 detox[79085] TRACE: [WS_SEND] {"type":"currentStatus","params":{},"messageId":28}
Mar 2 13:28:07 detox[79085] TRACE: [WSS_GET_FROM, #tester] {"type":"currentStatus","params":{},"messageId":28}
Mar 2 13:28:07 detox[79085] TRACE: [WSS_SEND_TO, #app] {"type":"currentStatus","params":{},"messageId":28}
Mar 2 13:28:07 detox[79085] TRACE: [WSS_GET_FROM, #app] {"params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"JS Run Loop"}},{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5279,"duration":0.050000000000000003}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"},"messageId":28},"messageId":28,"type":"currentStatusResult"}
Mar 2 13:28:07 detox[79085] TRACE: [WSS_SEND_TO, #tester] {"params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"JS Run Loop"}},{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5279,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"},"messageId":28},"messageId":28,"type":"currentStatusResult"}
Mar 2 13:28:07 detox[79085] TRACE: [WS_MESSAGE] {"params":{"status":{"busy_resources":[{"name":"run_loop","description":{"name":"JS Run Loop"}},{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5279,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"},"messageId":28},"messageId":28,"type":"currentStatusResult"}
Mar 2 13:28:07 detox[79085] INFO: [APP_STATUS] The app is busy with the following tasks:
• Run loop "JS Run Loop" is awake.
• Run loop "Main Run Loop" is awake.
• 1 enqueued JavaScript timers:
- Timer #1:
+ JS timer ID: 5279.
+ Duration: 0.05.
+ Is recurring: NO.
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
Mar 2 13:28:17 detox[79085] TRACE: [WS_SEND] {"type":"currentStatus","params":{},"messageId":29}
Mar 2 13:28:17 detox[79085] TRACE: [WSS_GET_FROM, #tester] {"type":"currentStatus","params":{},"messageId":29}
Mar 2 13:28:17 detox[79085] TRACE: [WSS_SEND_TO, #app] {"type":"currentStatus","params":{},"messageId":29}
Mar 2 13:28:17 detox[79085] TRACE: [WSS_GET_FROM, #app] {"messageId":29,"type":"currentStatusResult","params":{"messageId":29,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5447,"duration":0.050000000000000003}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"}}}
Mar 2 13:28:17 detox[79085] TRACE: [WSS_SEND_TO, #tester] {"messageId":29,"type":"currentStatusResult","params":{"messageId":29,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5447,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"}}}
Mar 2 13:28:17 detox[79085] TRACE: [WS_MESSAGE] {"messageId":29,"type":"currentStatusResult","params":{"messageId":29,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5447,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"}}}
Mar 2 13:28:17 detox[79085] INFO: [APP_STATUS] The app is busy with the following tasks:
• Run loop "Main Run Loop" is awake.
• 1 enqueued JavaScript timers:
- Timer #1:
+ JS timer ID: 5447.
+ Duration: 0.05.
+ Is recurring: NO.
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
Mar 2 13:28:27 detox[79085] TRACE: [WS_SEND] {"type":"currentStatus","params":{},"messageId":30}
Mar 2 13:28:27 detox[79085] TRACE: [WSS_GET_FROM, #tester] {"type":"currentStatus","params":{},"messageId":30}
Mar 2 13:28:27 detox[79085] TRACE: [WSS_SEND_TO, #app] {"type":"currentStatus","params":{},"messageId":30}
Mar 2 13:28:27 detox[79085] TRACE: [WSS_GET_FROM, #app] {"messageId":30,"type":"currentStatusResult","params":{"messageId":30,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5611,"duration":0.050000000000000003}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"}}}
Mar 2 13:28:27 detox[79085] TRACE: [WSS_SEND_TO, #tester] {"messageId":30,"type":"currentStatusResult","params":{"messageId":30,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5611,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"}}}
Mar 2 13:28:27 detox[79085] TRACE: [WS_MESSAGE] {"messageId":30,"type":"currentStatusResult","params":{"messageId":30,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5611,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"}}}
Mar 2 13:28:27 detox[79085] INFO: [APP_STATUS] The app is busy with the following tasks:
• Run loop "Main Run Loop" is awake.
• 1 enqueued JavaScript timers:
- Timer #1:
+ JS timer ID: 5611.
+ Duration: 0.05.
+ Is recurring: NO.
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
Mar 2 13:28:37 detox[79085] TRACE: [WS_SEND] {"type":"currentStatus","params":{},"messageId":31}
Mar 2 13:28:37 detox[79085] TRACE: [WSS_GET_FROM, #tester] {"type":"currentStatus","params":{},"messageId":31}
Mar 2 13:28:37 detox[79085] TRACE: [WSS_SEND_TO, #app] {"type":"currentStatus","params":{},"messageId":31}
Mar 2 13:28:37 detox[79085] TRACE: [WSS_GET_FROM, #app] {"messageId":31,"type":"currentStatusResult","params":{"status":{"app_status":"busy","busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5787,"duration":0.050000000000000003}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}]},"messageId":31}}
Mar 2 13:28:37 detox[79085] TRACE: [WSS_SEND_TO, #tester] {"messageId":31,"type":"currentStatusResult","params":{"status":{"app_status":"busy","busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5787,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}]},"messageId":31}}
Mar 2 13:28:37 detox[79085] TRACE: [WS_MESSAGE] {"messageId":31,"type":"currentStatusResult","params":{"status":{"app_status":"busy","busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5787,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}]},"messageId":31}}
Mar 2 13:28:37 detox[79085] INFO: [APP_STATUS] The app is busy with the following tasks:
• Run loop "Main Run Loop" is awake.
• 1 enqueued JavaScript timers:
- Timer #1:
+ JS timer ID: 5787.
+ Duration: 0.05.
+ Is recurring: NO.
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
Mar 2 13:28:47 detox[79085] TRACE: [WS_SEND] {"type":"currentStatus","params":{},"messageId":32}
Mar 2 13:28:47 detox[79085] TRACE: [WSS_GET_FROM, #tester] {"type":"currentStatus","params":{},"messageId":32}
Mar 2 13:28:47 detox[79085] TRACE: [WSS_SEND_TO, #app] {"type":"currentStatus","params":{},"messageId":32}
Mar 2 13:28:47 detox[79085] TRACE: [WSS_GET_FROM, #app] {"params":{"messageId":32,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5953,"duration":0.050000000000000003}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"}},"type":"currentStatusResult","messageId":32}
Mar 2 13:28:47 detox[79085] TRACE: [WSS_SEND_TO, #tester] {"params":{"messageId":32,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5953,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"}},"type":"currentStatusResult","messageId":32}
Mar 2 13:28:47 detox[79085] TRACE: [WS_MESSAGE] {"params":{"messageId":32,"status":{"busy_resources":[{"name":"run_loop","description":{"name":"Main Run Loop"}},{"name":"js_timers","description":{"timers":[{"is_recurring":false,"timer_id":5953,"duration":0.05}]}},{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}}],"app_status":"busy"}},"type":"currentStatusResult","messageId":32}
Mar 2 13:28:47 detox[79085] INFO: [APP_STATUS] The app is busy with the following tasks:
• Run loop "Main Run Loop" is awake.
• 1 enqueued JavaScript timers:
- Timer #1:
+ JS timer ID: 5953.
+ Duration: 0.05.
+ Is recurring: NO.
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
More data, please!
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Okay, I was actually able to figure out which library was causing the issue. TLDR: it was @sentry/react-native. More specifically, it was their stall tracking which is part of their React Native Tracing Instrumentation.
Just in case anyone else runs into a similar issue, I’ll include how I debugged this:
I added this snippet (temporarily) to my entry file (index.js):
I was able to follow the stack trace to where setTimeout was being called.
I was able to confirm that my tests run without the tracing instrumentation enabled.
I’ll go ahead and close this, and open an issue over on Sentry’s repo for visibility.
Thanks again for all the help!
For reference, here’s the related issue on the Sentry side: https://github.com/getsentry/sentry-react-native/issues/1921, solution mentioned here: https://github.com/getsentry/sentry-react-native/issues/1921#issuecomment-1124324156