Open AndyTWF opened 1 year ago
Also running into the same since last 3 days.
+1 Also experiencing this for past 3 days. Seems to fail 70-80% of the time
Hey friends we are hitting this as well with Store
Same here. Running on 4-core latest ubuntu and it maybe starts 15% of time.
Same story, timeout in most cases:
776 /usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed
777 /usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed
Terminate Emulator
778 /usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 emu kill
779 INFO | Wait for emulator (pid 2385) 20 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)
780 OK: killing emulator, bye bye
781 OK
782 Error: Timeout waiting for emulator to boot.
API 29 with default config is working, but with API 30 I'm facing the same
782 Error: Timeout waiting for emulator to boot.
API 29 with default config is working, but with API 30 I'm facing the same
782 Error: Timeout waiting for emulator to boot.
I´m facing the same problem with that API, was everything fine until 2 day ago, and now that
I have the same problem https://github.com/bytedance/flutter_ume/pull/107
It looks like the main workflow of this repo is also failing with the same problem we are all having :/ Is there any more information on what the problem is and when it will probably be fixed? Thank you in advance :)
Same here for me. Has anyone made any headway?
has been happening for almost two months now. Are there any other alternate options that anyone is using with Github actions?
I ended up firing up a Firebase Test Lab test from my Github Action. It's not as elegant as having everything running neatly in my own runner, but it'll do for now.
I have the same issues with API 31. I will give it a try with API 33. FWIW: API 29 is not accepted in the Play Store anymore.
Just noting here that we were seeing the same error when using a self-hosted ARM64 runner (always fails with adb: no devices/emulators found
). After some digging, the root cause seemed to be the same as #239 . We started defining an avd-name
, and now the emulator consistently boots and runs the tests.
Our current working action is:
- name: Run UI Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 31
profile: Nexus 6
arch: arm64-v8a
force-avd-creation: false
avd-name: macOS-avd-arm64-v8a-31
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./gradlew connectedCheck
Having the same issue here
Having the same issue on the "BuildJet" runner (buildjet-4vcpu-ubuntu-2204) with the following options:
uses: ReactiveCircus/android-emulator-runner@v2.28.0
with:
api-level: 31
target: google_apis
arch: x86_64
profile: pixel_6
ram-size: 4096M
heap-size: 512M
avd-name: pixel6_API31
force-avd-creation: true
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: ./integration_test/script.sh
And the same with this:
uses: ReactiveCircus/android-emulator-runner@v2.28.0
with:
api-level: 30
target: google_atd
arch: x86
profile: pixel_6
avd-name: pixel6_API30
channel: canary
script: ./integration_test/script.sh
I am seeing a similar issue on API 29 and 33 (haven't tried any other), but in my case adb
seems to get online after a while. For some reason adb shell getprop sys.boot_completed
doesn't seem to return whatever the action is expecting (testing locally, my emulator returns 1
) and it loops seemingly forever.
/usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed
adb: device offline
The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
/usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed
adb: device offline
The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
/usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed
adb: device offline
The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
/usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed
/usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed
/usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed
/usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed
/usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed
Same issue:
WARNING | Failed to process .ini file /home/runner/.android/emu-update-last-check.ini for reading.
/usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed
* daemon not running; starting now at tcp:5037
* daemon started successfully
adb: device offline
The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1
/usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed
1
Emulator booted.
/usr/local/lib/android/sdk/platform-tools/adb shell input keyevent 82
Disabling animations.
/usr/local/lib/android/sdk/platform-tools/adb shell settings put global window_animation_scale 0.0
/usr/local/lib/android/sdk/platform-tools/adb shell settings put global transition_animation_scale 0.0
/usr/local/lib/android/sdk/platform-tools/adb shell settings put global animator_duration_scale 0.0
/usr/bin/sh -c echo "Generated AVD snapshot for caching."
My YML:
name: Run test
on: push
jobs:
build:
name: Run integration test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Java setup
uses: actions/setup-java@v4.0.0
with:
java-version: '17'
distribution: 'zulu'
- name: Flutter setup
uses: subosito/flutter-action@v2.12.0
with:
channel: 'stable'
- name: Enable KVM group perms
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
- name: Run Android emulator
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: echo "Generated AVD snapshot for caching."
- run: flutter doctor -v
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: flutter test integration_test
- run: flutter test
Same issue:
WARNING | Failed to process .ini file /home/runner/.android/emu-update-last-check.ini for reading. /usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed * daemon not running; starting now at tcp:5037 * daemon started successfully adb: device offline The process '/usr/local/lib/android/sdk/platform-tools/adb' failed with exit code 1 /usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed 1 Emulator booted. /usr/local/lib/android/sdk/platform-tools/adb shell input keyevent 82 Disabling animations. /usr/local/lib/android/sdk/platform-tools/adb shell settings put global window_animation_scale 0.0 /usr/local/lib/android/sdk/platform-tools/adb shell settings put global transition_animation_scale 0.0 /usr/local/lib/android/sdk/platform-tools/adb shell settings put global animator_duration_scale 0.0 /usr/bin/sh -c echo "Generated AVD snapshot for caching."
My YML:
name: Run test on: push jobs: build: name: Run integration test runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4.1.1 - name: Java setup uses: actions/setup-java@v4.0.0 with: java-version: '17' distribution: 'zulu' - name: Flutter setup uses: subosito/flutter-action@v2.12.0 with: channel: 'stable' - name: Enable KVM group perms 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 - name: Run Android emulator uses: reactivecircus/android-emulator-runner@v2 with: api-level: 29 script: echo "Generated AVD snapshot for caching." - run: flutter doctor -v - run: flutter pub get - run: flutter pub run build_runner build --delete-conflicting-outputs - run: flutter test integration_test - run: flutter test
Unfortunately, I'm facing exactly the same issue
Happened in the Android official example project:
Log: https://github.com/android/nowinandroid/actions/runs/7781658194/job/21216491940?pr=1203 https://github.com/android/nowinandroid/actions/runs/7781859426/job/21217113346?pr=1204
I noticed that in the Android official example project, someone merged in this change with a git commit mentioning "to fix CI"
Another PR was linked in the above PR's description where this relevant conversation was held.
After seeing this, I decided to implement the free-disk-space action within my workflow and it seems it may have resolved the emulator failing to boot. This is a recent change for my workflow so hopefully I'll know after enough runs if it's truly fixed or not.
After adding the free-disk-space step
we also had to switch from the mac
image (faster) to ubuntu-latest
as free-disk-space action does not support the mac
image:
sudo: swapoff: command not found [...] free: command not found
After switching to ubuntu-latest
, the emulator still does not start:
Error: Timeout waiting for emulator to boot.
So we also added the KVM step from nowinandroid which also didn't fix it.
We finally also borrowed the other configurations from notinandroid which finally fixed the emulator startup!
Hello Dear Community,
Do we have a fix for this issue? I am still running into the problem with the error message below. Can someone please suggest a fix?
Error message: The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1 /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed adb: no devices/emulators found
Workflow:
name: Android Mobile CI - MAC OS
on:
workflow_dispatch
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '21' # Use a version compatible with ARM64
check-latest: true
- name: Run Android Tests
uses: reactivecircus/android-emulator-runner@v2.19.1
with:
api-level: 31
profile: Nexus 6
arch: arm64-v8a
force-avd-creation: false
avd-name: macOS-avd-arm64-v8a-31
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: |
mvn clean test
Sample workflow - https://github.com/santhoshshetty/MobileAutomation/actions/runs/9391653932/job/25864291597
Any help or suggestions would be greatly appreciated. Thank you!
@ychescale9 I am sorry for bothering you by tagging you, but due to the ticket being in an open state for a long time and multiple people facing this blocker, I have been facing this issue for some time, and it is blocking progress on some important activities. Additionally, I see that this ticket has been open for a long time with the same error message reported during its creation. Could you please help us resolve this issue?
Thanks a lot, and I look forward to your response. Thank you once again.
@santhoshshetty I looked at your sample workflow and looks like this is the issue:
PANIC: Avd's CPU Architecture 'x86' is not supported by the QEMU2 emulator on aarch64 host.
You're using macos-latest
which currently points to macos-14
and the action currently doesn't work with arm64 runner. See:
Any reason you can't use ubuntu-latest
?
Hello here, it works with macos-13
When running the emulator on GitHub Actions (macos-latest), we occasionally get an error of
Timeout waiting for emulator to boot
. This is probably around 25-30% of test runs that we get this. I did a dive into the differences between a successful build and this error in terms of logs, but couldn't spot anything obvious.The build logs are as follows:
Our workflow file can be found at: https://github.com/ably/ably-asset-tracking-android/blob/main/.github/workflows/emulate.yml
Thanks! :)