Skip to content

Chrome standalone doesn't come up sporadically #952

@alex-lmi

Description

@alex-lmi

🐛 Bug Report

We're using the standalone-chrome Docker container in our CI and see from time to time that a Chrome doesn't come up. The Webdriver outputs the following:

unknown error: Chrome failed to start: exited abnormally
        (unknown error: DevToolsActivePort file doesn't exist)
        (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Selenium::WebDriver::Error::UnknownError)

Since we capture the Chrome log we can see that Chrome is logging the following:

[7233:7233:0730/011350.235186:INFO:cpu_info.cc(49)] Available number of cores: 8
[7225:7225:0730/011350.244166:ERROR:browser_dm_token_storage_linux.cc(101)] Error: /etc/machine-id contains 0 characters (32 were expected).
[7225:7225:0730/011350.359807:VERBOSE1:webrtc_event_log_manager.cc(89)] WebRTC remote-bound event logging enabled.
[7225:7238:0730/011350.361272:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[7254:7254:0730/011350.570651:ERROR:sandbox_linux.cc(368)] InitializeSandbox() called with multiple threads in process gpu-process.
[7254:7254:0730/011350.571285:ERROR:broker_posix.cc(43)] Invalid node channel message

So it seems that this is an issue with dbus. I'm not familiar with this process so I'm currently unsure if this is actually a problem with Chrome, Selenium, Host System or whatever.

To Reproduce

It's actually not reproducible by us, it just happens from time to time. We start Chrome using Webdriver like

client = Selenium::WebDriver::Remote::Http::Default.new(open_timeout: 17,                                                                read_timeout: 17)

chrome_options = Selenium::WebDriver::Chrome::Options.new
        chrome_options.add_argument('--autoplay-policy=no-user-gesture-required')
        chrome_options.add_argument('--use-fake-device-for-media-stream')
        chrome_options.add_argument('--use-fake-ui-for-media-stream')
        chrome_options.add_argument('--ignore-certificate-errors')
        chrome_options.add_argument('--disable-setuid-sandbox')
        chrome_options.add_argument('--no-sandbox')
        chrome_options.add_argument('--start-maximized')
        chrome_options.add_argument('--enable-logging')
        chrome_options.add_argument('--enable-crash-reporting')
        chrome_options.add_argument('--full-memory-crash-report')
        chrome_options.add_argument('--disable-dev-shm-usage')
        chrome_options.add_argument('--vmodule=*/webrtc/*=2,*/libjingle/*=2,*=-2')
        chrome_options.add_option(:excludeSwitches, ['test-type'])

        Capybara::Selenium::Driver.new(app,
                                       browser: :chrome,
                                       clear_local_storage: true,
                                       clear_session_storage: true,
                                       options: chrome_options,
                                       http_client: client,
                                       desired_capabilities:
                                           Selenium::WebDriver::Remote::Capabilities.chrome('loggingPrefs' => { 'browser' => 'ALL' }))

Expected behavior

Chrome comes up and is running as expected.

Test script reproducing this issue (when applicable)

-Chrome version: Google Chrome 75.0.3770.100
Chromedriver version: ChromeDriver 75.0.3770.140 (2d9f97485c7b07dc18a74666574f19176731995c-refs/branch-heads/3770@{#1155})

Environment

OS: Docker
Docker-Selenium image version: latest

  • Digest: sha256:45778bd91c1558a451b74840176f8ff3a4d28b76a498f16a7890a9cf1c1b871e
  • Status: Downloaded newer image for docker-dev.getgotools.net/selenium/standalone-chrome:latest
    ---> c4ed27d75bea
    Docker version:
    Docker-Compose version (if applicable): -
    Exact Docker command to start the containers (if using docker-compose, provide
    the docker-compose file as well):
    Chrome version: Google Chrome 75.0.3770.100
    Chromedriver version: ChromeDriver 75.0.3770.140

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions