budtmo / docker-android

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

Applications inside container missing? #320

Closed tburschka closed 1 year ago

tburschka commented 2 years ago

🐛 Bug Report

Hi, i tried to run this container on several platforms (linux, windows) but it seems, that the container has the issue, that some of the applications inside are missing. Could this be an issue of the base image?

Operating System: Windows 10, Ubuntu 20.04

Docker Image: budtmo/docker-android-x86-8.1 (but seems to be an issue of all versions up to 12)

Docker Version:
Docker Desktop 4.6.1

Docker Command to start docker-android:
docker run --privileged -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" --name android-container budtmo/docker-android-x86-8.1

Expected Behavior

noVNC Should show any kind of Android desktop.

Actual Behavior

noVNC is shown, but empty

Logs:

docker logs android-container -f
2022-03-28 00:40:33,375 CRIT Supervisor running as root (no user in config file)
2022-03-28 00:40:33,377 INFO supervisord started with pid 7
2022-03-28 00:40:34,379 INFO spawned: 'xvfb' with pid 10
2022-03-28 00:40:34,380 INFO spawned: 'port-forward' with pid 11
2022-03-28 00:40:34,380 INFO spawned: 'novnc' with pid 12
2022-03-28 00:40:34,381 INFO spawned: 'openbox' with pid 13
2022-03-28 00:40:34,382 INFO spawned: 'x11vnc' with pid 15
2022-03-28 00:40:34,383 INFO spawned: 'screen-copy' with pid 21
2022-03-28 00:40:34,384 INFO spawned: 'docker-appium' with pid 25
2022-03-28 00:40:34,385 INFO spawned: 'atd' with pid 28
2022-03-28 00:40:34,385 INFO spawned: 'auto-recording' with pid 32
2022-03-28 00:40:34,386 INFO spawned: 'adb-utils' with pid 34
2022-03-28 00:40:34,386 INFO exited: screen-copy (exit status 0; not expected)
2022-03-28 00:40:34,387 INFO exited: atd (exit status 0; not expected)
2022-03-28 00:40:35,424 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-03-28 00:40:35,424 INFO success: port-forward entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-03-28 00:40:35,424 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-03-28 00:40:35,424 INFO success: openbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-03-28 00:40:35,424 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-03-28 00:40:35,425 INFO spawned: 'screen-copy' with pid 176
2022-03-28 00:40:35,425 INFO success: docker-appium entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-03-28 00:40:35,426 INFO spawned: 'atd' with pid 177
2022-03-28 00:40:35,426 INFO success: auto-recording entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-03-28 00:40:35,426 INFO success: adb-utils entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-03-28 00:40:35,427 INFO exited: screen-copy (exit status 0; not expected)
2022-03-28 00:40:35,427 INFO exited: atd (exit status 0; not expected)
2022-03-28 00:40:36,111 INFO exited: docker-appium (exit status 0; expected)
2022-03-28 00:40:38,115 INFO spawned: 'screen-copy' with pid 205
2022-03-28 00:40:38,115 INFO spawned: 'atd' with pid 206
2022-03-28 00:40:38,117 INFO exited: screen-copy (exit status 0; not expected)
2022-03-28 00:40:38,117 INFO exited: atd (exit status 0; not expected)
2022-03-28 00:40:40,388 INFO exited: auto-recording (exit status 0; expected)
2022-03-28 00:40:41,391 INFO spawned: 'screen-copy' with pid 207
2022-03-28 00:40:41,391 INFO spawned: 'atd' with pid 208
2022-03-28 00:40:41,393 INFO exited: screen-copy (exit status 0; not expected)
2022-03-28 00:40:41,393 INFO gave up: screen-copy entered FATAL state, too many start retries too quickly
2022-03-28 00:40:41,393 INFO exited: atd (exit status 0; not expected)
2022-03-28 00:40:42,394 INFO gave up: atd entered FATAL state, too many start retries too quickly

supervisord.conf

[supervisord]
nodaemon=true
logfile=%(ENV_LOG_PATH)s/supervisord.log
childlogdir=%(ENV_LOG_PATH)s
priority=1

[program:xvfb]
command=/usr/bin/Xvfb %(ENV_DISPLAY)s -screen %(ENV_SCREEN)s %(ENV_SCREEN_WIDTH)sx%(ENV_SCREEN_HEIGHT)sx%(ENV_SCREEN_DEPTH)s
stdout_logfile=%(ENV_LOG_PATH)s/xvfb.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/xvfb.stderr.log
priority=1

[program:openbox]
command=/usr/bin/openbox-session
stdout_logfile=%(ENV_LOG_PATH)s/openbox.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/openbox.stderr.log
priority=2

[program:x11vnc]
command=./src/vnc.sh
stdout_logfile=%(ENV_LOG_PATH)s/x11vnc.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/x11vnc.stderr.log
priority=2
autorestart=true

[program:novnc]
command=./noVNC/utils/launch.sh --vnc localhost:%(ENV_LOCAL_PORT)s --listen %(ENV_TARGET_PORT)s
stdout_logfile=%(ENV_LOG_PATH)s/novnc.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/novnc.stderr.log
priority=2

[program:port-forward]
command=./src/port_forward.sh
autorestart=false
priority=1

;startsecs to fix "not expected" error. see: https://github.com/Supervisor/supervisor/issues/212#issuecomment-47933372
[program:screen-copy]
command=./src/scrcpy.sh
autorestart=false
stdout_logfile=%(ENV_LOG_PATH)s/screen-copy.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/screen-copy.stderr.log
priority=3

[program:atd]
command=./src/atd.sh
autorestart=false
stdout_logfile=%(ENV_LOG_PATH)s/atd.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/atd.stderr.log
priority=4

[program:docker-appium]
command=./src/appium.sh
autorestart=false
stdout_logfile=%(ENV_LOG_PATH)s/docker-android.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/docker-android.stderr.log
priority=4

[program:auto-recording]
command=./src/record.sh auto_record
autorestart=false
stdout_logfile=%(ENV_LOG_PATH)s/video-recording.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/video-recording.stderr.log
priority=4

[program:adb-utils]
command=./src/utils.sh
autorestart=false
stdout_logfile=%(ENV_LOG_PATH)s/adb-utils.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/adb-utils.stderr.log
priority=5

scrcpy.sh

#!/bin/bash

if [ -z "$REAL_DEVICE"]; then
  echo "Container is using android emulator"
else
  echo "Starting android screen copy..."
  /usr/local/bin/scrcpy
fi

/usr/local/bin

ls -lha /usr/local/bin
total 8.0K
drwxr-xr-x 2 root root 4.0K Mar 11  2020 .
drwxr-xr-x 1 root root 4.0K Mar 11  2020 ..
budtmo commented 1 year ago

please check it again with the latest release version. feel free to reopen the ticket if the issue is still there.