I am new to protractor ,as well as automation testing. I ran my conf.js file but the process terminate with below error related to chorme
error message
$$> protractor conf.js
[08:38:14] I/launcher - Running 1 instances of WebDriver [08:38:14] I/direct - Using ChromeDriver directly... **
[08:39:14] E/launcher - unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7),platform=Linux 3.10.0-1062.1.1.el7.x86_64 x86_64) [08:39:14] E/launcher - WebDriverError: unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7),platform=Linux 3.10.0-1062.1.1.el7.x86_64 x86_64)
** at Object.checkLegacyResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:546:15) at parseHttpResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13) at doSend.then.response (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:441:30) at process._tickCallback (internal/process/next_tick.js:68:7) From: Task: WebDriver.createSession() at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:769:24) at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:761:15) at Direct.getNewDriver (/usr/lib/node_modules/protractor/built/driverProviders/direct.js:77:33) at Runner.createBrowser (/usr/lib/node_modules/protractor/built/runner.js:195:43) at q.then.then (/usr/lib/node_modules/protractor/built/runner.js:339:29) at _fulfilled (/usr/lib/node_modules/protractor/node_modules/q/q.js:834:54) at /usr/lib/node_modules/protractor/node_modules/q/q.js:863:30 at Promise.promise.promiseDispatch (/usr/lib/node_modules/protractor/node_modules/q/q.js:796:13) at /usr/lib/node_modules/protractor/node_modules/q/q.js:556:49 at runSingle (/usr/lib/node_modules/protractor/node_modules/q/q.js:137:13)
[08:39:14] E/launcher - Process exited with error code 199
I have tried all possible solutions ,
From upgrading chrome to 59x version to downgrading it to 2.37 version
adding extras like below to conf.js file
directConnect: true, useAllAngular2AppRoots:true, capabilities: { browserName: 'chrome', chromeOptions: { 'args':['--no-sandbox'] } }
conf.js
exports.config = {
directConnect: true,
framework: 'jasmine',
// seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['spec.js'],
capabilities: {
browserName: 'chrome',
chromeOptions: {
'args': ['--no-sandbox']
}
},
useAllAngular2AppRoots: true
}
could someone please help me make this work.
Thank you (new to post questions on stackoverflow as well :b)
The main error here is that your chrome is failing to start a session. This happens if the chrome version being downloaded is the latest beta version. This is a bug in the latest protractor package which is being looked into for the protractor 6 release with backwards compatibility with webdriver-manager. For this you will have to fix the version of the chromedriver.
How are you running your webdriver manager update? Do not use the globally installed protractor to run your tests, use the protractor from node modules. Do the same thing when using webdriver manager update. Use a fix version like ./node_modules/protractor/bin/webdriver-manager update --standalone --versions.standalone=3.8.0 --chrome --versions.chrome=78.0.3904.97
Add this to your scripts in package.json.
Add jasmine options in your configuration file:
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 260000,
isVerbose: true,
includeStackTrace: true,
}
I don't think the latter would help but try updating the webdriver manager with the fix version and let me know how that goes.