docker-android icon indicating copy to clipboard operation
docker-android copied to clipboard

Emulator hangs on loading screen

Open mcopjan opened this issue 5 years ago • 8 comments

🐛 Bug Report

Operating System: Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic

Docker Image: budtmo/docker-android-x86-9.0

Docker Version:
Docker version 18.09.5, build e8ff056

Docker Command to start docker-android:

docker run --privileged -d -p 6080:6080 -p 4723:4723 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S10" -e APPIUM=true -e CONNECT_TO_GRID=true -e APPIUM_HOST="xxx.xxx.xxx.xx" -e APPIUM_PORT=4723 -e SELENIUM_HOST="xxx.xxx.xxx.xx" -e SELENIUM_PORT=4444 -e MOBILE_WEB_TEST=true -e RELAXED_SECURITY=true --name android-container budtmo/docker-android-x86-9.0

Expected Behavior

Emulator loads properly and device home page is displayed

Actual Behavior

Emulator is stuck on Google loading screen

Logs

martinc@ubuntu:~/bin$ docker exec -it android-container tail -f /var/log/supervisor/docker-android.stdout.log

  • Check "Android Emulator" checkbox
  • Click "OK"

emulator: No acpi ini file provided, using default

emulator: onGuestSendCommand: [0x8ef2800] Adb connected, start proxing data emulator: _hwFingerprint_connect: connect finger print listen is called

emulator: got message from guest system fingerprint HAL

image

mcopjan avatar Aug 28 '19 14:08 mcopjan

Hi @mcopjan,

could you share your machine spec?

budtmo avatar Sep 11 '19 10:09 budtmo

@budtmo Ubuntu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 2 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 94 Model name: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz Stepping: 3 CPU MHz: 2601.000 BogoMIPS: 5202.00 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 6144K NUMA node0 CPU(s): 0,1

image

mcopjan avatar Sep 11 '19 12:09 mcopjan

is this issue still valid? @mcopjan

budtmo avatar Oct 22 '19 07:10 budtmo

@budtmo I have the same problem when launching docker images with 9.0 and 10.0 Android versions in the Kubernetes cluster. Here are my specs: spec: containers: - env: - name: APPIUM value: "true" - name: APPIUM_HOST valueFrom: fieldRef: fieldPath: status.podIP - name: CONNECT_TO_GRID value: "true" - name: SELENIUM_HOST value: "xxx.xxx.xx.xx" - name: SELENIUM_PORT value: "30208" - name: MOBILE_WEB_TEST value: "true" - name: "BROWSER" value: "chrome" - name: "DEVICE" value: "Samsung Galaxy S10" image: "budtmo/docker-android-x86-10.0" name: android8-appium ports: - containerPort: 6080 securityContext: privileged: true resources: requests: memory: "2Gi" cpu: "3" limits: memory: "4Gi" cpu: "4" nodeSelector: beta.kubernetes.io/os: linux Android 8.1 and earlier works fine. VM OS is CentOS 7.7

mateleshkavo avatar Nov 11 '19 15:11 mateleshkavo

is this issue still valid? @mcopjan

Hi @budtmo, yes this is still the issue. I tried on different Linux VM as well (Centos) with the following compose file

services:
  selenium_hub:
    image: selenium/hub
    restart: unless-stopped
    ports:
      - "4444:4444"

  emulator:
    image: budtmo/docker-android-x86-9.0
    restart: unless-stopped
    privileged: true
    depends_on:
      - selenium_hub
    ports:
      - 6080
      - 5554
      - 5555
    environment:
      - DEVICE=Samsung Galaxy S10
      - CONNECT_TO_GRID=True
      - APPIUM=true
      - SELENIUM_HOST=selenium_hub
      - MOBILE_WEB_TEST=true

and having the same problem as reported above. Interestingly as @mateleshkavo mentioned, the same compose file with version 8.1 works fine. Any idea? I wonder how people are using version 9.0 & 10.0

mcopjan avatar Nov 25 '19 09:11 mcopjan

When running with version 10.0

[root@uiplinfdoc019 martinco]# docker exec -it aa5c8 tail -f /var/log/supervisor/docker-android.stdout.log
 - Check "Android Emulator" checkbox
 - Click "OK"

emulator: No acpi ini file provided, using default

emulator: VERBOSE: winsys-qt.cpp:892: config multidisplay with config.ini 0x0 0x0 0x0
emulator: _hwFingerprint_connect: connect finger print listen is called

emulator: got message from guest system fingerprint HAL

^C[root@uiplinfdoc019 martinco]# ^C
[root@uiplinfdoc019 martinco]# docker exec -it aa5c8 tail -f /var/log/supervisor/docker-android.stderr.log
Warning: libpng warning: iCCP: known incorrect sRGB profile ((null):0, (null))
Warning: libpng warning: iCCP: known incorrect sRGB profile ((null):0, (null))
Warning: libpng warning: iCCP: known incorrect sRGB profile ((null):0, (null))
Warning: libpng warning: iCCP: known incorrect sRGB profile ((null):0, (null))
Warning: libpng warning: iCCP: known incorrect sRGB profile ((null):0, (null))
Warning: libpng warning: iCCP: known incorrect sRGB profile ((null):0, (null))
pulseaudio: pa_context_connect() failed
pulseaudio: Reason: Connection refused
pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver
Warning: libpng warning: iCCP: known incorrect sRGB profile ((null):0, (null))

mcopjan avatar Nov 25 '19 09:11 mcopjan

Any update on this issue? Did you find a workaround solution?

NoelOmo avatar Jan 21 '20 13:01 NoelOmo

@NoelOmo yes, it is still an issue. I can spin up emulators for versions 7.1.1 and 8.1 but when I am using them with Appium to run tests I am getting "chromedriver is not reachable" error. I was hoping this would be resolved by using higher versions 9.0 or 10.0 (with higher version of chromedriver) but they exhibit the behaviour described above.

@budtmo any thoughts please? Do you have any HowTo build custom image with specific version of Chrome browser, chromedriver and Appium please?

mcopjan avatar Mar 16 '20 14:03 mcopjan