While iam run the program iin chrome using selenium webdriver, iam redirecting to this error. please give suggestions..Thanks - selenium-chromedriver

Starting ChromeDriver 80.0.3987.106 (f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987#{#882}) on port 37201
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 80
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'DELL', ip: '192.168.43.201', os.name: 'Windows 8', os.arch: 'amd64', os.version: '6.2', java.version: '1.8.0_221'
Driver info: driver.version: ChromeDriver
remote stacktrace: Backtrace:Ordinal0 [0x01510C83+1707139]
Ordinal0 [0x014768F1+1075441]
Ordinal0 [0x013EDFC9+516041]
Ordinal0 [0x01380554+66900]

The version of google chrome browser on your system should be same as your chrome driver version.
Goto Google Chrome -> Help -> About Google Chrome to check chrome version.
Then download the same version chromedriver from here: https://chromedriver.chromium.org/downloads

Related

org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 111 error with Selenium

I am sure that my tests are working correctly. When I run the code I got the error in terminal like,
Scenario: User adds new quick work order to employee from website # src/test/java/Features/5NewQuickJobOrder.feature:12
Starting ChromeDriver 111.0.5563.19 (378a38865270d286695aeb86f190564911ef7bc2-refs/branch-heads/5563#{#251}) on port 4290
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 111
Current browser version is 110.0.5481.97 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-CONJ3EC', ip: '192.168.1.27', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '19.0.2'
Driver info: driver.version: ChromeDriver
Recently Chrome updates itself and my version is now 110.0.5481.97. But somehow it tries the run the test with version 111 shows below. I have no version in my computer such that starts with 111..
Scenario: User adds new quick work order to employee from website # src/test/java/Features/5NewQuickJobOrder.feature:12
Starting ChromeDriver 111.0.5563.19 (378a38865270d286695aeb86f190564911ef7bc2-refs/branch-heads/5563#{#251}) on port 40758
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
I do not use any chromedriver exe in my project folder, I directly use setup and driver intsance.
public static WebDriver initialize_Driver(String browser) {
properties = ConfigReader.getProperties();
if (browser.equals("Chrome")) {
WebDriverManager.chromedriver().setup();
driver = new ChromeDriver();
}
#Before
public void before() {
String browser = Reporter.getCurrentTestResult().getTestContext().getCurrentXmlTest().getParameter("browser");
properties = ConfigReader.initialize_Properties();
driver = DriverCreater.initialize_Driver(browser);
}
I will be very glad, if you could help me!
First the solution
To instantiate a specific browser version of ChromeDriver you can use:
WebDriverManager.chromedriver().driverVersion("111.0.5563.19").setup();
Details
This error message...
org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 111
...implies that SessionNotCreatedException was raised as ChromeDriver was unable to spawn a new Browsing Context i.e. google-chrome session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You are using chrome=110.0.5481.97
But you are using chromedriver=111.0.5563.19
Release Notes of chromedriver=111.0 clearly mentions the following :
Supports Chrome version 111
So there is a clear mismatch between chromedriver=111.0 and the chrome=110.0
Solution
Ensure that:
ChromeDriver is downgraded to ChromeDriver v110.0 level.
Chrome Browser is updated to current chrome=110.0 (as per chromedriver=110.0 release notes).
Selenium is upgraded to current released Version 4.8.0.

Chrome failed to start: crashed. (unknown error: DevToolsActivePort file doesn't exist) after upgrade to chrome 93.0.4577.63

This issue started after upgrade to 93.0.4577.63
I tried going back to chromedriver v 92.0.4515.107 but encountered the same issue.
I tried several fixes from similar posts (much older posts) like using --no-sandbox and other flags but no luck. Anyone else seeing this ?
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: crashed.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location C:\Program Files (x86)\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: '', ip: '192.168.0.146', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.8'
Driver info: driver.version: ECWebDriver
remote stacktrace: Backtrace:
Ordinal0 [0x00672A33+2501171]
Ordinal0 [0x0060D1C1+2085313]
Ordinal0 [0x00511FA8+1056680]
Ordinal0 [0x0052D07C+1167484]
Ordinal0 [0x0052997F+1153407]
Ordinal0 [0x0055999F+1350047]
Ordinal0 [0x0055960A+1349130]
Ordinal0 [0x0055551B+1332507]
Ordinal0 [0x00531D74+1187188]
Ordinal0 [0x00532BD9+1190873]
GetHandleVerifier [0x007EEFE6+1504438]
GetHandleVerifier [0x0089DDA5+2220661]
GetHandleVerifier [0x006F5589+481881]
GetHandleVerifier [0x006F4639+477961]
Ordinal0 [0x006128BD+2107581]
Ordinal0 [0x00616728+2123560]
Ordinal0 [0x00616862+2123874]
Ordinal0 [0x0061FA81+2161281]
BaseThreadInitThunk [0x75BCFA29+25]
RtlGetAppContainerNamedObjectPath [0x77427A7E+286]
RtlGetAppContainerNamedObjectPath [0x77427A4E+238]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:181)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:168)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:157) ```
For the Chrome Web driver to function it needs to be compatible with the version of Chrome installed on the machine that you are executing.
Please go to https://chromedriver.chromium.org/downloads and download the ChromeDriver version compatible with the Chrome installation on your machine. For the version, you mentioned it will be ChromeDriver 93.0.4577.15.
Guess in the wild, because that was our problem:
We started with some options, then converted them via capabilities = options.to_capabilities() and then we initialized Chrome only with those capabilities. But somehow you now have to also provide the original options to take effect.
So instead of
driver = Chrome(desired_capabilities=capabilities)
we now have to do
driver = Chrome(options=options, desired_capabilities=capabilities)

Chromedriver 2.36 with chrome v65 giving exception

I have recently updated ChromeDriver to 2.36 after chrome was auto updated to v65.
But on running test now i am getting below exceptions
Starting ChromeDriver 2.36.540470 (e522d04694c7ebea4ba8821272dbef4f9b818c91) on port 10482
Only local connections are allowed.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: failed to write automation extension zip
(Driver info: chromedriver=2.36.540470 (e522d04694c7ebea4ba8821272dbef4f9b818c91),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 218 milliseconds
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z'
System info: host: '172.16.27.222', ip: '172.16.123.114', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_77'
Driver info: driver.version: ChromeDriver
Have tried both chromeOptions & DesiredCapabilties
ChromeOptions o = new ChromeOptions();
o.addArguments("disable-extensions");
o.addArguments("--start-maximized");
ChromeDriver chromeDriver = new ChromeDriver(o);
return chromeDriver;
Also tried below method :
ChromeDriver chromeDriver = new ChromeDriver(capabilities);
chromeDriver.manage().window().maximize();
The error says it all :
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: failed to write automation extension zip
(Driver info: chromedriver=2.36.540470 (e522d04694c7ebea4ba8821272dbef4f9b818c91),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 218 milliseconds
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z'
System info: host: '172.16.27.222', ip: '172.16.123.114', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_77'
Driver info: driver.version: ChromeDriver
It is clear from your error stack trace that the driver.version is not getting recognized.
Your main issue is the version compatibility between the binaries you are using as follows :
You are using chromedriver=2.36
You are using chrome=65.0 (as per your question)
You are using Selenium Client v3.11.0
Your JDK version is 1.8.0_77 which is pretty ancient.
So there is a clear mismatch between the JDK v8u77 , Selenium Client v3.11.0 , ChromeDriver version (v2.36) and the Chrome Browser version (v65.0)
Solution
Upgrade JDK to recent levels JDK 8u162.
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
If your base Chrome version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Chrome.
Execute your #Test.
Additional Considerations
If you intend to use ChromeDriver and Chrome Browser, while initializing the WebDriver instance instead of using the ChromeDriver implementation use the WebDriver interface as follows :
WebDriver chromeDriver = new ChromeDriver(o);
If you intend to maximize the browser window, instead of using chromeDriver.manage().window().maximize(); use the ChromeOptions instance as follows :
ChromeOptions options = new ChromeOptions();
options.addArguments("start-maximized");
Here are the arguments I use:
ArrayList<String> args = new ArrayList<String>();
args.add("enable-automation");
args.add("test-type=browser");
args.add("disable-plugins");
args.add("disable-infobars");
args.add("disable-extensions");
options.put("args", args);
I think you need to at least add the "enable-automation" argument.

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"]

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.