protractor: Error: spawn Unknown system error -86 - In Protractor Test run

Hi there!

Thanks for submitting an issue to Protractor.

To help us help you better, please do the following before submitting an issue:

  1. Review the questions section of CONTRIBUTING.md.
  2. Make sure you are not asking a usage or debugging question. If you are, use StackOverflow, Google Group discussion list, or Gitter to get help.
  3. Provide a minimally reduced test case. This makes it much more likely that your bug will be fixed. Protractor has a test Angular application available at http://www.protractortest.org/testapp which you can use for the reproducible test case.
  4. Fill in the information that corresponds to your type of issue below.
  5. Delete this intro and any unrelated text 😄 (if you do not we’ll assume you haven’t read these instructions and automatically close the issue.)

Bug report

  • Node Version: v10.16.3

  • Protractor Version: 7.0.0

  • Angular Version: ``

  • Browser(s): chrome

  • Operating System and Version MAC OS CATALINA 10.15.6

  • Your protractor configuration file `exports.config = { params: { host: hostAddress, env: ‘DEV’, },

    directConnect: true, noGlobals: true,

    getPageTimeout: 60000, allScriptsTimeout: 9000000,

    jasmineNodeOpts: { showColors: true, isVerbose: true, defaultTimeoutInterval: 120000, },

    multiCapabilities: [capabilityBuilder.generateCapability(args.notHeadless ? undefined : ‘headless’)], Capability File - const FLAGS = { normal: [‘–window-size=375,812’, ‘pixelRatio=3’, ‘–mute-audio’], headless: [‘–headless’, ‘–disable-gpu’, ‘–window-size=375,812’, ‘pixelRatio=3’, ‘–mute-audio’], };

/**

  • @class CapabilityBuilder / module.exports = class CapabilityBuilder { /*
    • Generate a capability

    • Protractor configuration reference: https://github.com/angular/protractor/blob/master/lib/config.ts

    • Chrome argument reference: https://peter.sh/experiments/chromium-command-line-switches/

    • @param params {Array}

    • @return {{browserName: string, shardTestFiles: *, maxInstances: *, chromeOptions: {mobileEmulation: {deviceName: string}, args: Array}}} */ generateCapability(runner = ‘normal’) { if (!FLAGS[runner]) { throw new Error(Runner is not available: ${runner}); }

      const params = FLAGS[runner]; return { browserName: ‘chrome’, shardTestFiles: runConfig.shardTestFiles, maxInstances: runConfig.maxInstances, ‘goog:chromeOptions’: { mobileEmulation: { deviceName: ‘iPhone 8’, }, args: params, }, }; }

`

  • A relevant example test
  • Output from running the test `/Users/naveensabares/.nvm/versions/node/v10.16.3/bin/node /Users/naveensabares/ctp-mobile/node_modules/protractor/bin/protractor /Applications/WebStorm.app/Contents/plugins/JavaScriptLanguage/helpers/protractor-intellij/lib/protractor-intellij-config.js --intellijOriginalConfigFile=/Users/naveensabares/ctp-mobile/tests/protractor/config/protractor.acceptance.conf.js --disableChecks ****** SERVER ALREADY STARTED ****** [15:06:29] I/launcher - Running 1 instances of WebDriver [15:06:29] I/direct - Using ChromeDriver directly… [15:06:29] E/launcher - spawn Unknown system error -86 [15:06:29] 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) [15:06:29] E/launcher - Process exited with error code 199

Process finished with exit code 199 `

  • Steps to reproduce the bug
  • The URL you are running your tests against (if relevant)

Feature Request

  • Reasons for adopting new feature
  • Is this a breaking change? (How will this affect existing functionality)

The below driver versions were working fine until last December. However the test throws the above error

 webdriver-manager status
[15:29:21] I/status - selenium standalone version available: 3.141.59 [last]
[15:29:21] I/status - chromedriver version available: 87.0.4280.88 [last]
[15:29:21] I/status - geckodriver version available: v0.28.0 [last]
[15:29:21] I/status - android-sdk is not present
[15:29:21] I/status - appium is not present

