ReactiveCircus / android-emulator-runner

A GitHub Action for installing, configuring and running hardware-accelerated Android Emulators on macOS virtual machines.
Apache License 2.0
963 stars 191 forks source link

Fails to launch emulator with Android API 31 on x86_64 arch #266

Open mpconte opened 2 years ago

mpconte commented 2 years ago

Given the following workflow:

name: Android CI

on:
  push:
    branches: [ "main" ]

jobs:
  build:

    runs-on: macos-latest

    steps:
    - uses: actions/checkout@v3

    - name: Create directory for jni libs
      run: mkdir app/libs && mkdir app/libs/arm64-v8a      

    - name: set up JDK 17
      uses: actions/setup-java@v3
      with:
        java-version: '17'
        distribution: 'temurin'
        cache: gradle

    - name: Setup gradle
      uses: gradle/gradle-build-action@v2    

    - name: Copy jar files to app folder
      run: gradle extractLibs

    - name: Instrumentation Tests
      uses: reactivecircus/android-emulator-runner@v2
      with:
        api-level: 31     
        target: google_apis
        arch: x86_64
        profile: Nexus 6
        script: ./gradlew connectedCheck --stacktrace

    - name: Build apk file
      run: gradle assembleRelease

    - name: Upload (unsigned) APK
      uses: actions/upload-artifact@v2.2.4
      with:
          name: kotlin_demo_apk
          path: ${{github.workspace}}/app/build/outputs/apk/release/app-release-unsigned.apk

I receive an error on the instrumentation test step with repeated output statements saying:

  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
...

The full log is available here: logs_74.zip

iamsethsamuel commented 2 years ago

I am facing the same issue with flutter

mrk-han commented 2 years ago

@mpconte Sorry for the late response here, but can you confirm that other API levels work for your setup?

Would be helpful if you could re-run the job with debugging enabled https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging

allo86 commented 1 year ago

I am facing the same issue:

##[debug***Evaluating condition for step: 'Run instrumentation tests'
##[debug***Evaluating: success()
##[debug***Evaluating success:
##[debug***=> true
##[debug***Result: true
##[debug***Starting: Run instrumentation tests
##[debug***Loading inputs
##[debug***Loading env
##[group***Run reactivecircus/android-emulator-runner@v2
with:
  api-level: 31
  arch: x86_64
  profile: pixel_5
  avd-name: test
  emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
  disable-animations: true
  script: ./gradlew connectedCheck
  target: default
  cores: 2
  force-avd-creation: true
  disable-spellchecker: false
  disable-linux-hw-accel: auto
  enable-hw-keyboard: false
  channel: stable
env:
  JAVA_HOME_11.0.17_x64: /Users/runner/hostedtoolcache/jdk/11.0.17/x64
  JAVA_HOME: /Users/runner/hostedtoolcache/jdk/11.0.17/x64
  JAVA_HOME_11_0_17_X64: /Users/runner/hostedtoolcache/jdk/11.0.17/x64
