Detox
Detox copied to clipboard
Disabling synchronization on startup fails
What happened?
I used the following code for launchapp:
await device.launchApp({
permissions: {notifications: 'YES', location: 'inuse'},
launchArgs: { detoxEnableSynchronization: 0 }
});
To get around an animation loop on the start up screen. However, it still gets stuck there. Here is the code between where it starts and where it gets stuck:
await device.launchApp({
permissions: {notifications: 'YES', location: 'inuse'},
launchArgs: { detoxEnableSynchronization: 0 }
});
console.log(test_group_name, ' Synchronization Disabled');
console.log(test_group_name, ' launch completed');
});
it(test_group_name + 'App launch & login', async () => {
//Load app
device.disableSynchronization();
await device.reloadReactNative();
await util.setLocation('30.01654', '31.431934');
//StartupScreen
await waitFor(element(by.id('STARTUP_SCREEN_BUTTON'))).toBeVisible().withTimeout(2000);
await element(by.id('STARTUP_SCREEN_BUTTON')).tap();
The last two commands are never executed, and the problem is with animation synchronization because the console shows:
12:00:29.571 detox[162837] INFO: [APP_STATUS] The app is busy with the following tasks:
• UI elements are busy:
- Reason: Animations running on screen.
What was the expected behaviour?
For animation loop to be ignored and push the button.
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!
launchapp in disable synchronization
In what environment did this happen?
Detox version: 19.7.1 React Native version: 67.4 Node version: 16.15.0 Device model: Pixel XL Android version: 11 Test-runner (select one): jest-circus
Detox logs
Detox logs
paste logs here!
Device logs
Device logs
paste logs here!
More data, please!
No response
This looks the same as https://github.com/wix/Detox/issues/3270
What I can suggest as a workaround in the meantime is to try to wrap launchApp in explicit calls to device.disableSynchronization/device.enableSynchronization and see if it solves the issue.
device.disableSynchronization() cannot be called before device.launchApp(), can it?
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 reporsitory, read this discussion.
@jonathanmos release this, too?