Chrome browser version - Version 87.0.4280.141 (Official Build) (x86_64)

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 13
  • Comments: 16

Most upvoted comments

There is an update of webdriver manager - 12.1.8. which fixes this issue. So we need to bump up the version of web driver manager

npm install --save-dev webdriver-manager@12.1.8

Unfortunately even this isn’t fixing the issue for me. I’m on Catalina 10.15.7. webdriver-manager: using local installed version 12.1.8

…

[chrome #01-2] [11:08:39] I/direct - Using ChromeDriver directly...
[chrome #01-2] Error: spawn Unknown system error -86
[chrome #01-2]     at ChildProcess.spawn (internal/child_process.js:408:11)
[chrome #01-2]     at Object.spawn (child_process.js:553:9)
[chrome #01-2]     at exec (/Users/snip/Projects/EM/eop-web/packages/web/node_modules/selenium-webdriver/io/exec.js:116:27)
[chrome #01-2]     at /Users/cward/Projects/EM/eop-web/packages/web/node_modules/selenium-webdriver/remote/index.js:219:25
[chrome #01-2]     at processTicksAndRejections (internal/process/task_queues.js:97:5)
[chrome #01-2] From: Task: WebDriver.createSession()
[chrome #01-2]     at Function.createSession (/Users/cward/Projects/EM/eop-web/packages/web/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
[chrome #01-2]     at Function.createSession (/Users/cward/Projects/EM/eop-web/packages/web/node_modules/selenium-webdriver/chrome.js:761:15)
[chrome #01-2]     at Direct.getNewDriver (/Users/cward/Projects/EM/eop-web/packages/web/node_modules/protractor/built/driverProviders/direct.js:77:33)
[chrome #01-2]     at Runner.createBrowser (/Users/cward/Projects/EM/eop-web/packages/web/node_modules/protractor/built/runner.js:195:43)
[chrome #01-2]     at /Users/cward/Projects/EM/eop-web/packages/web/node_modules/protractor/built/runner.js:339:29
[chrome #01-2]     at _fulfilled (/Users/cward/Projects/EM/eop-web/packages/web/node_modules/protractor/node_modules/q/q.js:834:54)
[chrome #01-2]     at /Users/cward/Projects/EM/eop-web/packages/web/node_modules/protractor/node_modules/q/q.js:863:30
[chrome #01-2]     at Promise.promise.promiseDispatch (/Users/cward/Projects/EM/eop-web/packages/web/node_modules/protractor/node_modules/q/q.js:796:13)
[chrome #01-2]     at /Users/cward/Projects/EM/eop-web/packages/web/node_modules/protractor/node_modules/q/q.js:556:49
[chrome #01-2]     at runSingle (/Users/cward/Projects/EM/eop-web/packages/web/node_modules/protractor/node_modules/q/q.js:137:13)

There is an update of webdriver manager - 12.1.8. which fixes this issue. So we need to bump up the version of web driver manager

And

This has been published 12.1.8. After updating to version 12.1.8, you will need to run webdriver-manager clean before running webdriver-manager update

https://github.com/angular/webdriver-manager/issues/476#issuecomment-757357048

To fix, update webdriver-manager to latest version:

npm install --save-dev webdriver-manager@12.1.8
webdriver-manager clean
webdriver-manager update

(updating protractor alone did not fix the issue for me)

I opened a PR in which I’d like to update the webdriver-manager version to the latest fix, but CI builds fail. It seems to be that these are environmental issues. Could someone with more experience take a look? This is my first PR here. 😃

This is the PR: #5487

@deepaksrgm2010 yes, now it’s working but additional using of npm install --force protractor is needed - https://github.com/angular/webdriver-manager/issues/476#issuecomment-757675979

As a temporary fix you can:

  • stop using webdriver manager update command,
  • replace both .zip and extracted Chromedriver file in ‎⁨/⁨node_modules⁊/⁨protractor⁊/⁨node_modules⁊/⁨webdriver-manager⁊/selenium⁊ with Chromedriver file downloaded directly from the website.

Works like a charm!