wix / Detox

Gray box end-to-end testing and automation framework for mobile apps
https://wix.github.io/Detox/
MIT License
11.04k stars 1.91k forks source link

react-native-paper ProgressBar hangs detox indefinitely #4273

Open ianspektor opened 7 months ago

ianspektor commented 7 months ago

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?

Did your test throw out a timeout?

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

ianspektor commented 7 months ago

Detox logs (too long to paste in comment too) Detox logs.txt

stale[bot] commented 6 months ago

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.

mwmcode commented 6 months ago

@ianspektor did you figure out the root cause?

mwmcode commented 6 months ago

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

ianspektor commented 6 months ago

@mwmcode Seems like a decent workaround tbh! Will give it a try :) Thanks!

stale[bot] commented 3 months ago

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.