Protractor fails with error code 199 on WebDriver.createSession()
See original GitHub issueHi guys. I am using angular-cli and protractor fails to run my tests. I am sitting behind a corporate proxy which I add as a param when updating the webdriver. This is the output I get:
$ ./node_modules/.bin/webdriver-manager update --proxy=proxy_url_here
[15:11:28] I/update - selenium standalone: file exists C:\Users\g8uibf\Projects\mbsportal-ui\node_modules\protractor\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.4.0.jar
[15:11:28] I/update - selenium standalone: selenium-server-standalone-3.4.0.jar up to date
[15:11:28] E/downloader - undefined
[15:11:28] I/update - geckodriver: file exists C:\Users\g8uibf\Projects\mbsportal-ui\node_modules\protractor\node_modules\webdriver-manager\selenium\geckodriver-v0.17.0.zip
[15:11:28] I/update - geckodriver: unzipping geckodriver-v0.17.0.zip
(node:12156) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Invalid filename
[15:11:28] I/update - chromedriver: unzipping chromedriver_2.30.zip
$ ./node_modules/.bin/protractor ./protractor.conf.js
[15:26:13] I/launcher - Running 1 instances of WebDriver
[15:26:13] I/direct - Using ChromeDriver directly...
[15:26:15] E/launcher - spawn UNKNOWN
[15:26:15] E/launcher - Error: spawn UNKNOWN
at exports._errnoException (util.js:1022:11)
at ChildProcess.spawn (internal/child_process.js:313:11)
at Object.exports.spawn (child_process.js:380:9)
at exec (C:\Users\g8uibf\Projects\mbsportal-ui\node_modules\selenium-webdriver\io\exec.js:116:27)
at resolveCommandLineFlags.then.args (C:\Users\g8uibf\Projects\mbsportal-ui\node_modules\selenium-webdriver\remote\index.js:219:25)
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
at Function.createSession (C:\Users\g8uibf\Projects\mbsportal-ui\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
at Function.createSession (C:\Users\g8uibf\Projects\mbsportal-ui\node_modules\selenium-webdriver\chrome.js:709:29)
at Direct.getNewDriver (C:\Users\g8uibf\Projects\mbsportal-ui\node_modules\protractor\lib\driverProviders\direct.ts:90:25)
at Runner.createBrowser (C:\Users\g8uibf\Projects\mbsportal-ui\node_modules\protractor\lib\runner.ts:225:39)
at q.then.then (C:\Users\g8uibf\Projects\mbsportal-ui\node_modules\protractor\lib\runner.ts:391:27)
at _fulfilled (C:\Users\g8uibf\Projects\mbsportal-ui\node_modules\protractor\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\g8uibf\Projects\mbsportal-ui\node_modules\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\g8uibf\Projects\mbsportal-ui\node_modules\protractor\node_modules\q\q.js:796:13)
at C:\Users\g8uibf\Projects\mbsportal-ui\node_modules\protractor\node_modules\q\q.js:556:49
at runSingle (C:\Users\g8uibf\Projects\mbsportal-ui\node_modules\protractor\node_modules\q\q.js:137:13)
[15:26:15] E/launcher - Process exited with error code 199
- Node Version:
v6.9.5
- Protractor Version:
5.1.2
- Angular Version:
4
- Browser(s):
chrome 58
- Operating System and Version
Windows 10
- Your protractor configuration file
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:8080/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
Thank you for the help in advance!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:15
- Comments:41 (8 by maintainers)
Top Results From Across the Web
launching Protractor fails and exited with error code #199
this happens when multiple user using same remote machine followed by same Selenium server. As the other person quits the server ...
Read more >test automation framework - Unable to run protractor script
tmpDir() is deprecated. Use os.tmpdir() instead. Warning: Tests failed, protractor exited with code: 199 Use --force to continue.
Read more >angular/protractor - Gitter
[06:19:22] I/local - Selenium standalone server started at http://1XX.30.31.XXX:XXXXX/wd/hub [06:19:23] E/launcher - unknown error: Chrome failed to start: ...
Read more >Protractor : Unable to parse new session response / Process ...
C:\Users\jayashanig\Documents\PD\protractor\tutorial>protractor conf.js ... [10:02:39] E/launcher - Process exited with error code 199 ...
Read more >Having issues getting Protractor up and running : r/angularjs
Sounds like Protractor is still trying to find Selenium Server. ... [11:30:45] E/launcher - Process exited with error code 199.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For those still have this issue, after checking the official FAQ, I fixed the issue by adding the flag
--no-sandbox
for Chrome 66.Hi Team, Even i am facing the issue webdriver-manager status
[14:56:47] I/status - selenium standalone version available: 3.141.59 [last] [14:56:47] I/status - chromedriver version available: 87.0.4280.88 [last] [14:56:47] I/status - geckodriver version available: v0.28.0 [last] [14:56:47] I/status - android-sdk is not present [14:56:47] I/status - appium is not present