protractor
protractor copied to clipboard
Unknown error: Chrome failed to start: exited abnormally, Process exited with error code 199
Env: node: 8.5.0; npm: 5.3.0; protractor: 5.2.2; chromedriver: 2.35.528139, Google Chrome 63.0.3239.132 angular: ├── @angular-devkit/core @0.0.28 ├── @angular/[email protected] ├── UNMET PEER DEPENDENCY @angular/[email protected] ├── UNMET PEER DEPENDENCY @angular/[email protected] ├── @angular/[email protected] ├── UNMET PEER DEPENDENCY @angular/[email protected] ├── @angular/[email protected] ├── UNMET PEER DEPENDENCY @angular/[email protected] ├── @angular/[email protected] ├── @angular/[email protected] ├── @angular/[email protected] ├── @angular/[email protected]
os: linux 16.4,
protractor.config.js below
exports.config = {
allScriptsTimeout: 11000,
specs: [
'e2e/**/*.js'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:3000/',
framework: 'jasmine2',
onPrepare: function() {
var jasmineReporters = require('jasmine-reporters');
// If we are running via circleci, then use the CIRCLE_TEST_REPORTS output directory.
var outputDir = "test/test_out";
if (process.env.CIRCLE_TEST_REPORTS) {
outputDir = process.env.CIRCLE_TEST_REPORTS;
}
console.log("Logging Protractor JUnit output to " + outputDir);
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
consolidateAll: true,
savePath: outputDir,
filePrefix: 'protractor-xmloutput'
}));
},
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
error here
[09:47:20] E/launcher - unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.26.436382 (70eb799287ce4c2208441fc057053a5b07ceabac),platform=Linux 4.4.0-36-generic x86_64)
[09:47:20] E/launcher - WebDriverError: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.26.436382 (70eb799287ce4c2208441fc057053a5b07ceabac),platform=Linux 4.4.0-36-generic x86_64)
at Object.checkLegacyResponse (/var/lib/postgresql/carepilot-web/node_modules/selenium-webdriver/lib/error.js:505:15)
at parseHttpResponse (/var/lib/postgresql/carepilot-web/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/var/lib/postgresql/carepilot-web/node_modules/selenium-webdriver/lib/http.js:440:13)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
From: Task: WebDriver.createSession()
at Function.createSession (/var/lib/postgresql/carepilot-web/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
at Function.createSession (/var/lib/postgresql/carepilot-web/node_modules/selenium-webdriver/chrome.js:709:29)
at Direct.getNewDriver (/var/lib/postgresql/carepilot-web/node_modules/protractor/lib/driverProviders/direct.ts:90:25)
at Runner.createBrowser (/var/lib/postgresql/carepilot-web/node_modules/protractor/lib/runner.ts:187:39)
at driverprovider_.setupEnv.then (/var/lib/postgresql/carepilot-web/node_modules/protractor/lib/runner.ts:279:27)
at _fulfilled (/var/lib/postgresql/carepilot-web/node_modules/protractor/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/var/lib/postgresql/carepilot-web/node_modules/protractor/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/var/lib/postgresql/carepilot-web/node_modules/protractor/node_modules/q/q.js:796:13)
at /var/lib/postgresql/carepilot-web/node_modules/protractor/node_modules/q/q.js:556:49
at runSingle (/var/lib/postgresql/carepilot-web/node_modules/protractor/node_modules/q/q.js:137:13)
[09:47:20] E/launcher - Process exited with error code 199
I run command node_modules/.bin/protractor test/e2e/ui_test/protractor_conf_chrome/protractor.conf.js locally, it is ok, but it throw error when i run remote env; I run chromedrive and chrome manully, they are work, but chromdrive start chrome throw error.
What's the matter? Can any one give some suggestion? Many thanks!
Which version of Chrome? Are you using the latest ChromeDriver?
+1
webdriver-manager update [19:14:08] I/update - chromedriver: unzipping chromedriver_2.35.zip [19:14:08] I/update - chromedriver: setting permissions to 0755 for /home/centos/.nvm/versions/node/v9.4.0/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.35 [19:14:12] I/update - geckodriver: unzipping geckodriver-v0.19.1.tar.gz [19:14:12] I/update - geckodriver: setting permissions to 0755 for /home/centos/.nvm/versions/node/v9.4.0/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.19.1
[centos@ip-172-30-2-252 ~]$ webdriver-manager version [19:13:05] I/version - webdriver-manager 12.0.6
google-chrome-stable-64.0.3282.119-1.x86_64.rpm
installed via yum in centos 7
@surfjedi but which version of the Chrome WebDriver?
chromedriver_2.35.zip
both chromedriver_2.35.zip and chromedriver_2.26linux64.zip not work...
Yeah, having a similar issue here, its incredibly frustrating to have to deal with logs that don't mean anything. (Not trying to blame anyone from protractor here, there's a whole lot of components involved, I'm just frustrated because I want to understand but I have looked around for ages and I don't understand what's going on)
OS: Ubuntu 16.04 LTS 64 bit
node version: 8.9.4
protractor version: 5.2.2
chrome version: 64.0.3282.119
chrome driver version: 2_35
selenium version: selenium-server-standalone-3.8.1.jar
Any idea where I could look to get a more detailed answer ? I want to debug but everytime I try to start protractor I see (running node with DEBUG=*) :
[14:30:12] I/launcher - Running 1 instances of WebDriver
[14:30:12] I/local - Starting selenium standalone server...
[14:30:12] E/launcher - Error: Error: spawn ENOTDIR
at _errnoException (util.js:1022:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at Object.exports.spawn (child_process.js:502:9)
at exec ([redacted]/node_modules/selenium-webdriver/io/exec.js:116:27)
at resolveCommandLineFlags.then.args ([redacted]/node_modules/selenium-webdriver/remote/index.js:219:25)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
[14:30:13] E/launcher - Process exited with error code 100
error Command failed with exit code 100.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Interesting, it seems the issue is with selenium-webdriver. When the executable is called in this file node_modules/selenium-webdriver/remote/index.js it uses the wrong path to call java.
Executable called is "/usr/bin/java/bin/java" when it should be "/usr/bin/java"
edit : I had JAVA_HOME set to /usr/bin/java in my ~/.profile, unsetting this variable solved the issue for me.
I forced some logging as such to figure it out, and then called the executable manually with the arguments logged and got "no such directory" for the path:
# Line start: 201
start(opt_timeoutMs) {
if (this.address_) {
return this.address_;
}
var timeout = opt_timeoutMs || DriverService.DEFAULT_START_TIMEOUT_MS;
var self = this;
let resolveCommand;
this.command_ = new Promise(resolve => resolveCommand = resolve);
this.address_ = new Promise((resolveAddress, rejectAddress) => {
resolveAddress(Promise.resolve(this.port_).then(port => {
if (port <= 0) {
throw Error('Port must be > 0: ' + port);
}
return resolveCommandLineFlags(this.args_).then(args => {
console.log('############################################');
console.log(`Executable is ${JSON.stringify(self.executable_)}`);
console.log(`Args are ${JSON.stringify(args)}`);
console.log(`Env is is ${JSON.stringify(self.env_)}`);
console.log(`Stdio is ${JSON.stringify(self.stdio_)}`);
console.log('############################################');
var command = exec(self.executable_, {
args: args,
env: self.env_,
stdio: self.stdio_
});
resolveCommand(command);
[....] # Rest of the method code ...
+1
Exact same error...what is the fix for this. Unknown error: Chrome failed to start: exited abnormally, sql/carepilot-web/node_modules/protractor/node_modules/q/q.js:137:13) [09:47:20] E/launcher - Process exited with error code 199
+1
+1
+1
+1
+1