webdriver-manager: Error for missing update-config.json does not resolve the issue

When I receive this error:

------------------
protractor.conf.js
------------------
[14:22:08] E/local - Error code: 135
[14:22:08] E/local - Error message: No update-config.json found. Run 'webdriver-manager update' to download binaries.
[14:22:08] E/local - Error: No update-config.json found. Run 'webdriver-manager update' to download binaries.
    at IError (project-dir/node_modules/protractor/built/exitCodes.js:5:1)
    at ProtractorError (project-dir/node_modules/protractor/built/exitCodes.js:10:9)
    at BrowserError (project-dir/node_modules/protractor/built/exitCodes.js:51:9)
    at Local.addDefaultBinaryLocs_ (project-dir/node_modules/protractor/built/driverProviders/local.js:40:23)
    at Local.setupDriverEnv (project-dir/node_modules/protractor/built/driverProviders/local.js:82:14)
    at Local.setupEnv (project-dir/node_modules/protractor/built/driverProviders/driverProvider.js:98:34)
    at Runner.run (project-dir/node_modules/protractor/built/runner.js:238:37)
    at TaskRunner.run (project-dir/node_modules/protractor/built/taskRunner.js:109:27)
    at createNextTaskRunner (project-dir/node_modules/protractor/built/launcher.js:234:28)
    at helper.runFilenameOrFn_.then.then.then (project-dir/node_modules/protractor/built/launcher.js:259:13)
[14:22:08] E/launcher - Process exited with error code 135

I can run the suggested webdriver-manager update command and get the following:

[14:27:20] I/update - chromedriver: file exists /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.32.zip
[14:27:20] I/update - chromedriver: unzipping chromedriver_2.32.zip
[14:27:21] I/update - chromedriver: setting permissions to 0755 for /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.32
[14:27:21] I/update - chromedriver: chromedriver_2.32 up to date
[14:27:21] I/update - selenium standalone: file exists /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.5.3.jar
[14:27:21] I/update - selenium standalone: selenium-server-standalone-3.5.3.jar up to date
[14:27:21] I/update - geckodriver: file exists /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.18.0.tar.gz
[14:27:21] I/update - geckodriver: unzipping geckodriver-v0.18.0.tar.gz
[14:27:22] I/update - geckodriver: setting permissions to 0755 for /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.18.0
[14:27:22] I/update - geckodriver: geckodriver-v0.18.0 up to date

and end up just repeating the process.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 17
  • Comments: 29 (4 by maintainers)

Commits related to this issue

Most upvoted comments

@danielwashbrook 's comment was helpful to me. Essentially, it seems that the error happens because you update webdriver at the system level, but not the one used internally by protractor. Try which webdriver-manager to see which one you run by default. To update specifically the one used by Protractor, you have to specify the path explicitly, like for example (starting from the root directory of your repo): ./node_modules/protractor/bin/webdriver-manager update --versions.chrome 2.35 The version argument is optional, running without it will update to the latest version.

I ran into the same error you’re referring to. What I found was webdriver-manager was installed in a few different places. If you installed it explicitly with npm, it’s in your path. But protractor also installs it in it’s own node_modules and that’s the one that’s looking for the config. So you need to run the update on the version in the protractor module and then start that same version for protractor to connect to.

@danielwashbrook that was it for me. Once I ran $ ./node_modules/protractor/node_modules/webdriver-manager/bin/webdriver-manager update

Then protractor worked. Thanks!

Please make sure to install npm install protractor

Update web driver manager webdriver-manager update

Run this command from your root node node_modules\protractor\bin\webdriver-manager update

Now start up a server with: webdriver-manager start

Also make sure that your protractor.conf.js file has below line // baseUrl: 'http://localhost:4200/', seleniumAddress: 'http://localhost:4444/wd/hub/',

Now run your e2e tests on different browsers ng e2e

This is not an issue with webdriver-manager…it looks like you are confusing the local node modules directory with global. Protractor is looking for the local file update-config.json in the local project node modules directory. The binaries should be installed in:project-dir/node_modules/protractor/node_modules/webdriver-manager/selenium/. I just answered this question on StackOverflow. See:

https://stackoverflow.com/questions/42426549/protractor-in-sts-ide-could-not-find-update-config-json/42453067#42453067

Run >>> npx webdriver-manager update It should fix the issue!!

Great guys!!! I can confirm this on travis as well https://travis-ci.com/jsGanttImproved/jsgantt-improved/builds/95386323

i added this on travis.yml

install:
  - npm install
  - ./node_modules/protractor/bin/webdriver-manager update --versions.chrome 2.35

Thanks

When running Protractor with directConnect, we refer to the latest on the update-config.json. So how can we side step the whole problem for Protractor? Before we talk about the two examples, the magic is to override the chromeDriver path. You can see that we check the chromeDriver path from the config before considering to use the update-config.json (angular/protractor driverProvider/direct.ts#63)

Running into a GitHub API limit

Some final thoughts on this. Webdriver-manager can hit a GitHub API limit which can be problematic on CI. Possibly the solution is to follow the next step about how to use a global install. If you do not have to run FireFox, then you could add the flag --gecko false when calling update.

Using a global install of webdriver-manager could help

In an environment like Jenkins, you could run a global webdriver-manager update. After you run it once, you could read the global webdriver-manager update-config.json. From the content, you could parse out the latest chromedriver path, and pass it to the protractor command line with protractor yourconfig.js --chromeDriver=/looked/up/path/to/chromedriver.

Completely side step webdriver-manager and wget

In an environment you do not control, you might want a specific chromedriver version, you could just do a wget on the chromedriver. The list of chromedriver versions is here: https://chromedriver.storage.googleapis.com/index.html. From there you could still pass the path to the chromedriver to Protractor via command line.

@nishankkumar1994 node ./node_modules/protractor/bin/webdriver-manager update

In my case the error happens because of custom copy of protractor module inside grunt-protractor-runner (./node_modules/grunt-protractor-runner/node_modules/protractor/bin/webdriver-manager).

Run >>> sudo node_modules/protractor/bin/webdriver-manager update and then it should work

Thanks @SebastianKristof! I fixed it by following his instruction.

Following blog is useful, last two steps are helpful that is swapping node.exe from your installed directory to eclipse plugin directory:

https://khyatisehgal.wordpress.com/2014/09/17/812/

A couple of weeks back I faced the same issue in MAC. This is what I did, find all chrome|gecko|xyz driver and kill all the process. Uninstall protractor from global and from local workspace. Do a fresh install of the protractor hopefully, should solve the problem.