Android typing slow
Description
When running detox tests on android the typing seems to be really slow, and it's even slower on my CI. iOS is fine and types quiet fast. What could be causing this?
https://user-images.githubusercontent.com/90803159/191717576-6813f77b-e600-45bc-a440-b8d68f434b1c.mp4
Your environment
Detox version: 19.12.1 React Native version: 0.69.5 Node version: Device model: Pixel 5 Android 12 API 31 OS: MacOS Test-runner (select one): jest-circus
I ran into the same problem. For us, it seemed related to synchronization. From my understanding, because Detox is a gray box testing framework, it knows when the system is doing something (like IO) and will pause to let the system "settle". I think it's typing slow because it's waiting for things to "settle" after each character is typed.
https://github.com/wix/Detox/blob/master/docs/Troubleshooting.Synchronization.md
I used
await device.disableSynchronization();
to disable synchronization and used
await device.enableSynchronization();
after typing to turn it back on.
I don't know if it was the correct solution but it helped.
I have tried doing that before typing and it seems to just be as slow:
await device.disableSynchronization();
await element(by.id('input-login-email')).typeText(
'[email protected]'
);
await element(by.id('input-login-password')).typeText('Password123');
await element(by.id('input-login-orgid')).typeText('XXXXX\n');
await device.enableSynchronization();
When typing all I can see this in the logs:
09:17:33.129 detox[26516] INFO: [APP_STATUS] The app seems to be idle
09:17:43.133 detox[26516] INFO: [APP_STATUS] The app seems to be idle
09:17:53.136 detox[26516] INFO: [APP_STATUS] The app seems to be idle
09:18:05.219 detox[26516] INFO: [APP_STATUS] The app seems to be idle
09:18:23.175 detox[26516] INFO: [APP_STATUS] The app seems to be idle
09:18:36.210 detox[26516] INFO: [APP_STATUS] The app is busy with the following tasks:
• "LooperIdlingResource-135-mqt_js" (JS Thread) is executing (JavaScript code).
• UI elements are busy:
- Reason: UI rendering activity.
• Activity on the React-Native bridge.
09:18:56.656 detox[26516] INFO: [APP_STATUS] The app is busy with the following tasks:
• "LooperIdlingResource-135-mqt_js" (JS Thread) is executing (JavaScript code).
• UI elements are busy:
- Reason: UI rendering activity.
• Activity on the React-Native bridge.
This issue appears to be a general usage or support question.
In order to get help, please either ask a question on Stack Overflow with the detox tag, or simply join our Discord.
Feel free to post your Stack Overflow question here for more visibility! We'll take a look at it ASAP.
For more information about our policy on issues, refer to this discussion.
Same, it's excruciatingly slow on Android.
See
The app is busy with the following tasks:
• "LooperIdlingResource-114-mqt_js" (JS Thread) is executing (JavaScript code).
And
The app is busy with the following tasks:
• Activity on the React-Native bridge.
repeated multiple times.
Facing the same issue
Same, it's excruciatingly slow on Android.
See
The app is busy with the following tasks: • "LooperIdlingResource-114-mqt_js" (JS Thread) is executing (JavaScript code).And
The app is busy with the following tasks: • Activity on the React-Native bridge.repeated multiple times.
Well to be reading it out loud, it looks like Detox is alerting you with the fact that typing somehow overloads your system. Do you happen to be using some sort of a fancy input component? Does typing manually (regradless of Detox) work smoothly, at all?
In any case, sharing a video would help a great deal.
I'm in the same situation. Works very quickly on iOS but takes forever (and even fails due to not finding the typed element) on Android.
I'm in the same situation.
Is there any update on this, I can't use typeText on API 33+ and now on 32 it's just so slow?!
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.