Layer animations pending on bitrise
See original GitHub issueDescription
A clear and concise description of what the bug is.
- I have tested this issue on the latest Detox release and it still reproduces
Reproduction
I have firebase analytics and performance in the app, last I had was detox version 17.14.9 and I did not have this problem. Ever since I updated to version 19.4.2 at some point my tests start failing by getting stuck with the message below:
detox[18542] 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>)".
• Run loop "Main Run Loop" is awake.
• UI elements are busy:
- Layer animations pending: 1.
I watched with remote connection, the weird thing is there is no animation or anything like that happening, it just hangs in there. This happened for example when a new screen came into view and when I closed and reopened the screen by hand the tests actually resumed. There is a small loader when the screen first shows and then it disappears, but it does disappear after a very short time.
I haven’t experienced this locally yet. What could the reason be for this and can I work around it somehow? It’s just blocking me from updating detox for a while now.
Expected behavior
Tests should not get stuck when there is no animation happening.
Screenshots / Video

Environment
- Detox: 19.4.2
- React Native: 0.66.3
- Node: 14.18.1
- Device: iPhone 11
- Xcode: 13.2
- iOS: 14.5
- macOS: Monterey
- Test-runner: jest-circus
Logs
If you are experiencing a timeout in your test
- I have followed the instructions under Identifying which synchronization mechanism causes us to wait too much, I have read synchronization debug documentation and am providing the relevant synchronization debug output below:
detox[17141] INFO: Test: test
detox[17141] 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>)".
• Run loop "Main Run Loop" is awake.
• UI elements are busy:
- Layer animations pending: 1.
detox[17141] 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>)".
• Run loop "Main Run Loop" is awake.
• UI elements are busy:
- Layer animations pending: 1.
detox[17141] 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>)".
• Run loop "Main Run Loop" is awake.
• UI elements are busy:
- Layer animations pending: 1.
detox[17141] 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>)".
• Run loop "Main Run Loop" is awake.
Device and verbose Detox logs
- I have run my tests using the
--loglevel traceargument and am providing the verbose log below:
Detox logs
detox[20990] 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>)".
• UI elements are busy:
- Layer animations pending: 1.
• Run loop "Main Run Loop" is awake.
detox[20990] TRACE: [WS_SEND] {"type":"currentStatus","params":{},"messageId":13}
detox[20990] TRACE: [WSS_GET_FROM, #tester] {"type":"currentStatus","params":{},"messageId":13}
detox[20990] TRACE: [WSS_SEND_TO, #app] {"type":"currentStatus","params":{},"messageId":13}
detox[20990] TRACE: [WSS_GET_FROM, #app] {"messageId":13,"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"ui","description":{"layer_animation_pending_count":1}},{"name":"run_loop","description":{"name":"Main Run Loop"}}],"app_status":"busy"},"messageId":13}}
detox[20990] TRACE: [WSS_SEND_TO, #tester] {"messageId":13,"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"ui","description":{"layer_animation_pending_count":1}},{"name":"run_loop","description":{"name":"Main Run Loop"}}],"app_status":"busy"},"messageId":13}}
detox[20990] TRACE: [WS_MESSAGE] {"messageId":13,"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"ui","description":{"layer_animation_pending_count":1}},{"name":"run_loop","description":{"name":"Main Run Loop"}}],"app_status":"busy"},"messageId":13}}
detox[20990] 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>)".
• UI elements are busy:
- Layer animations pending: 1.
• Run loop "Main Run Loop" is awake.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Related StackOverflow Question
I am getting this issue whenever i use
BlurViewfromexpo-blur@d4vidi for the life of me, I couldn’t reproduce this with a clean project, so I came to the conclusion that our main project has some weird config somewhere that’s causing this, I just disabled the loading animation on
FlatListduring tests to avoid this as a workaround sadly. I even created a new Bitrise account and everything and couldn’t reproduce this. If somehow I manage to find this out, I will re-open this issue, but for now I think I can close this. The weirdest part is, I saw that this is happening even on a local test, not with Bitrise, but the clean project didn’t have this. Something I must be missing, I will keep checking it out later. Sorry for the very late reply, was just able to find time, crazy couple of months.