Description
We are facing a strange issue with the emulator, we are encountering sporadic: "cmd: Can't find service: input" issues while waiting for the emulator to boot, and then when it is booted it is killed straight away. This doesn't happen all the time, but maybe happens 30% of the time so the pipelines fail often but sometimes they work - when there is no change in the code.
So, I think there are 2 issues shown here, the first is the "cmd: Can't find service: input" and the second is that the emulator just gets killed after it is booted when it should proceed...
E.g. The following is an example. Does anyone know why this happens?
We are cycling through api-levels and running on ubuntu-latest, no cache
e.g.
matrix:
include:
- target: playstore
api-level: 35
arch: x86_64
- target: playstore
api-level: 33
arch: x86_64
- target: playstore
api-level: 32
arch: x86_64
- target: playstore
api-level: 31
arch: x86_64
- target: playstore
api-level: 30
arch: x86_64
Then using:
env:
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 300 [this doesn't seem to make a difference as it is just killed asap]
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '17'
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
Then running:
- name: Run tests (ONBOARDING1_GOOGLE)
# v2.33.0
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d
with:
emulator-boot-timeout: 1200
force-avd-creation: false
target: ${{ inputs.target }}
api-level: ${{ inputs.api-level }}
arch: ${{ inputs.arch }}
ndk: 25.2.9519653
profile: Nexus 6
emulator-options: '-no-snapshot-save -noaudio -no-boot-anim -cores 2 -memory 4096 -no-window'
script: |
avdmanager list
Below are the logs:
2025-05-03T17:11:59.9077260Z INFO | Loading snapshot 'default_boot'...
2025-05-03T17:11:59.9080252Z WARNING | Failed to process .ini file /home/runner/.android/emu-update-last-check.ini for reading.
2025-05-03T17:11:59.9158268Z WARNING | Device 'cache' does not have the requested snapshot 'default_boot'
2025-05-03T17:11:59.9159653Z
2025-05-03T17:11:59.9160446Z WARNING | Failed to load snapshot 'default_boot'
2025-05-03T17:11:59.9162804Z USER_INFO | The emulator is performing a cold boot without a saved state because there's no snapshot and you have configured it not to save on exit.
2025-05-03T17:12:00.0208534Z WARNING | Failed to process .ini file /home/runner/.android/emu-update-last-check.ini for reading.
2025-05-03T17:12:02.8572753Z INFO | Activated packet streamer for bluetooth emulation
2025-05-03T17:12:09.4565938Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:09.4642919Z adb: device offline
2025-05-03T17:12:09.4656904Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:11.4749730Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:11.4871246Z adb: device offline
2025-05-03T17:12:11.4875283Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:13.4966985Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:13.5079228Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:13.5081176Z adb: device offline
2025-05-03T17:12:15.5181265Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:15.5280592Z adb: device offline
2025-05-03T17:12:15.5282681Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:17.5404931Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:17.5532492Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:17.5535517Z adb: device offline
2025-05-03T17:12:19.5644793Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:19.5731973Z adb: device offline
2025-05-03T17:12:19.5747549Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:21.5818561Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:21.5969308Z adb: device offline
2025-05-03T17:12:21.5971639Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:23.6037585Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:23.6140234Z adb: device offline
2025-05-03T17:12:23.6147037Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:25.6289959Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:25.6416530Z adb: device offline
2025-05-03T17:12:25.6430734Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:27.6512681Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:27.6621384Z adb: device offline
2025-05-03T17:12:27.6651954Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:29.6708074Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:29.6832454Z adb: device offline
2025-05-03T17:12:29.6838038Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:31.6979703Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:31.7121614Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:31.7123447Z adb: device offline
2025-05-03T17:12:33.7152669Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:33.7207096Z adb: device offline
2025-05-03T17:12:33.7226053Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:35.7358086Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:35.7491783Z adb: device offline
2025-05-03T17:12:35.7554223Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:37.7637012Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:37.7700224Z adb: device offline
2025-05-03T17:12:37.7712239Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:39.7783137Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:39.7833661Z adb: device offline
2025-05-03T17:12:39.7861101Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:41.7922618Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:41.8017259Z adb: device offline
2025-05-03T17:12:41.8030153Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:43.8077117Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:43.8129441Z adb: device offline
2025-05-03T17:12:43.8134015Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:45.8218590Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:45.8314486Z adb: device offline
2025-05-03T17:12:45.8316643Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:47.8400845Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:47.8491238Z adb: device offline
2025-05-03T17:12:47.8507191Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:49.8611455Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:49.8663490Z adb: device offline
2025-05-03T17:12:49.8667970Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:51.8797595Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:51.8978657Z adb: device offline
2025-05-03T17:12:51.9022943Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:53.9171443Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:53.9344836Z adb: device offline
2025-05-03T17:12:53.9352223Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:55.9463104Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:55.9566932Z adb: device offline
2025-05-03T17:12:55.9573879Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:12:57.9717169Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:12:57.9972637Z adb: device offline
2025-05-03T17:12:57.9979392Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:13:00.0066917Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:13:00.0156290Z adb: device offline
2025-05-03T17:13:00.0161317Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:13:01.1987931Z ERROR | Failed to find ColorBuffer:43
2025-05-03T17:13:02.0256380Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:13:02.0378525Z adb: device offline
2025-05-03T17:13:02.0384391Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:13:04.0487520Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:13:04.0579345Z adb: device offline
2025-05-03T17:13:04.0589485Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:13:06.0813415Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:13:06.1015976Z adb: device offline
2025-05-03T17:13:06.1042551Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:13:08.1136345Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:13:08.1351883Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:13:08.1353990Z adb: device offline
2025-05-03T17:13:10.1517116Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:13:10.1640293Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:13:10.1642082Z adb: device offline
2025-05-03T17:13:12.1704056Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:13:12.1896796Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:13:12.1898624Z adb: device offline
2025-05-03T17:13:14.2116887Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:13:14.2256614Z adb: device offline
2025-05-03T17:13:14.2273412Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:13:16.2395522Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:13:16.2499625Z adb: device offline
2025-05-03T17:13:16.2506828Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:13:17.1233220Z INFO | Boot completed in 77586 ms
2025-05-03T17:13:17.1235324Z INFO | Increasing screen off timeout, logcat buffer size to 2M.
2025-05-03T17:13:18.2666748Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:13:18.2880976Z adb: device offline
2025-05-03T17:13:18.2889080Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:13:20.2997629Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:13:20.3190774Z adb: device offline
2025-05-03T17:13:20.3224465Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:13:22.3305979Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:13:22.3468585Z adb: device offline
2025-05-03T17:13:22.3478146Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:13:24.3588309Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:13:24.3705298Z The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
2025-05-03T17:13:24.3707482Z adb: device offline
2025-05-03T17:13:26.3794180Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2025-05-03T17:13:26.4505040Z 1
2025-05-03T17:13:26.4515482Z Emulator booted.
2025-05-03T17:13:26.4597540Z [command***/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell input keyevent 82
2025-05-03T17:13:26.5645152Z cmd: Can't find service: input
2025-05-03T17:13:26.5760149Z ::endgroup::
2025-05-03T17:13:26.5761728Z ##[endgroup***
2025-05-03T17:13:26.5770067Z ::group::Terminate Emulator
2025-05-03T17:13:26.5771732Z ##[groupTerminate Emulator
2025-05-03T17:13:26.5820934Z [command/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 emu kill
2025-05-03T17:13:26.5905537Z OK: killing emulator, bye bye
2025-05-03T17:13:26.5907094Z OK
2025-05-03T17:13:26.5971224Z INFO | Wait for emulator (pid 19677) 300 seconds to shutdown gracefully before kill;you can set environment variable ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL(in seconds) to change the default value (20 seconds)
2025-05-03T17:13:26.5973527Z