Closed sgtcoolguy closed 2 years ago
Interesting! Does it work consistently With disable-animation: false
? I'd be surprised if the intermittent failure is causes by disabling the animation as we send an adb command to force focus before that and that doesn't seem to cause any issue?
Adding a sleep before disabling animation is tricky as we don't know what the best value is that works across all API levels, and this might need to be adjusted for new releases of the emulator binary.
I'll do some experiments locally. Thanks for sharing!
Closing for now! Feel free to reopen if needed. I haven't seen any other reports of this.
After waiting for the emulator to boot, it then sends commands to force focus and disable animations. The first command to disable animations will sometimes fail by
adb
responding that the device is offline (presumably just because it's slow and the device reported that it was booted but wasn't "ready")The code: https://github.com/ReactiveCircus/android-emulator-runner/blob/main/src/emulator-manager.ts#L56
Not sure if a simple "wait"/"sleep" timer to delay the commands post-boot makes sense or not?
See https://github.com/appcelerator/node-titanium-sdk/runs/2088624418?check_suite_focus=true#step:7:147 for an example workflow run where it occurred.