budtmo / docker-android

Android in docker solution with noVNC supported and video recording
Other
9.61k stars 1.27k forks source link

Emulator hangs on loading screen #195

Open mcopjan opened 5 years ago

mcopjan commented 5 years ago

🐛 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

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

budtmo commented 5 years ago

Hi @mcopjan,

could you share your machine spec?

mcopjan commented 5 years ago

@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

budtmo commented 4 years ago

is this issue still valid? @mcopjan

mateleshkavo commented 4 years ago

@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:

mcopjan commented 4 years ago

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 commented 4 years ago

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))
NoelOmo commented 4 years ago

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

mcopjan commented 4 years ago

@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?