budtmo / docker-android

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

The emulator does not appear in the noVNC #120

Closed ruycostajr closed 5 years ago

ruycostajr commented 5 years ago

Operating System: Ubuntu 14.04 LTS x64

Docker Image: butomo1989/docker-android-x86-7.1.1, butomo1989/docker-android-real-device

Docker Version:
18.03.0-ce, build 0520e24

Docker-compose version (Only if you use it):
1.20.1, build 5d8c71b

Docker Command to start docker-android:
docker-compose up -d

Actual Behavior

The noVnc connects but the screen goes blank, only the appium terminal appears, docker-android

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6794404f06f7 butomo1989/docker-android-x86-7.1.1 "/bin/sh -c '/usr/biâ¦" 47 seconds ago Up 46 seconds (unhealthy) 4723/tcp, 5554-5555/tcp, 0.0.0.0:6080->6080/tcp android_nexus_7.1.1_1 0a92dc093b0a appium/appium "/bin/sh -c '/root/wâ¦" 48 seconds ago Up 47 seconds android_real_device_1 2b13d06abd7a selenium/hub:3.14.0-curium "/opt/bin/entry_poinâ¦" 49 seconds ago Up 47 seconds 0.0.0.0:4444->4444/tcp android_selenium_hub_1

Log from container 2018-09-14 11:36:36,143 CRIT Supervisor running as root (no user in config file) 2018-09-14 11:36:36,146 INFO supervisord started with pid 7 2018-09-14 11:36:37,149 INFO spawned: 'xvfb' with pid 10 2018-09-14 11:36:37,151 INFO spawned: 'port-forward' with pid 11 2018-09-14 11:36:37,154 INFO spawned: 'novnc' with pid 12 2018-09-14 11:36:37,156 INFO spawned: 'openbox' with pid 13 2018-09-14 11:36:37,159 INFO spawned: 'x11vnc' with pid 14 2018-09-14 11:36:37,162 INFO spawned: 'android-screen-mirror' with pid 16 2018-09-14 11:36:37,165 INFO spawned: 'docker-appium' with pid 21 2018-09-14 11:36:37,168 INFO spawned: 'auto-recording' with pid 22 2018-09-14 11:36:37,170 INFO spawned: 'adb-utils' with pid 23 2018-09-14 11:36:37,172 INFO success: android-screen-mirror entered RUNNING state, process has stayed up for > than 0 seconds (startsecs) 2018-09-14 11:36:37,180 INFO exited: android-screen-mirror (exit status 0; expected) 2018-09-14 11:36:38,217 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2018-09-14 11:36:38,217 INFO success: port-forward entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2018-09-14 11:36:38,217 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2018-09-14 11:36:38,217 INFO success: openbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2018-09-14 11:36:38,217 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2018-09-14 11:36:38,217 INFO success: docker-appium entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2018-09-14 11:36:38,218 INFO success: auto-recording entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2018-09-14 11:36:38,218 INFO success: adb-utils entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2018-09-14 11:36:43,180 INFO exited: auto-recording (exit status 0; expected)

docker-compose.zip

tienvx commented 5 years ago

Hope these information help:

mcopjan commented 5 years ago

@tienvx Well I have Dell XPS 15 9950, Windows 10 Pro, Virtualization enabled in BIOS, priviliged : true. Still having this issue. This ticket was created in September 2018 @budtmo, is there remedy that would work for all of us please?

simhem commented 5 years ago

Hello, i am also having the same issue, my emulator doesn't show up In the /var/log/supervisor/docker-android.stdout.log file, it says that i need to enable Linxu acceleration

emulator: CPU Acceleration: DISABLED
emulator: CPU Acceleration status: KVM requires a CPU that supports vmx or svm
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure KVM is properly installed and usable.
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.

I'm using Openshift to run my containers, and don't have admin rights on it. My question is, will my appium tests still work on this container, even without the emulator ?

HasBert commented 5 years ago

@simhem No I don't think so. As long as your emulator inside the container is not running, you cannot do anything with the emulator.

simhem commented 5 years ago

@HasBert Okay that's what i thought, it's seems logicial that appium needs a running device , thanks !

linersheng commented 5 years ago

I run it on ubuntu server x64, in VMware, the same problem.

Where can I run x86 emulator

Hoto-Cocoa commented 5 years ago

I tried this image in GCP, which nested-vm feature enabled. There is no emulator screen in VNC. image

egandro commented 5 years ago

There should be a autorestart on exit script.

egandro commented 5 years ago

I also would love an option it the host of the docker container can't run qemu e.g. no /dev/kvm device.

budtmo commented 5 years ago

it might be fixed in release 1.8-p5. Please feel free to reopen the issue

Ehsanul-IBM commented 4 years ago

@simhem Did you manage to get the image working on openshift?