Detox
Detox copied to clipboard
react-native-paper ProgressBar hangs detox indefinitely
What happened?
One of my screens renders an indeterminate ProgressBar (i.e. <ProgressBar indeterminate/>). When reaching that screen, detox pauses indefinitely (until the test times out) printing this message every couple of seconds:
19:36:27.642 detox[8754] i The app is busy with the following tasks:
• 1 enqueued native timers:
- Timer #1:
+ Fire date: none.
+ Time until fire: 0.000.
+ Repeat interval: 0.
+ Is recurring: YES.
• 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>)".
The test runs normally if I comment out the ProgressBar component before running it.
Happens with both react-native-paper v 4 and 5.
What was the expected behaviour?
Detox to interpret the indeterminate progress bar as something it doesn't need to wait for.
Was it tested on latest Detox?
- [X] I have tested this issue on the latest Detox release and it still reproduces.
Did your test throw out a timeout?
- [X] I have followed the instructions under Identifying which synchronization mechanism causes us to wait too much.
Help us reproduce this issue!
I might be able to spare some time in the weekend to set up a small example to reproduce this if needed.
In what environment did this happen?
Detox version: 20.13.5 React Native version: 0.72.0 Has Fabric (React Native's new rendering system) enabled: no Node version: 18 Device model: iPhone 14 simulator iOS version: 16.4 macOS version: Sonoma 14.0 Xcode version: 15.0.1 Test-runner (select one): jest
Detox logs
Pasting logs in a comment, else PR body is too long.
Device logs
Couldn't find this file under the artifacts folder.
More data, please!
No response
Detox logs (too long to paste in comment too) Detox logs.txt
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back.
Thank you for your contributions!
For more information on bots in this repository, read this discussion.
@ianspektor did you figure out the root cause?
I had an animation that was not stopped properly which was causing this error.
So maybe pass indeterminate={!ENV_IS_TESTING} -- not ideal, but not sure how we can tell Detox to ignore waiting for animation
@mwmcode Seems like a decent workaround tbh! Will give it a try :) Thanks!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back.
Thank you for your contributions!
For more information on bots in this repository, read this discussion.