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

automate_android.sh script isn't working for chrome-mobile testing #617

Closed dchevalier4242 closed 1 year ago

dchevalier4242 commented 1 year ago

Creating a custom chrome-mobile image with the automate_android.sh script is not working. The automate_android script completes but when testing with the new image, there's an error: unknown error: com.android.chrome is not installed on device emulator-5554

These are the prompts I used in the automate_android.sh script: Appium version: 1.18.1 Android image type: default ABI: x86_64 Android version: 9.0 Android device name: SD card size: 500 Userdata size: 500 Chrome mobile image?: y Chromedriver version: 111.0.5563.64 Image tag: selenoid/chrome-mobile:111.0 Android quick boot snapshot: y

Downloading selenoid/chrome-mobile:86.0 and running tests against that works correctly so I can assume my basic setup is correct.

Logs from the chrome-mobile:111.0 container:

Waiting X server...
Logging to: /tmp/fluxbox.log
Waiting X server...
* daemon not running; starting now at tcp:5037
INFO    | Android emulator version 32.1.12.0 (build_id 9751036) (CL:N/A)
INFO    | Found systemPath /opt/android-sdk-linux/system-images/android-28/default/x86_64/
WARNING | System image is writable
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.***
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    | Started GRPC server at 127.0.0.1:8554, security: Local, auth: none
WARNING | Using fallback path for the emulator registration directory.
INFO    | Advertising in: /root/.android/avd/running/pid_83.ini
WARNING | Using fallback path for the emulator registration directory.
INFO    | Setting display: 0 configuration to: 360x800, dpi: 160x160 
* daemon started successfully
adb: device offline
2023/04/05 19:41:09 [INIT] [Listening on :7070]
2023-04-05 19:41:13:576 - [Chromedriver] Chromedriver exited unexpectedly with code null, signal SIGTERM
2023-04-05 19:41:13:577 - [Chromedriver] An unknown server-side error occurred while processing the command. Original error: unknown error: com.android.chrome is not installed on device emulator-5554
vania-pooh commented 1 year ago

@dchevalier4242 did you place Chrome APK under apk dir?

dchevalier4242 commented 1 year ago

@dchevalier4242 did you place Chrome APK under apk dir?

No. I couldn't find an apk directory but I added the Chrome APK to selenium/android and it worked!

Perhaps there should be a notice in the script if you choose to create chrome mobile image to add the Chrome APK to the selenium/android directory.

Thank you for your help @vania-pooh !

I'll close this issue.