RobCherry / docker-chromedriver

Docker container for creating ChromeDriver servers
99 stars 74 forks source link

--disable-setuid-sandbox still required for running chrome mobile #8

Open aleksmark opened 6 years ago

aleksmark commented 6 years ago

I am using PHP testing framework, Codeception, to run tests on chromedriver, which is in the container made from this image.

After updating to latest image version 04d52f73c6a0, my tests that running on chrome mobile are unable to run. Test just hang.

The image 118dc5673220 works, and I pulled this image about 2 months ago.

I guess the reason is this commit https://github.com/RobCherry/docker-chromedriver/commit/84d8a7e50c369a5a5a52f6d834bc701b5b03f964 and removing the command that disables the SUID sandbox.

I don't see anything in the log

root@99835ae32d28:/# cat /var/log/supervisor/supervisord.log 
2018-01-15 12:03:40,960 CRIT Supervisor running as root (no user in config file)
2018-01-15 12:03:40,960 INFO Included extra file "/etc/supervisor/conf.d/chromedriver.conf" during parsing
2018-01-15 12:03:40,960 INFO Included extra file "/etc/supervisor/conf.d/tinywm.conf" during parsing
2018-01-15 12:03:40,960 INFO Included extra file "/etc/supervisor/conf.d/xvfb.conf" during parsing
2018-01-15 12:03:40,971 INFO RPC interface 'supervisor' initialized
2018-01-15 12:03:40,971 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-01-15 12:03:40,972 INFO supervisord started with pid 1
2018-01-15 12:03:41,975 INFO spawned: 'xvfb' with pid 9
2018-01-15 12:03:41,979 INFO spawned: 'tinywm' with pid 10
2018-01-15 12:03:41,982 INFO spawned: 'chromedriver' with pid 11
2018-01-15 12:03:41,992 INFO exited: tinywm (exit status 1; not expected)
2018-01-15 12:03:43,000 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-01-15 12:03:43,001 INFO spawned: 'tinywm' with pid 28
2018-01-15 12:03:43,001 INFO success: chromedriver entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-01-15 12:03:44,002 INFO success: tinywm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-01-15 12:05:36,988 INFO reaped unknown pid 37
2018-01-15 12:05:36,988 INFO reaped unknown pid 38
2018-01-15 12:05:36,990 INFO reaped unknown pid 41
2018-01-15 12:06:34,771 INFO reaped unknown pid 115
2018-01-15 12:06:34,771 INFO reaped unknown pid 116
2018-01-15 12:06:34,773 INFO reaped unknown pid 119
2018-01-15 12:07:14,616 INFO reaped unknown pid 194
2018-01-15 12:07:14,616 INFO reaped unknown pid 195
2018-01-15 12:07:14,618 INFO reaped unknown pid 198
2018-01-15 12:08:21,458 INFO reaped unknown pid 272
2018-01-15 12:08:21,458 INFO reaped unknown pid 273
2018-01-15 12:08:21,459 INFO reaped unknown pid 276
2018-01-15 12:10:32,203 WARN received SIGTERM indicating exit request
2018-01-15 12:10:32,204 INFO waiting for tinywm, chromedriver, xvfb to die
2018-01-15 12:10:32,206 INFO stopped: chromedriver (terminated by SIGTERM)
2018-01-15 12:10:32,207 INFO stopped: tinywm (terminated by SIGTERM)
2018-01-15 12:10:32,220 INFO stopped: xvfb (exit status 0)
2018-01-15 12:10:34,530 CRIT Supervisor running as root (no user in config file)
2018-01-15 12:10:34,530 INFO Included extra file "/etc/supervisor/conf.d/chromedriver.conf" during parsing
2018-01-15 12:10:34,531 INFO Included extra file "/etc/supervisor/conf.d/tinywm.conf" during parsing
2018-01-15 12:10:34,531 INFO Included extra file "/etc/supervisor/conf.d/xvfb.conf" during parsing
2018-01-15 12:10:34,537 INFO RPC interface 'supervisor' initialized
2018-01-15 12:10:34,537 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-01-15 12:10:34,538 INFO supervisord started with pid 1
2018-01-15 12:10:35,539 INFO spawned: 'xvfb' with pid 9
2018-01-15 12:10:35,540 INFO spawned: 'tinywm' with pid 10
2018-01-15 12:10:35,541 INFO spawned: 'chromedriver' with pid 11
2018-01-15 12:10:36,547 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-01-15 12:10:36,547 INFO success: tinywm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-01-15 12:10:36,547 INFO success: chromedriver entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
root@99835ae32d28:/# cat /var/log/supervisor/chromedriver.log 
Starting ChromeDriver 2.34.522913 (36222509aa6e819815938cbf2709b4849735537c) on port 4444
All remote connections are allowed. Use a whitelist instead!
Starting ChromeDriver 2.34.522913 (36222509aa6e819815938cbf2709b4849735537c) on port 4444
All remote connections are allowed. Use a whitelist instead!
[620.194][SEVERE]: Timed out receiving message from renderer: 600.000
[1220.259][SEVERE]: Timed out receiving message from renderer: 600.000
[1307.496][SEVERE]: Timed out receiving message from renderer: 600.000

This is my codeception config

actor: AcceptanceTester
modules:
    enabled:
          - \Helper\Acceptance
          - WebDriver:
              host: chromedriver
              port: 4444
              url: %ASSETS_BASE_URI%
              window_size: 360x640
              browser: chrome
              capabilities:
                  chromeOptions:
                      mobileEmulation:
                          deviceName: 'Nexus 5'
extensions:
    enabled:
        - Codeception\Extension\RunProcess:
            - chromedriver

Btw, can you please version the docker images. Only tag is latest and it does not work for me. https://hub.docker.com/r/robcherry/docker-chromedriver/tags/

RobCherry commented 6 years ago

@aleksmark Did you read through the conversation in #7 ? I am not actively working on this project and have not had a chance to spend any time investigating.

aleksmark commented 6 years ago

@RobCherry I read but not that carefully, obviously.

Ok, thank you anyways. I also don't have time to look at the issue. I created an image from old commit and pushed that to my docker hub, and I will use that one.

This is the chromedriver.log when running with --verbose flag chromedriver.log