##[endgroup***
::group::Configure emulator
##[group***Configure emulator
API level: 31
target: default
CPU architecture: x86_64
Hardware profile: pixel_5
Cores: 2
RAM size: 
Heap size: 
SD card path or size: 
Disk size: 
AVD name: test
force avd creation: true
emulator options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
disable animations: true
disable spellchecker: false
disable Linux hardware acceleration: false
enable hardware keyboard: false
Channel: 0 (stable)
Script:
./gradlew connectedCheck
Pre emulator launch script:
::endgroup::
##[endgroup***
::group::Install Android SDK
##[group***Install Android SDK
[command***/bin/sh -c \yes | sdkmanager --licenses > /dev/null
Installing latest build tools, platform tools, and platform.
[command***/bin/sh -c \sdkmanager --install 'build-tools;33.0.0' platform-tools 'platforms;android-31' > /dev/null
Installing latest emulator.
[command***/bin/sh -c \sdkmanager --install emulator --channel=0 > /dev/null
Installing system images.
[command***/bin/sh -c \sdkmanager --install 'system-images;android-31;default;x86_64' --channel=0 > /dev/null
::endgroup::
##[endgroup***
::group::Launch Emulator
##[group***Launch Emulator
Creating AVD.
[command***/bin/sh -c \echo no | avdmanager create avd --force -n test --abi 'default/x86_64' --package 'system-images;android-31;default;x86_64' --device 'pixel_5'
Loading local repository...                                                     
[=========                              *** 25% Loading local repository...       
[=========                              *** 25% Fetch remote repository...        
[=======================================*** 100% Fetch remote repository...       
[command***/bin/sh -c \printf 'hw.cpu.ncore=2
' >> /Users/runner/.android/avd/test.avd/config.ini
Starting emulator.
[command***/bin/sh -c \/Users/runner/Library/Android/sdk/emulator/emulator -avd test -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none &
INFO    | Android emulator version 31.3.14.0 (build_id 9322596) (CL:N/A)
emulator: INFO: Found systemPath /Users/runner/Library/Android/sdk/system-images/android-31/default/x86_64/
WARNING | unexpected system image feature string, emulator might not function correctly, please try updating the emulator.
WARNING | Running on a system with less than 6 logical cores. Setting number of virtual cores to 1
WARNING | /etc/localtime does not point to zoneinfo-compatible timezone name
ERROR   | Unable to connect to adb daemon on port: 5037
WARNING | cannot add library /Users/runner/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed
INFO    | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
INFO    | added library /Users/runner/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib
INFO    | configAndStartRenderer: setting vsync to 60 hz
INFO    | Sending adb public key XXX
INFO    | injectedQemuChannel!
INFO    | Informing listeners of injection.
INFO    | Rootcanal has  been activated.
WARNING | /etc/localtime does not point to zoneinfo-compatible timezone name
WARNING | *** No gRPC protection active, consider launching with the -grpc-use-jwt flag.***
INFO    | Started GRPC server at 127.0.0.1:8554, security: Local, auth: none
INFO    | Advertising in: /Users/runner/Library/Caches/TemporaryItems/avd/running/pid_16495.ini
INFO    | setDisplayConfigs w 1080 h 2340 dpiX 440 dpiY 440
INFO    | Cold boot: requested by the user
WARNING | Failed to process .ini file /Users/runner/.android/emu-update-last-check.ini for reading.
INFO    | Your emulator is out of date, please update by launching Android Studio:
 - Start Android Studio
 - Select menu "Tools > Android > SDK Manager"
 - Click "SDK Tools" tab
 - Check "Android Emulator" checkbox
 - Click "OK"
WARNING | Failed to process .ini file /Users/runner/.android/emu-update-last-check.ini for reading.
[command***/Users/runner/Library/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 '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
[command***/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
adb: device offline
[command***/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
adb: device offline
[command***/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
adb: device offline

And those last lines are repeated over and over.

I also tried with API 30 and I get the same error.

The first warning I see is: WARNING | unexpected system image feature string, emulator might not function correctly, please try updating the emulator.

Is there a way to explicitly update it?

Waltari10 commented 1 year ago

Same here with arch: x86 and api-level: 29

mpconte commented 1 year ago

Hi @mrk-han

I'm sorry for the late response, but I am still encountering an issue in the workflow. With debug logging enabled, the output from the emulator step is:

##[debug]Evaluating condition for step: 'Instrumentation Tests'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Instrumentation Tests
##[debug]Loading inputs
##[debug]Loading env
Run reactivecircus/android-emulator-runner@v[2](https://github.com/SensoftInc/kotlin_demo/actions/runs/4744922840/jobs/8426510117#step:9:2)
  with:
    api-level: [3](https://github.com/SensoftInc/kotlin_demo/actions/runs/4744922840/jobs/8426510117#step:9:3)1
    target: google_apis
    ram-size: 20[4](https://github.com/SensoftInc/kotlin_demo/actions/runs/4744922840/jobs/8426510117#step:9:4)8M
    heap-size: 2048M
    disk-size: 2048M
    arch: x86_64
    profile: Nexus 6
    script: ./gradlew connectedAndroidTest --stacktrace
    cores: 2
    avd-name: test
    force-avd-creation: true
    emulator-boot-timeout: 600
    emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
    disable-animations: true
    disable-spellchecker: false
    disable-linux-hw-accel: auto
    enable-hw-keyboard: false
    channel: stable
  env:
    JAVA_HOME: /Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.6-10/x64/Contents/Home
    JAVA_HOME_17_X64: /Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.6-10/x64/Contents/Home
    GRADLE_BUILD_ACTION_SETUP_COMPLETED: true
    GRADLE_BUILD_ACTION_CACHE_RESTORED: true
::group::Configure emulator
Configure emulator
  API level: 31
  target: google_apis
  CPU architecture: x86_64
  Hardware profile: Nexus 6
  Cores: 2
  RAM size: 2048M
  Heap size: 2048M
  SD card path or size: 
  Disk size: 2048M
  AVD name: test
  force avd creation: true
  Emulator boot timeout: 600
  emulator options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
  disable animations: true
  disable spellchecker: false
  disable Linux hardware acceleration: false
  enable hardware keyboard: false
  Channel: 0 (stable)
  Script:
  ./gradlew connectedAndroidTest --stacktrace
  Pre emulator launch script:
  ::endgroup::
::group::Install Android SDK
Install Android SDK
  /bin/sh -c \yes | sdkmanager --licenses > /dev/null
  Installing latest build tools, platform tools, and platform.
  /bin/sh -c \sdkmanager --install 'build-tools;33.0.2' platform-tools > /dev/null
  Installing latest emulator.
  /bin/sh -c \sdkmanager --install emulator --channel=0 > /dev/null
  Installing system images.
  /bin/sh -c \sdkmanager --install 'system-images;android-31;google_apis;x86_64' --channel=0 > /dev/null
  ::endgroup::
::group::Launch Emulator
Launch Emulator
  Creating AVD.
  /bin/sh -c \echo no | avdmanager create avd --force -n test --abi 'google_apis/x86_64' --package 'system-images;android-31;google_apis;x86_64' --device 'Nexus 6'
  Loading local repository...                                                     
  [=========                              ] 2[5](https://github.com/SensoftInc/kotlin_demo/actions/runs/4744922840/jobs/8426510117#step:9:5)% Loading local repository...       
  [=========                              ] 25% Fetch remote repository...        
  [=======================================] 100% Fetch remote repository...       
  /bin/sh -c \printf 'hw.cpu.ncore=2
  ' >> /Users/runner/.android/avd/test.avd/config.ini
  /bin/sh -c \printf 'hw.ramSize=2048M
  ' >> /Users/runner/.android/avd/test.avd/config.ini
  /bin/sh -c \printf 'hw.heapSize=2048M
  ' >> /Users/runner/.android/avd/test.avd/config.ini
  /bin/sh -c \printf 'disk.dataPartition.size=2048M
  ' >> /Users/runner/.android/avd/test.avd/config.ini
  Starting emulator.
  /bin/sh -c \/Users/runner/Library/Android/sdk/emulator/emulator -avd test -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim &
  INFO    | Android emulator version 32.1.12.0 (build_id 975103[6](https://github.com/SensoftInc/kotlin_demo/actions/runs/4744922840/jobs/8426510117#step:9:6)) (CL:N/A)
  INFO    | Found systemPath /Users/runner/Library/Android/sdk/system-images/android-31/google_apis/x86_64/
  WARNING | Please update the emulator to one that supports the feature(s): Vulkan
  WARNING | Running on a system with less than 6 logical cores. Setting number of virtual cores to 1
  WARNING | /etc/localtime does not point to zoneinfo-compatible timezone name
  ERROR   | Unable to connect to adb daemon on port: 503[7](https://github.com/SensoftInc/kotlin_demo/actions/runs/4744922840/jobs/8426510117#step:9:7)
  WARNING | cannot add library /Users/runner/Library/Android/sdk/emulator/qemu/darwin-x[8](https://github.com/SensoftInc/kotlin_demo/actions/runs/4744922840/jobs/8426510117#step:9:8)6_64/lib64/vulkan/libvulkan.dylib: failed
  INFO    | Crashreporting disabled, not reporting crashes.
  INFO    | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
  INFO    | added library /Users/runner/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib
  INFO    | Sending adb public key [QAAAAJdpaXTZWZD41Cw35/LnSlZGLQolMhwrXtNywAVB/8t2vuldIHYYfF6twxBTZgiYm+m5EgnOeqHRj6P+mMx75+cCD3Lf[9](https://github.com/SensoftInc/kotlin_demo/actions/runs/4744922840/jobs/8426510117#step:9:9)dHHpIqek0tP14V/qYQkOgJaMzSmjGnyHAXc0aQ6IhKDMgKvZ87OOIo/hbOtA7YdnZOn3KOG/[12](https://github.com/SensoftInc/kotlin_demo/actions/runs/4744922840/jobs/8426510117#step:9:12)2TytTuSBnQa301MaH/TAmBau9mb3hSCO1zZ363oU0AS3zGPceeiho5OIb5y2nPxwgKAfpqafeWqQbCzKZ5fucya7b1o1mbnpdPVpgo4gMshnyvVulsSoyKr/VwYQEjBeFJnS7R9wIkXXmvBvrSth38fHHlOyhB+jVC+EKYmk3AtWem0Eih7f+bKsL5N03qvzbPaFqrgdnAC0+C9okwHjylTb8/J09mZSrKOA8CRLsai/uq6r6evyNasf3xSazd0ipNTML6binboCLqrUsjIILv1BzeXuChRGcaDjrf3TOXvH6Hy5w7AdMk2AvlrwOxD5YuVv/w0LH7kghQNtEKKZiWTVex+MMEgEgB1S3OcgGr3wH/kaOimzZ0/k5A/3sLWoNFDc3MmvaXajECRn1dXWD5rHsn5HOtsR6Om93+aMJo2YxarMnByENHPE6XgVBnCPsCI4ZARTQ2egLrwG3kBsliTdQY9/5bwWglOx/xskQMwlnoixuIXqR8KQjSLtKHDheNVbhJa/RagEAAQA= runner@unknown]
  WARNING | /etc/localtime does not point to zoneinfo-compatible timezone name
  WARNING | *** No gRPC protection active, consider launching with the -grpc-use-jwt flag.***
  INFO    | Started GRPC server at 127.0.0.1:8554, security: Local, auth: none
  INFO    | Advertising in: /Users/runner/Library/Caches/TemporaryItems/avd/running/pid_5606.ini
  INFO    | Setting display: 0 configuration to: [14](https://github.com/SensoftInc/kotlin_demo/actions/runs/4744922840/jobs/8426510117#step:9:14)40x[25](https://github.com/SensoftInc/kotlin_demo/actions/runs/4744922840/jobs/8426510117#step:9:25)60, dpi: 560x560 
  INFO    | Cold boot: requested by the user
  WARNING | Failed to process .ini file /Users/runner/.android/emu-update-last-check.ini for reading.
  INFO    | Your emulator is out of date, please update by launching Android Studio:
   - Start Android Studio
   - Select menu "Tools > Android > SDK Manager"
   - Click "SDK Tools" tab
   - Check "Android Emulator" checkbox
   - Click "OK"
  WARNING | Failed to process .ini file /Users/runner/.android/emu-update-last-check.ini for reading.
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  * daemon not running; starting now at tcp:50[37](https://github.com/SensoftInc/kotlin_demo/actions/runs/4744922840/jobs/8426510117#step:9:38)
  * daemon started successfully
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  adb: device offline
  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: device offline
  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: device offline
  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: device offline
  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: device offline
  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
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  adb: device offline
  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
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  adb: device offline
  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
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  adb: device offline
  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
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  adb: device offline
  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: device offline
  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
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  adb: device offline
  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: device offline
  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
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  adb: device offline
  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
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
  adb: device offline
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
  /Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
... (this line repeats for a while)
1
Terminate Emulator
  /Users/runner/Library/Android/sdk/platform-tools/adb -s emulator-5554 emu kill
  OK: killing emulator, bye bye
  OK
Error: Timeout waiting for emulator to boot.
INFO    | Wait for emulator (pid 53331) 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)
INFO    | Discarding the changed state: command-line flag
WARNING | Discarding the changed state (command-line flag).
mikemike396 commented 1 year ago

Anyone find a solution to this?

bilalawan321 commented 1 year ago

The job ran successfully with API-level 29, but did not run with the above APIs. Can anyone describe how to run an emulator with API 30 or above?

Prajwalgn-07 commented 1 year ago

Facing same issue with api level 29 anybody any findings?


      - name: setup android
        uses: reactivecircus/android-emulator-runner@v2
        with:
          api-level: 29
          arch: x86_64
          profile: Nexus 6
          script: |
            adb devices
            ./gradlew runMobileTests --stacktrace
RahmiTufanoglu commented 10 months ago

Still facing the same issue with Flutter

santhoshshetty commented 5 months ago

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

Any help or suggestions would be greatly appreciated. Thank you!

GrzegorzBobryk commented 2 months ago

The same on my side, it have worked before and stopped working after not changes at all.

Error:

  /Users/runner/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
  adb: device 'emulator-5554' not found
  The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1

Script:

  instrumentation-tests:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v3
      - name: Set up environment for Android build
        uses: ./.github/actions/prepare-env
      - name: Instrumentation tests
        uses: reactivecircus/android-emulator-runner@v2
        with:
          api-level: 33
          target: default
          arch: x86_64
          script: ./gradlew connectedCheck --stacktrace