wix / Detox

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

Detox step into infinite wait with message "the app seems to be idle" #4375

Open aaronpliu opened 8 months ago

aaronpliu commented 8 months ago

What happened?

In a normal test scenario, when an unexpected popup appear or element not found, the detox will loop to print "The app seems to be idle" instead of throwing error or stop. It never exit or continue after a long long time

What was the expected behaviour?

either exit execution or throw error if no condition meet (e.g. element not visible or exist or unexpected dialog)

Was it tested on latest Detox?

Did your test throw out a timeout?

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version: 20.16.0 React Native version: 0.71.4 Has Fabric (React Native's new rendering system) enabled: (yes/no) yes Node version: v16.19.1 Device model: Android iOS version: 17 macOS version: 13.6 Xcode version: 14.2 Test-runner (select one): jest / other

Detox logs

Detox logs ``` The app seems to be idle ```

Device logs

Device logs ``` paste your device.log here! ```

More data, please!

No response

aaronpliu commented 8 months ago

@d4vidi , @gosha212 would you please take a look at it? no more detailed log to double check, it encountered this error in some test scenarios. for instance, unexpected popup appear, element not found, or page auto refresh...etc.

Thanks in advance

aaronpliu commented 8 months ago

the behavior seriously impact test scripts running and block test. Especially when the internet speed is not fast. It should be fail fast rather than infinite wait and stuck. I really appreciate your investigation and any workaround to settle.

KaterinaUK commented 7 months ago

I have similar problem I use: "detox": "20.17.0", "react-native": "^0.72.10" This is the error that I am seeing: Test Failed: Wait for [LooperIdlingResource-138-mqt_js] to become idle timed out

aaronpliu commented 7 months ago

Experiencing the issue all the time :-(

aaronpliu commented 6 months ago

any workaround to avoid or bypass?

gosha212 commented 6 months ago

@aaronpliu @KaterinaUK Can you share a sample project please? How often is it reproduces (Always / Sometime)?

KaterinaUK commented 6 months ago

Hi @gosha212 , Unfortunately, I do not have a sample project, it is a private project that I am working on right now. I have it every day, this is the error I can see: Test Failed: Wait for [LooperIdlingResource-101-mqt_js] to become idle timed out at Object.withTimeout (/Users/runner/work/app/app/e2e/new-user.test.js:26:8) at Generator.next (<anonymous>) at asyncGeneratorStep (/Users/runner/work/app/app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24) at _next (/Users/runner/work/app/app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9) at processTicksAndRejections (node:internal/process/task_queues:95:5)