Selenium and Chrome error: --ignore-certificate-errors - google-chrome

I'm trying to do some tests with selenium and it seems that with Firefox everything works correctly but when the test try to open Chrome browser it shows the above error, --ignore-certificate-errors.
The log info says:
-------------------------------------------------------------------------------
Test set: com.myproject.login.LoginOK
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 18.156 sec <<< FAILURE! - in com.myproject.login.LoginOK
testLoginChromeOK on testLoginChromeOK(com.myproject.login.LoginOK)(com.myproject.login.LoginOK) Time elapsed: 1.926 sec <<< FAILURE!
org.openqa.selenium.WebDriverException:
unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"19659.1","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=56.0.2924.87)
(Driver info: chromedriver=2.9.248304,platform=Linux 3.16.0-38-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 144 milliseconds
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'Acer', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.16.0-38-generic', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, chrome={userDataDir=/tmp/.com.google.Chrome.ifVATg}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, version=56.0.2924.87, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 0534e4dd8d67942dbc415812d7b4b15d
at com.myproject.login.LoginOK.testLoginChromeOK(LoginOK.java:64)
Could someone give me a hint? Thanks in advance.

I see the following:
Driver info: chromedriver=2.9.248304
It seems your are using an outdated chromedriver and it might not be compatible with your current chrome version (chrome 56).
Latest version changelog shows "Supports Chrome v54-56", so I think you should download latest version of chromedriver and then configure selenium to use that latest version.

Related

Not able to maximize Chrome Window in headless mode

I recently upgraded my chrome version to 60 and chromedriver to version 2.31. Post that I have started getting the following exception when I try to do a maximize of the browser window.
driver.driver.manage().window().maximize()
org.openqa.selenium.WebDriverException: unknown error: failed to
change window state to maximized, current state is normal (Session
info: chrome=60.0.3112.78) (Driver info: chromedriver=2.31.488763
(092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Linux
4.2.0-27-generic x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 108 milliseconds
Build info: version: '2.53.1', revision:
'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30
19:26:09' System info: host: 'bb-blr-prod-stage-stg1-01', ip:
'10.3.211.2', os.name: 'Linux', os.arch: 'amd64', os.version:
'4.2.0-27-generic', java.version: '1.7.0_80' Session ID:
c7de7149dd490cc7760d2f4fc49f0325 Driver info:
org.openqa.selenium.chrome.ChromeDriver Capabilities [{platform=LINUX,
acceptSslCerts=true, javascriptEnabled=true, browserName=chrome,
chrome={userDataDir=/tmp/.org.chromium.Chromium.WABPhO,
chromedriverVersion=2.31.488763
(092de99f48a300323ecf8c2a4e2e7cab51de5ba8)},
networkConnectionEnabled=false, unexpectedAlertBehaviour=,
rotatable=false, setWindowRect=true, locationContextEnabled=true,
mobileEmulationEnabled=false, pageLoadStrategy=normal,
version=60.0.3112.78, takesHeapSnapshot=true,
cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true,
browserConnectionEnabled=false, webStorageEnabled=true,
nativeEvents=true, hasTouchScreen=false,
applicationCacheEnabled=false, takesScreenshot=true}]
I run my tests in headless mode using ChromeDriver on Geb.
Chrome version - 60.0.3112.78
chromedriver version - 2.31.488763
OS - Ubuntu 14.04.4 LTS
Selenium version - 2.53.1
WebDriver Language Bindings
Geb - 0.13.1
Since you're running tests in a headless mode, there is no active browser window available. As such your
driver.driver.manage().window().maximize()
would always fail in such situations because the driver doesn't know which window to maximize since there aren't any available.
You can either follow what #DebanjanB has mentioned or you can start the headless browser with a specific screen size like 1440x900 etc, doing something like this
driver.manage().window().setSize(new Dimension(1440, 900));
[Edit] In most cases now that I've seen that the maximize() method works in headless too - however I've not tested this on a CI system.
Add below ChromeOption in your code :
options.addArguments("--window-size=1325x744");
Also refer this blog for more
This is an open bug (follow here) : https://bugs.chromium.org/p/chromedriver/issues/detail?id=1901
There seems to be a minor discrepancy in the line of code:
driver.driver.manage().window().maximize()
You need to replace this line of code with:
driver.manage().window().maximize()
In case this solution doesn't address your issue, to use Google Chrome in headless you can use either of the following solutions:
Using start-maximized
It is recommended to maximize the Google Chrome browser through ChromeOptions class as follows:
Code Block:
ChromeOptions options = new ChromeOptions();
options.addArguments("start-maximized");
options.addArguments("--headless");
options.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation"));
options.setExperimentalOption("useAutomationExtension", false);
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.google.com/");
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File(".\\Screenshots\\using-start-maximized.png"));
driver.quit();
Browser Snapshot:
Using --window-size=1400,600
As an alternative you can also add the argument for the expected window size as follows:
Code Block:
ChromeOptions options = new ChromeOptions();
options.addArguments("--window-size=1400,600");
options.addArguments("--headless");
options.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation"));
options.setExperimentalOption("useAutomationExtension", false);
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.google.com/");
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File(".\\Screenshots\\using-window-size.png"));
driver.quit();
Browser Snapshot:
Using setSize(new Dimension(1440, 900))
Code Block:
ChromeOptions options = new ChromeOptions();
options.addArguments("--headless");
options.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation"));
options.setExperimentalOption("useAutomationExtension", false);
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.google.com/");
driver.manage().window().setSize(new Dimension(1440, 900));
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File(".\\Screenshots\\using-setSize.png"));
driver.quit();
Browser Snapshot:
tl; dr
You can find Selenium python client based discussion on maximizing window in Selenium Firefox headless returns different results
I'm using chromedriver 2.30 & chrome browser v60 through protractor. I run the tests headless too albeit I don't do it via chromeoptions. Rather I run tests headless using xvfb-run on a unix distribution. I'm encountering this issue also albeit it fails randomly for me. See stack below
[chrome #11] [31mWebDriverError: unknown error: failed to change window state to maximized, current state is normal
[chrome #11] (Session info: chrome=60.0.3112.78)
[chrome #11] (Driver info: chromedriver=2.30.477691 (6ee44a7247c639c0703f291d320bdf05c1531b57),platform=Linux 3.10.0-514.26.2.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
[chrome #11] Command duration or timeout: 122 milliseconds
[chrome #11] Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
[chrome #11] System info: host: 's1wfadvcilvm08', ip: '172.16.184.183', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-514.26.2.el7.x86_64', java.version: '1.8.0_141'
[chrome #11] Driver info: org.openqa.selenium.chrome.ChromeDriver
[chrome #11] Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.30.477691 (6ee44a7247c639c0703f291d320bdf05c1531b57), userDataDir=/tmp/.org.chromium.Chromium.BNsN1w}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=60.0.3112.78, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=}]
My code at the beginning of each test does the following
browser.manage().window().maximize();
changing to
driver.driver.manage().window().maximize();
driver.manage().window().maximize();
doesn't work for me either unfortunately. Shouldn't browser.manage().window().maximize() be still working as I'm running headless using xvfb-run rather than doing headless via chrome options?
This bug was initially fixed in ChromeDriver 2.42, and was actual for macOS until 2.44 (check changelogs: http://chromedriver.chromium.org/downloads).
So there is a solution for everyone who faces this issue: update your driver version
This is known issue on Ubuntu 20.04 LTS for headless Google Chrome. I just used Java's awt pakage to get maximum resolution of whatevevr screen i.e. xvbf for Ubuntu LTS and current screen for Windows 10 and set it in arggument of ChromeOption to configure Webdriver
java.awt.Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
chromeOptions.addArguments("--window-size=" + (int) screenDimension.getWidth() + "," + (int) screenDimension.getHeight());

ChromeDriver keeps crashing on Jenkins Selenium Job: "WebDriverError: Chrome failed to start: crashed"

I am trying to run some automated tests on Jenkins using protractor which uses selenium and chromedriver.
I have also setup xvfb so that we can run these tests in a headless manner. I have the xvfb jenkins plugin installed and it is working correctly.
Error
The problem I'm having, is when I start the tests, chrome keeps crashing. I get this error:
E/launcher - WebDriverError: unknown error: Chrome failed to start: crashed
...
E/launcher - Process exited with error code 199
Setup
Here is the information I have on the setup of the system:
Chrome
Location: /usr/bin/google-chrome
Version: Chromium 52.0.2743.0
ChromeDriver
Location: {project_home}/src/js/node_modules/webdriver-manager/selenium/chromedriver_2.24
Version: ChromeDriver 2.24.417424
Selenium
Location: {project_home}/src/js/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar
Version: 2.53.1
Protractor
Location: {project_home}/src/js/node_modules/protractor
Version: 4.0.9
WebDriver Manager
Location: {project_home}/src/js/node_modules/webdriver-manager
Version: 10.2.4
Jenkins
Version: 1.6.17
xvfb
Version: Unknown
Node
Version: 6.7
Java
Version: java-8-openjdk-amd64
Output
Here is the console output from Jenkins:
...
21:58:07.380 INFO - Launching a standalone Selenium Server
21:58:07.407 INFO - Java: Oracle Corporation 25.111-b14
21:58:07.407 INFO - OS: Linux 4.4.0-47-generic amd64
21:58:07.418 INFO - v2.53.1, with Core v2.53.1. Built from revision a36b8b1
21:58:07.473 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
21:58:07.474 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
21:58:07.474 INFO - Driver class not found: com.opera.core.systems.OperaDriver
21:58:07.474 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
21:58:07.475 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX
21:58:07.475 INFO - Driver class not found: org.openqa.selenium.htmlunit.HtmlUnitDriver
21:58:07.475 INFO - Driver provider org.openqa.selenium.htmlunit.HtmlUnitDriver is not registered
21:58:07.527 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
21:58:07.527 INFO - Selenium Server is up and running
Current webdriver status: [21:58:08] I/status - selenium standalone version available: 2.53.1 [default]
[21:58:08] I/status - chromedriver versions available: 2.22, 2.24 [default]
[21:58:08] I/status - geckodriver version available: v0.9.0 [default]
[21:58:08] I/status - android-sdk is not present
[21:58:08] I/status - appium is not present
**** STARTING GUI TESTS ****
Running ./node_modules/protractor/bin/protractor conf-server.js
[21:58:08] I/local - Starting selenium standalone server...
[21:58:08] I/launcher - Running 1 instances of WebDriver
[21:58:09] I/local - Selenium standalone server started at http://10.0.0.82:33509/wd/hub
[21:59:09] E/launcher - unknown error: Chrome failed to start: crashed
(Driver info: chromedriver=2.24.417424 (c5c5ea873213ee72e3d0929b47482681555340c3),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.17 seconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'ip-10-0-0-82', ip: '10.0.0.82', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_111'
Driver info: org.openqa.selenium.chrome.ChromeDriver
[21:59:09] E/launcher - WebDriverError: unknown error: Chrome failed to start: crashed
(Driver info: chromedriver=2.24.417424 (c5c5ea873213ee72e3d0929b47482681555340c3),platform=Linux 4.4.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.17 seconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'ip-10-0-0-82', ip: '10.0.0.82', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-47-generic', java.version: '1.8.0_111'
Driver info: org.openqa.selenium.chrome.ChromeDriver
at WebDriverError ({project_home}/src/js/node_modules/selenium-webdriver/lib/error.js:27:5)
at Object.checkLegacyResponse ({project_home}/src/js/node_modules/selenium-webdriver/lib/error.js:639:15)
at parseHttpResponse ({project_home}/src/js/node_modules/selenium-webdriver/http/index.js:538:13)
at client_.send.then.response ({project_home}/src/js/node_modules/selenium-webdriver/http/index.js:472:11)
at ManagedPromise.invokeCallback_ ({project_home}/src/js/node_modules/selenium-webdriver/lib/promise.js:1379:14)
at TaskQueue.execute_ ({project_home}/src/js/node_modules/selenium-webdriver/lib/promise.js:2913:14)
at TaskQueue.executeNext_ ({project_home}/src/js/node_modules/selenium-webdriver/lib/promise.js:2896:21)
at asyncRun ({project_home}/src/js/node_modules/selenium-webdriver/lib/promise.js:2820:25)
at {project_home}/src/js/node_modules/selenium-webdriver/lib/promise.js:639:7
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
at Function.createSession ({project_home}/src/js/node_modules/selenium-webdriver/lib/webdriver.js:329:24)
at Builder.build ({project_home}/src/js/node_modules/selenium-webdriver/builder.js:458:24)
at Local.DriverProvider.getNewDriver ({project_home}/src/js/node_modules/protractor/built/driverProviders/driverProvider.js:37:33)
at Runner.createBrowser ({project_home}/src/js/node_modules/protractor/built/runner.js:198:43)
at {project_home}/src/js/node_modules/protractor/built/runner.js:277:30
at _fulfilled ({project_home}/src/js/node_modules/q/q.js:834:54)
at self.promiseDispatch.done ({project_home}/src/js/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch ({project_home}/src/js/node_modules/q/q.js:796:13)
at {project_home}/src/js/node_modules/q/q.js:604:44
at runSingle ({project_home}/src/js/node_modules/q/q.js:137:13)
[21:59:09] E/launcher - Process exited with error code 199
Protractor Config
exports.config = {
seleniumServerJar: './node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar',
chromeDriver: './node_modules/webdriver-manager/selenium/chromedriver_2.24',
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
binary: '/usr/bin/google-chrome',
args: ['--enable-logging','--v=1'],
extensions: []
}
},
framework: 'custom',
frameworkPath: require.resolve('./node_modules/protractor-cucumber-framework'),
specs: [
'../../features/gui/active/*.feature'
],
onPrepare: function ()
{
require('babel-register')({ presets : ['es2015'] })
}
};
Jenkins xvfb plugin
Related
Chrome reference: https://sites.google.com/a/chromium.org/chromedriver/help/chrome-doesn-t-start
unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.9 suggests configuring xvfb
WebDriverError: unknown error: Chrome failed to start: exited abnormally unsolved
https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/8409 suggests using direct connect: "Protractor can test directly against Chrome and Firefox without using a Selenium Server. To use this, in your config file set directConnect: true."
Selenium Webdriver & Chrome driver - not able to run chrome driver suggests using java 1.6 instead
Chrome on remote webdriver (via Grid) failed to start suggests using x64 chromedriver and specifying it in a parameter
Please try updating Protractor to latest 4.0.11 and chrome driver to 2.25 as there were lot of issues reported in 2.24 version which has been fixed.
Try it once and let us know.
Can you follow below :
- In you jenkins settings add a global property
key : DISPLAY
value:0:0
- On your server start Xvfb in the background:
Xvfb :0 -ac -screen 0 1024x768x24 &
Reference link:
unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.9
I had the same issue as you
I ended up to change my args as a below
args: [ "--headless", "--no-sandbox" ,"--disable-dev-shm-usage"]

Selenium "chrome not reachable" error and can't access browser web elements after test kills existing browser and launches new

Selenium "chrome not reachable" error and can't access browser web elements after test kills existing browser and launches new
I'm using latest java, chrome driver and selenium 3.0 latest jar for automating web application, everything works very fine except when test fails; it kills browser according to my requirement and new test uses new browser but chrome shows unreachable.
Now is there any binding to previous session? How subsequent browser launch can't identify web objects and it works fine for first first launch only? Does anyone have solution for this or can anyone try in your framework after killing existing browser and launching new in between of the test using latest GA or beta web driver version?
Steps:
- Write below code and launch chrome using web driver
- Navigate to your web application
- Login to it (WORKS FINE)
- Assume test fails, so it kills existing chrome browser
- Again hits below code and opens new browser
- Navigate to application again
- Login to it (DOESN'T WORK - because it can't identify web objects for newly launched browser due to "chrome not reachable" error).
Code:
ChromeOptions options = new ChromeOptions();
options.addArguments("chrome.switches","--disable-extensions");
options.addArguments("--start-maximized");
System.setProperty("webdriver.chrome.driver", chromedriverPath);
webDriver = new ChromeDriver(options);
webDriver.navigate().to(myURL);
WebDriver.findElement(By.cssSelector(input[class=LoginButton]))
Error:
Build info: version: 'unknown', revision: '2aa21c1', time: '2016-08-02 14:59:43 -0700'
System info: host: 'abc', ip: '12.116.61.2', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_102'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129), userDataDir=C:\Users\abc\AppData\Local\Temp\scoped_dir7360_5203}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=52.0.2743.116, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 4d9e503ddb4ae1506b1592a0426bb7ff
*** Element info: {Using=css selector, value=input[class=LoginButton]}
129615 [main] INFO com.util.SleepUtil - Sleep: 1000 milliseconds ... (0/1000)
130615 [main] INFO com.util.SleepMetrics - Entry: com.selenium.functions.Login.NavigateTo() - Sleep: 1000/2000
130615 [main] INFO com.framework - ...WebDriver...findElement()
130615 [main] INFO com.framework - ...WebDriver...elementPresent()
130615 [main] INFO com.framework - ...WebDriver...getElementOrNull()
130615 [main] INFO com.framework - ...WebDriver...getElementByCss()
130615 [main] INFO com.framework - ...WebDriver...configureCssLocator()
132629 [main] INFO com.framework - ...WebDriver.findElement(By.cssSelector(input[class=LoginButton]))
135651 [main] INFO com.framework - ...getElementByCss()...org.openqa.selenium.WebDriverException: chrome not reachable

WebDriverError: unknown error: Chrome failed to start: exited abnormally

What I'm trying to achieve
Successfully run my protractor tests on headless chrome on Ubuntu 14 non gui.
Set up
Using multiple reference pages I have managed to successfully install: Xvfb Chrome latest browser Protractor 3.3.0 Java 7 (also tried with Java 8) and also set the LOCAL_HOME. Also, managed to start the Xvfb using this reference.
Protractor conf
exports.config = {
baseUrl: 'http://<qa environment>',
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
jasmineNodeOpts: {
showColors:true,
defaultTimeoutInterval: 2500000
},
capabilities: {
'browserName': 'chrome'
},
specs: ['administration/*-spec.js'], //'signinandout/*-spec.js', 'homepage/*-spec.js',
onPrepare: function(){
//browser.driver.manage().window().setSize(1280, 1080);
}
}
Exception stack trace:
/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/error.js:26
constructor(opt_error) {
^ WebDriverError: unknown error: Chrome failed to start: exited abnormally (Driver info:
chromedriver=2.21.371461
(633e689b520b25f3e264a2ede6b74ccc23cb636a),platform=Linux
3.13.0-87-generic x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 60.16 seconds
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11
19:06:42' System info: host: 'vagrant-ubuntu-trusty-64', ip:
'10.0.2.15', os.name: 'Linux', os.arch: 'amd64', os.version:
'3.13.0-87-generic', java.version: '1.7.0_101' Driver info:
org.openqa.selenium.chrome.ChromeDriver
at WebDriverError (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/error.js:26:26)
at Object.checkLegacyResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/error.js:580:13)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:64:13
at Promise.invokeCallback_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1329:14)
at TaskQueue.execute_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2790:14)
at TaskQueue.executeNext_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2773:21)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2652:27
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:639:7
at process._tickCallback (internal/process/next_tick.js:103:7) From: Task: WebDriver.createSession()
at acquireSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:62:22)
at Function.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:295:12)
at Builder.build (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/builder.js:458:24)
at Hosted.DriverProvider.getNewDriver (/usr/local/lib/node_modules/protractor/built/driverProviders/driverProvider.js:37:33)
at Runner.createBrowser (/usr/local/lib/node_modules/protractor/built/runner.js:182:43)
at /usr/local/lib/node_modules/protractor/built/runner.js:255:30
at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:796:13)
at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:556:49
[01:09:14] E/launcher - Process exited with error code 1
Check your Google chrome Version and its compatibility with the chrome driver.
You can check that from the Chromedriver Site and download the compatible version.
It worked for me.
probably your window screen size is not matching try giving maximize in onPrepare:
onPrepare: function(){
browser.driver.manage().window().maximize();
}
Open your project and Please update your npm modules by the following command.
project_root:\> npm update
Now update your selenium driver to the latest version using the following command
project_root:\> webdriver-manager update
Run your tests again.
Error due to Xvfb display is not specified here. Here , Selenium scripts are running using headless browser testing concept which is without GUI.
Hope u have used chromedriver, chrome binaries and XVfb. here chromedriver is initializing chrome binaries but chrome binary not able to sits on the monitor with XVfb .Thats y its throwing error as " Chrome failed to start:exit abnormally"
please follow the below steps before executing ur script.Example:(Execute this cmd in ur Unix server (ex.putty))
usr/bin/Xvfb :2 -ac -screen 0 1280x1024x24 &
export DISPLAY=:2
It will work definitely.

Error while executing chromedriver

I am getting this error when I try to run my selenium script in Chrome. How should I correct this problem?
Starting ChromeDriver 2.15.322448 (52179c1b310fec1797c81ea9a20326839860b7d3) on port 15264
Only local connections are allowed.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {"code":-32603,"message":"Cannot navigate to invalid URL"}
(Session info: chrome=42.0.2311.90)
(Driver info: chromedriver=2.15.322448 (52179c1b310fec1797c81ea9a20326839860b7d3),platform=Windows NT 6.3 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 8 milliseconds
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:03:00'
System info: host: 'snehagoutam', ip: '192.168.1.3', os.name: 'Windows 8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.7.0_67'
Session ID: 3aeb08c890ad851258208cccb19dd435
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=WIN8_1, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=C:\Users\Sneha\AppData\Local\Temp\scoped_dir7752_4467}, rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, version=42.0.2311.90, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, takesScreenshot=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:304)
at Selenium.Test.main(Test.java:13)
Your error message clearly says:
unhandled inspector error: {"code":-32603,"message":"Cannot navigate to invalid URL"
Check the URL that you are trying to hit.
The URL needs http:// at the start. This fixed it for me.