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:
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
Finally, it works!
I changed two things:
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 :)