Skip to content

Emulator failed to boot #324

@AndyTWF

Description

@AndyTWF

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:

2023-02-16T21:02:48.9274480Z ##[group]Launch Emulator
2023-02-16T21:02:48.9355520Z Creating AVD.
2023-02-16T21:02:48.9371150Z [command]/bin/sh -c \echo no | avdmanager create avd --force -n test --abi 'default/x86' --package 'system-images;android-24;default;x86'
2023-02-16T21:02:51.4707730Z Loading local repository...                                                     
2023-02-16T21:02:51.4746140Z [=========                              ] 25% Loading local repository...       
2023-02-16T21:02:51.4747010Z [=========                              ] 25% Fetch remote repository...        
2023-02-16T21:02:51.4747400Z [=======================================] 100% Fetch remote repository...       
2023-02-16T21:02:52.3224520Z Do you wish to create a custom hardware profile? [no] [command]/bin/sh -c \printf 'hw.cpu.ncore=2
2023-02-16T21:02:52.3225790Z ' >> /Users/runner/.android/avd/test.avd/config.ini
2023-02-16T21:02:52.3298780Z Starting emulator.
2023-02-16T21:02:52.3328190Z [command]/bin/sh -c \/Users/runner/Library/Android/sdk/emulator/emulator -avd test -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim &
2023-02-16T21:02:53.0896040Z INFO    | Android emulator version 32.1.11.0 (build_id 9536276) (CL:N/A)
2023-02-16T21:02:53.1265250Z INFO    | Found systemPath /Users/runner/Library/Android/sdk/system-images/android-24/default/x86/
2023-02-16T21:02:53.1366860Z INFO    | Found systemPath /Users/runner/Library/Android/sdk/system-images/android-24/default/x86/
2023-02-16T21:02:56.3485370Z WARNING | encryption is off
2023-02-16T21:02:56.3600450Z WARNING | Running on a system with less than 6 logical cores. Setting number of virtual cores to 1
2023-02-16T21:02:57.1046830Z ERROR   | Unable to connect to adb daemon on port: 5037
2023-02-16T21:02:58.0422260Z WARNING | cannot add library /Users/runner/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed
2023-02-16T21:02:58.0520210Z INFO    | Crashreporting disabled, not reporting crashes.
2023-02-16T21:02:58.0622110Z INFO    | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
2023-02-16T21:02:58.1968680Z WARNING | /etc/localtime does not point to zoneinfo-compatible timezone name
2023-02-16T21:02:58.2072600Z WARNING | *** No gRPC protection active, consider launching with the -grpc-use-jwt flag.***
2023-02-16T21:02:58.2421060Z [command]/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
2023-02-16T21:02:58.2641090Z * daemon not running; starting now at tcp:5037
2023-02-16T21:02:58.7321700Z * daemon started successfully
2023-02-16T21:02:58.7334000Z adb: no devices/emulators found
2023-02-16T21:02:58.7349340Z The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
2023-02-16T21:03:00.7425490Z [command]/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
2023-02-16T21:03:00.7634680Z adb: no devices/emulators found
2023-02-16T21:03:00.7650360Z The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1
2023-02-16T21:03:02.7681960Z [command]/Users/runner/Library/Android/sdk/platform-tools/adb shell getprop sys.boot_completed
2023-02-16T21:03:02.7908520Z adb: no devices/emulators found

---- Repeat many times ----

/Users/runner/Library/Android/sdk/platform-tools/adb -s emulator-5554 emu kill
error: could not connect to TCP port 5554: Connection refused
The process '/Users/runner/Library/Android/sdk/platform-tools/adb' failed with exit code 1

Our workflow file can be found at: https://github.com/ably/ably-asset-tracking-android/blob/main/.github/workflows/emulate.yml

Thanks! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions