panther icon indicating copy to clipboard operation
panther copied to clipboard

Chrome failed to start

Open shubaivanqbee opened this issue 2 years ago • 0 comments

Some time ago everythig works fine, but after rebuild my image I faced with error

composer json

  "require-dev": {
    "dbrekelmans/bdi": "^0.3.0",
    "symfony/panther": "^1.1",

I chcked version chromium and driver

root@6cac42eea7e3:/auth_service# /usr/lib/chromium/chromium --version
Chromium 90.0.4430.212 
root@6cac42eea7e3:/auth_service# drivers/chromedriver --version
ChromeDriver 90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/4430@{#429})

when I try to use

        $this->panterClient = Client::createChromeClient(
            '/usr/bin/chromedriver',
            [
                '--remote-debugging-port=9222',
                '--no-sandbox'
            ],
            ['request_timeout_in_ms' => 20000000]
        );

I faced with error

Facebook\WebDriver\Exception\UnknownErrorException: unknown error: Chrome failed to start: exited abnormally.
  (chrome not reachable)
  (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

/auth_service/vendor/php-webdriver/webdriver/lib/Exception/WebDriverException.php:139
/auth_service/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php:371
/auth_service/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php:135
/auth_service/vendor/symfony/panther/src/ProcessManager/ChromeManager.php:75
/auth_service/vendor/symfony/panther/src/Client.php:120
/auth_service/vendor/symfony/panther/src/Client.php:524
/auth_service/vendor/symfony/panther/src/Client.php:276
/auth_service/tests/Application/Controller/Sonata/SubscriptionSonataControllerTest.php:66

so, I followed to WebDriverException -> lib/Remote/HttpCommandExecutor.php by debbug and what I found here

        curl_setopt($this->curl, CURLOPT_POSTFIELDS, $encoded_params);
        $raw_results = trim(curl_exec($this->curl));
        
       

this what I had in debug

$encoded_params= {"capabilities":{"firstMatch":[{"browserName":"chrome","goog:chromeOptions":{"args":["--remote-debugging-port=9222","--no-sandbox"]}}]},"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"args":["--remote-debugging-port=9222","--no-sandbox"]}}}

$http_options = {array} [2]
 url = "/session"
 method = "POST"
 
 and result
 
 $results = {array} [1]
 value = {array} [3]
  error = "unknown error"
  message = "unknown error: Chrome failed to start: exited abnormally.\n  (chrome not reachable)\n  (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)"
  stacktrace = "#0 0x55abd6200079 <unknown>\n#1 0x55abd61a1843 <unknown>\n#2 0x55abd5ef8b16 <unknown>\n#3 0x55abd5f1c114 <unknown>\n#4 0x55abd5f18206 <unknown>\n#5 0x55abd5f55274 <unknown>\n#6 0x55abd5f4fd93 <unknown>\n#7 0x55abd5f22244 <unknown>\n#8 0x55abd5f23a46 <unknown>\n#9 0x55abd61cd304 <unknown>\n#10 0x55abd61dcabe <unknown>\n#11 0x55abd61dc79e <unknown>\n#12 0x55abd61e0e9a <unknown>\n#13 0x55abd61dd38b <unknown>\n#14 0x55abd61c3103 <unknown>\n#15 0x55abd61f3735 <unknown>\n#16 0x55abd61f38e8 <unknown>\n#17 0x55abd620b6af <unknown>\n#18 0x7f23507f1ea7 start_thread\n#19 0x7f234fbeddef clone\n"

so, what missed ?

shubaivanqbee avatar Oct 06 '21 06:10 shubaivanqbee