aerokube / images

Browser images for Selenoid and Moon 1.x
https://aerokube.com/images/latest/
Apache License 2.0
168 stars 126 forks source link

Error: image android 13 failed to launch, "adb: no devices/emulators found". #636

Open jeremie-code opened 1 year ago

jeremie-code commented 1 year ago

After building images android version 13 with automate_android.sh and the following setting:

docker build -t selenoid/android:13.0_tmp 
--build-arg APPIUM_VERSION=2.0.1 
--build-arg ANDROID_DEVICE= 
--build-arg REPLACE_IMG=
--build-arg AVD_NAME=android13.0-1 
--build-arg 'BUILD_TOOLS=build-tools;29.0.2' 
--build-arg PLATFORM=android-33 
--build-arg 'EMULATOR_IMAGE=system-images;android-33;google_apis;x86_64' 
--build-arg EMULATOR_IMAGE_TYPE=google_apis 
--build-arg ANDROID_ABI=x86_64 
--build-arg SDCARD_SIZE=500 
--build-arg USERDATA_SIZE=500 android

Starting the container failed on this:

 --- x11vnc loop: 1 ---

* daemon started successfully
adb: no devices/emulators found
WARNING | System image is writable
WARNING | Failed to process .ini file /root/.android/avd/android13.0-1.avd/quickbootChoice.ini for reading.
ERROR   | x86_64 emulation currently requires hardware acceleration!
CPU acceleration status: KVM requires a CPU that supports vmx or svm
More info on configuring VM acceleration on Linux:
https://developer.android.com/studio/run/emulator-acceleration#vm-linux
General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.
INFO    | Storing crashdata in: /tmp/android-unknown/emu-crash.db, detection is enabled
INFO    | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
 --- x11vnc loop: waiting for: 80

PORT=5900
adb: no devices/emulators found
adb: no devices/emulators found
...

What can be the issue?

vania-pooh commented 1 year ago

@jeremie-code probably it's just loading too slowly.

jeremie-code commented 1 year ago

@vania-pooh thanks for your reply, i changed to another machine able to start android 8.1, but when i start android 13.0:

 --- x11vnc loop: 1 ---

INFO    | Android emulator version 32.1.14.0 (build_id 10330179) (CL:N/A)
INFO    | Found systemPath /opt/android-sdk-linux/system-images/android-33/google_apis/x86_64/
WARNING | System image is writable
 --- x11vnc loop: waiting for: 81

PORT=5900
WARNING | cannot add library /opt/android-sdk-linux/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed
WARNING | *** No gRPC protection active, consider launching with the -grpc-use-jwt flag.***
WARNING | Using fallback path for the emulator registration directory.
INFO    | Storing crashdata in: /tmp/android-unknown/emu-crash.db, detection is enabled
INFO    | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
INFO    | added library /opt/android-sdk-linux/emulator/lib64/vulkan/libvulkan.so
INFO    | Sending adb public key [QAAAAMn5JZGHj+JjOWHxq/mu..... ......wEAAQA= @unknown]
INFO    | Started GRPC server at 127.0.0.1:8554, security: Local, auth: none
INFO    | Advertising in: /root/.android/avd/running/pid_49.ini
WARNING | Using fallback path for the emulator registration directory.
INFO    | Setting display: 0 configuration to: 400x700, dpi: 160x160
adb: device offline
ERROR   | The emulator hardware cannot load snapshot: default_boot
adb: device offline
adb: device offline
...

Can you please advise, maybe there is some guide to mean some requirement. thanks

vania-pooh commented 1 year ago

@jeremie-code try to rebuild images on the same machine. Memory snapshot can not load if CPU model differs from CPU where image was built.

jeremie-code commented 1 year ago

I built a new image on this machine, I didn't use the image from the previous machine, but I used the same configuration.

jeremie-code commented 1 year ago

@vania-pooh i rebuild the image without quickboot:

 --- x11vnc loop: 1 ---

