Chrome on remote webdriver (via Grid) failed to start
Asked Answered
D

1

5

I'm having trouble launching Cucumber test with Chrome using remote webdriver capabilities on Grid (1 linux hub and 1 linux node with Firefox and Chrome). Firefox test go very well but Chrome returns the following error:

unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.2,platform=Linux 3.2.0-23-generic-pae x86) (WARNING: The server did not provide any stacktrace information)
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException:    java.lang.reflect.InvocationTargetException

Command duration or timeout: 20.67 seconds
Build info: version: '2.30.0', revision: 'dc1ef9c', time: '2013-02-19 00:15:27'
System info: os.name: 'Linux', os.arch: 'i386', os.version: '3.2.0-23-generic-pae',      java.version: '1.7.0_25'
Driver info: org.openqa.selenium.chrome.ChromeDriver (org.openqa.selenium.WebDriverException) (Selenium::WebDriver::Error::UnknownError)

The browser is initialized as:

$profile = Selenium::WebDriver::Chrome::Profile.new
$profile['download.prompt_for_download'] = false
$profile['download.default_directory'] = downloads_path

capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
    platform: "Linux",
    version: "",
    "chrome.profile" => $profile)

browser = Watir::Browser.new(
    :remote,
    :url => 'http://aut.theurl.net:4444/wd/hub',
    :desired_capabilities => capabilities)

More information:

  • I tried chromedriver versions 2.3 and 2.2 and selenium-server-standalone 2.35 and 2.3 unsuccessfully.
  • Though terminal, chromedriver starts successfully, so paths seems to be ok.

It seems that Chrome starts on the remote node but immediately fails. I'm a little out of ideas, so any thought or guidance is welcome.

Thanks in advance!

===================================

UPDATE: added more console log information. Maybe there were more information here but I can't see anything valuable.

11:45:47.612 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException:       java.lang.reflect.InvocationTargetException
Build info: version: '2.35.0', revision: 'c916b9d', time: '2013-08-12 15:42:01'
System info: os.name: 'Linux', os.arch: 'i386', os.version: '3.2.0-23-generic-pae',   java.version: '1.7.0_25'
Driver info: driver.version: unknown
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
(...)
Caused by: org.openqa.selenium.WebDriverException:    java.lang.reflect.InvocationTargetException
Build info: version: '2.35.0', revision: 'c916b9d', time: '2013-08-12 15:42:01'
System info: os.name: 'Linux', os.arch: 'i386', os.version: '3.2.0-23-generic-pae',   java.version: '1.7.0_25'
Driver info: driver.version: unknown
at   org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor(DefaultDriverFactory.java:72)
    at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:56)
    (...)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at      sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor(DefaultDriverFactory.java:62)
    ... 9 more
Caused by: org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start:     exited abnormally
  (Driver info: chromedriver=2.2,platform=Linux 3.2.0-23-generic-pae x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 20.53 seconds
Build info: version: '2.35.0', revision: 'c916b9d', time: '2013-08-12 15:42:01'
System info: os.name: 'Linux', os.arch: 'i386', os.version: '3.2.0-23-generic-pae',  java.version: '1.7.0_25'
Driver info: org.openqa.selenium.chrome.ChromeDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at     sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    (...)
11:45:47.612 WARN - Exception: unknown error: Chrome failed to start: exited abnormally
  (Driver info: chromedriver=2.2,platform=Linux 3.2.0-23-generic-pae x86) (WARNING: The   server did not provide any stacktrace information)
Command duration or timeout: 20.53 seconds
Build info: version: '2.35.0', revision: 'c916b9d', time: '2013-08-12 15:42:01'
System info: os.name: 'Linux', os.arch: 'i386', os.version: '3.2.0-23-generic-pae',   java.version: '1.7.0_25'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Distance answered 26/9, 2013 at 13:53 Comment(4)
What do you see in chromedriver.log? That should give you some idea about what is happeningCecil
I didn't find the way to write to chromedriver.log with last chromedriver version using Ruby. But the output appears on Terminal. Unfortunately, the log does not seems useful. I added it to the description.Stenotype
The log that you have added seems to be webdriver log in terminal. Chromedriver.log will be there in the folder where you are running the java -jar selenium-server command from. You don't have to write anything to it, it will be created by chromedriver itself.Cecil
When i said "write to chromedriver.log" i meant "to make chromedriver write something" :) Definitely, there is no Chromedriver.log at all. Now it works correctly, after changing the chromedriver version (64 instead of 32) and include in the startup command the chromedriver path (see description). Thank you very much!Stenotype
D
8

Finally, it works!

I changed two things:

  • use a different chromedriver (linux64 instead of linux32)
  • include the chromedriver path on the command using Dwebdriver.chrome.driver switch:

    java -jar ./selenium-server-standalone-2.35.0.jar - Dwebdriver.chrome.driver='/opt/drivers/chromedriver' -role webdriver -hub  http://192.168.1.10:4444/grid/register -port 5566 -browser browserName=chrome,maxInstances=5,platform=LINUX &
    

Thank you very much for your reference :)

Distance answered 2/10, 2013 at 8:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.