question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Protractor fails with error code 199 on WebDriver.createSession()

See original GitHub issue

Hi 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:closed
  • Created 6 years ago
  • Reactions:15
  • Comments:41 (8 by maintainers)

github_iconTop GitHub Comments

11reactions
alexcheng1982commented, May 7, 2018

For those still have this issue, after checking the official FAQ, I fixed the issue by adding the flag --no-sandbox for Chrome 66.

3reactions
naveenBsabarescommented, Jan 8, 2021

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

`****** SERVER ALREADY STARTED ******
[14:55:30] I/launcher - Running 1 instances of WebDriver
[14:55:30] I/direct - Using ChromeDriver directly...
[14:55:30] E/launcher - spawn Unknown system error -86
[14:55:30] E/launcher - Error: spawn Unknown system error -86
    at ChildProcess.spawn (internal/child_process.js:366:11)
    at Object.spawn (child_process.js:551:9)
    at exec (/Users/naveensabares/ctp-mobile/node_modules/selenium-webdriver/io/exec.js:116:27)
    at resolveCommandLineFlags.then.args (/Users/naveensabares/ctp-mobile/node_modules/selenium-webdriver/remote/index.js:219:25)
    at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: WebDriver.createSession()
    at Function.createSession (/Users/naveensabares/ctp-mobile/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
    at Function.createSession (/Users/naveensabares/ctp-mobile/node_modules/selenium-webdriver/chrome.js:761:15)
    at Direct.getNewDriver (/Users/naveensabares/ctp-mobile/node_modules/protractor/built/driverProviders/direct.js:77:33)
    at Runner.createBrowser (/Users/naveensabares/ctp-mobile/node_modules/protractor/built/runner.js:195:43)
    at q.then.then (/Users/naveensabares/ctp-mobile/node_modules/protractor/built/runner.js:339:29)
    at _fulfilled (/Users/naveensabares/ctp-mobile/node_modules/protractor/node_modules/q/q.js:834:54)
    at /Users/naveensabares/ctp-mobile/node_modules/protractor/node_modules/q/q.js:863:30
    at Promise.promise.promiseDispatch (/Users/naveensabares/ctp-mobile/node_modules/protractor/node_modules/q/q.js:796:13)
    at /Users/naveensabares/ctp-mobile/node_modules/protractor/node_modules/q/q.js:556:49
    at runSingle (/Users/naveensabares/ctp-mobile/node_modules/protractor/node_modules/q/q.js:137:13)
[14:55:30] E/launcher - Process exited with error code 199

Process finished with exit code 199
`
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found