protractor
protractor copied to clipboard
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:
- Review the questions section of CONTRIBUTING.md.
- 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.
- 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/testappwhich you can use for the reproducible test case. - Fill in the information that corresponds to your type of issue below.
- Delete this intro and any unrelated text :smile: (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)
I have exact same problem. Looks like it's related to this issue: https://github.com/angular/webdriver-manager/issues/476
Same issue here too. On macOS Big Sur
[19:35:19] I/launcher - Running 1 instances of WebDriver [19:35:19] I/direct - Using ChromeDriver directly... [19:35:19] E/runner - Unable to start a WebDriver session. [19:35:19] E/launcher - Error: 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/userName/ProjectsFolders/ProjectName/node_modules/selenium-webdriver/io/exec.js:116:27) at resolveCommandLineFlags.then.args (/Users/userName/ProjectsFolders/ProjectName/node_modules/selenium-webdriver/remote/index.js:219:25) at process._tickCallback (internal/process/next_tick.js:68:7) [19:35:19] E/launcher - Process exited with error code 100
I am also facing the same issue on Mac Catalina

As a temporary fix you can:
- stop using
webdriver manager updatecommand, - replace both .zip and extracted Chromedriver file in
/node_modules/protractor/node_modules/webdriver-manager/seleniumwith Chromedriver file downloaded directly from the website.
Works like a charm!
@gabegolla Can you explain a bit more.
I did drop the mac https://chromedriver.storage.googleapis.com/index.html?path=87.0.4280.88/ file, into node_modules/protractor/node_modules/webdriver-manager/selenium like what you said.
It still complains :
Could not find chromedriver at /Users/aaksngh/workplace/lamps/src/AFTLMSStaticWebsite/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_87.0.4280.141
Is there another file (binary perhaps?) that I need to drop in that folder other than the ZIP file ?
@AakashIsTheLimit Just follow this temporary workaround - https://github.com/angular/webdriver-manager/issues/476#issuecomment-755978392
@AakashIsTheLimit folder should contain both .zip and extracted Chromedriver file.
@AakashIsTheLimit Just follow this temporary workaround - angular/webdriver-manager#476 (comment)
Yes. This did help. But I have to mention that I had also to update protractor once again via npm install --force protractor, otherwise error remains same.
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
@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
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
I had the same problem this morning with protractor v5.4.2. Upgrading to the latest (v5.4.3) fixed it for me.
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 cleanbefore runningwebdriver-manager update
https://github.com/angular/webdriver-manager/issues/476#issuecomment-757357048
To fix, update webdriver-manager to latest version:
npm install --save-dev [email protected]
webdriver-manager clean
webdriver-manager update
(updating protractor alone did not fix the issue for me)
npm install --save-dev [email protected]
This fixed the problem for me on its own with no other action
npm install --save-dev [email protected]
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)
npm install --save-dev [email protected]
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)
Facing the same issue I'm also on Catalina 10.15.7.