Detox icon indicating copy to clipboard operation
Detox copied to clipboard

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

Open aaronpliu opened this issue 1 year ago • 7 comments

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?

  • [X] I have tested this issue on the latest Detox release and it still reproduces.

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 avatar Feb 18 '24 10:02 aaronpliu

@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 avatar Feb 18 '24 10:02 aaronpliu

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.

aaronpliu avatar Feb 26 '24 01:02 aaronpliu

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

KaterinaUK avatar Feb 27 '24 16:02 KaterinaUK

Experiencing the issue all the time :-(

aaronpliu avatar Mar 19 '24 01:03 aaronpliu

any workaround to avoid or bypass?

aaronpliu avatar Apr 03 '24 01:04 aaronpliu

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

gosha212 avatar Apr 03 '24 11:04 gosha212

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)

KaterinaUK avatar Apr 04 '24 07:04 KaterinaUK