Search code examples
angularselenium-webdrivernpmdependenciesprotractor

How to update webdriver-manager (spawn Unknown system error -86)


(Angular). webdriver-manager 12.1.7 has known issues on intel based Macs. Running e2e tests we get the following error: spawn Unknown system error -86. This bug has been fixed in webdriver-manager 12.1.8 but I'm unable to update.

I've tried the solutions listed here (reinstalling Protractor, etc): OSX fix Selenium Chromedriver launch error spawn Unknown system error -86 Bad CPU type in executable?

However, after uninstalling and re-installing protractor, nothing changes. When I look in package-lock.json, it appears that we're still using webdriver-manager 12.1.7 rather than the desired 12.1.8. How can I force update webdriver-manager from 12.1.7 to 12.1.8? We have an npm run webdriver-update command which calls webdriver-manager update --standalone false --gecko false - this too fails to change the version (if I'm reading package-lock.json correctly).

package-lock.json

"node_modules/protractor": {
  "version": "7.0.0",
 },
  "dependencies": {
    "webdriver-manager": "^12.1.7",
 },
 "bin": {
    "protractor": "bin/protractor",
    "webdriver-manager": "bin/webdriver-manager"
     }

....


"protractor": {
   "version": "7.0.0",
 },
"dependencies": {
    "webdriver-manager": {
      "version": "12.1.7",
      "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.1.7.tgz",
    }
  }

Solution

  • Looks like v7.0.0 is set to use webdriver-manager v12.1.7 in the package.json for protractor. So that would be why it's not updating to 12.1.8. You can see it listed as a dependency here.

    You can try doing something like what I posted on this answer to a similar question.

    Basically, switch to your ./node_modules/protractor folder, run npm i webdriver-manager@12.1.8, then switch back to app root and run webdriver-manager update. It should pull in all the right drivers for you.


    Another solution you could try is to just delete the package-lock.json file from your directory and run npm install again. It may pull down the version you are looking for. The lock file will get recreated and it may update the webdriver-manager version.