INFO    | Android emulator version 32.1.14.0 (build_id 10330179) (CL:N/A)
INFO    | Found systemPath /opt/android-sdk-linux/system-images/android-33/google_apis/x86_64/
* daemon started successfully
adb: no devices/emulators found
WARNING | System image is writable
WARNING | Failed to process .ini file /root/.android/avd/android13.0-1.avd/quickbootChoice.ini for reading.
WARNING | cannot add library /opt/android-sdk-linux/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed
 --- x11vnc loop: waiting for: 85

PORT=5900
WARNING | *** No gRPC protection active, consider launching with the -grpc-use-jwt flag.***
WARNING | Using fallback path for the emulator registration directory.
INFO    | Storing crashdata in: /tmp/android-unknown/emu-crash.db, detection is enabled
INFO    | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
INFO    | added library /opt/android-sdk-linux/emulator/lib64/vulkan/libvulkan.so
INFO    | Sending adb public key [QAAAAMn5JZGHj+JjOWHxq/mu..... ......wEAAQA= @unknown]
INFO    | Started GRPC server at 127.0.0.1:8554, security: Local, auth: none
INFO    | Advertising in: /root/.android/avd/running/pid_33.ini
WARNING | Using fallback path for the emulator registration directory.
INFO    | Setting display: 0 configuration to: 400x700, dpi: 160x160
WARNING | Failed to process .ini file /root/.android/emu-update-last-check.ini for reading.
WARNING | Failed to process .ini file /root/.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"
adb: device offline
...
adb: device offline
INFO    | Boot completed in 75597 ms
INFO    | Increasing screen off timeout, logcat buffer size to 2M.
INFO    | Revoking microphone permissions for Google App.

[ERROR] Unrecognized arguments: -bp 4725 --command-timeout 90 --no-reset
aandryashin commented 1 year ago

Hello! Try to increase sleep time up to 3 - 5 min while waiting to take snapshot during build time.

вт, 8 авг. 2023 г., 13:48 jeremie-code @.***>:

@vania-pooh https://github.com/vania-pooh i rebuild the image without quickboot:

--- x11vnc loop: 1 ---

INFO | Android emulator version 32.1.14.0 (build_id 10330179) (CL:N/A) INFO | Found systemPath /opt/android-sdk-linux/system-images/android-33/google_apis/x86_64/

  • daemon started successfully adb: no devices/emulators found WARNING | System image is writable WARNING | Failed to process .ini file /root/.android/avd/android13.0-1.avd/quickbootChoice.ini for reading. WARNING | cannot add library /opt/android-sdk-linux/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed --- x11vnc loop: waiting for: 85

PORT=5900 WARNING | No gRPC protection active, consider launching with the -grpc-use-jwt flag. WARNING | Using fallback path for the emulator registration directory. INFO | Storing crashdata in: /tmp/android-unknown/emu-crash.db, detection is enabled INFO | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag. INFO | added library /opt/android-sdk-linux/emulator/lib64/vulkan/libvulkan.so INFO | Sending adb public key [QAAAAMn5JZGHj+JjOWHxq/mu..... ......wEAAQA= @unknown] INFO | Started GRPC server at 127.0.0.1:8554, security: Local, auth: none INFO | Advertising in: /root/.android/avd/running/pid_33.ini WARNING | Using fallback path for the emulator registration directory. INFO | Setting display: 0 configuration to: 400x700, dpi: 160x160 WARNING | Failed to process .ini file /root/.android/emu-update-last-check.ini for reading. WARNING | Failed to process .ini file /root/.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" adb: device offline ... adb: device offline INFO | Boot completed in 75597 ms INFO | Increasing screen off timeout, logcat buffer size to 2M. INFO | Revoking microphone permissions for Google App.

[ERROR] Unrecognized arguments: -bp 4725 --command-timeout 90 --no-reset

— Reply to this email directly, view it on GitHub https://github.com/aerokube/images/issues/636#issuecomment-1669382024, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKY23OSTWEESP2IGEPKB53XUIKQ3ANCNFSM6AAAAAA3GQBDEQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

vania-pooh commented 1 year ago

@jeremie-code could be because of this https://github.com/aerokube/images/pull/634. Try to use Appium version 1.x instead of 2.x.