amrsa1 / Android-Emulator-image

The use of this Docker image simplifies the process of running an Android emulator within a Docker container
MIT License
113 stars 52 forks source link

Getting a "Application Not Responding: System UI" error on Boot Start and when I run `./gradlew connectedAndroidTest` in headless mode #25

Open fps1961 opened 5 months ago

fps1961 commented 5 months ago

I'm on an amd64 arch with accel off and while the boot start gets going (though I still have to run start_emu_headless.sh twice for the device to boot correctly even if I increase timeout to say 15 minutes), it mostly starts off with an error of System UI not responding when I run the command to see the window focus. I then apply the adb command to hit the home button to clear the pop-up, but then when I try to run ./gradlew connectedAndroidTest, it again shows the error. I have tried to run with more memory (3GB and 4GB), but the error persists. Any ideas why? No change to the docker image btw, just running the device in headlessmode.

fps1961 commented 5 months ago

I forgot to add it, but as a test, I have been trying to run the gradle command on this simple repo. I really appreciate any help you can provide.

amrsa1 commented 5 months ago

@FruitPunchSamurai1961 seems related to this issue, there you can find a solution

https://webdriver.io/blog/2023/05/31/guied-for-xplatform-nativeMobile-app#system-ui-crush

fps1961 commented 5 months ago

Thanks for getting back to me @amrsa1! Actually, I did try that and the issue still persists.

Basically this is what happens:

  1. boot start -> usually successful
  2. System UI -> Not Responding
  3. apply the fix you linked (repeatedly pressing home)
  4. try to run ./gradlew connectedAndroidTest
  5. Espresso tests fail cause Syste, UI -> Not Responding showed up again

I'm trying to make this for a CI pipeline, so can't use headed mode unfortunately :(