Skip to content

Error for missing update-config.json does not resolve the issue #269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
benjaminapetersen opened this issue Sep 7, 2017 · 29 comments
Closed

Comments

@benjaminapetersen
Copy link

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.

@cnishina
Copy link
Contributor

cnishina commented Sep 7, 2017

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

@cnishina cnishina closed this as completed Sep 7, 2017
@benjaminapetersen
Copy link
Author

Thanks for the reply! I'm not confusing them (intentionally, at least). It is possible that due to ambiguity things are getting confused. I tried both webdriver-manager update and setting up a scripts block to run npm webdriver-update per your stack overflow suggestion, but it doesn't change the output.

The solution here is unclear, perhaps similar to my other bug #270? I've had some long running issues getting this to play nice & debugging has been fairly difficult with the provided output.

Thanks again

@benjaminapetersen
Copy link
Author

Setup travis-ci.org to run my tests, same prob:

[19:31:16] I/testLogger - [chrome #11] PID: 2750
[chrome #11] [19:31:16] E/local - Error code: 135
[chrome #11] [19:31:16] E/local - Error message: No update-config.json found. Run 'webdriver-manager update' to download binaries.
[chrome #11] [19:31:16] E/local - Error: No update-config.json found. Run 'webdriver-manager update' to download binaries.

Can't be local vs global?

@benjaminapetersen
Copy link
Author

FWIW this continues to be an enigma. Created a new hello-world angular1.5 app w/grunt/karma/protractor all latest just to kick the tires and see if I could solve the problem I was having in an older repo and ended up getting a lot of the same issues (after it ran perfectly fine for a while).

Output ends up:

[15:43:57] I/testLogger - [firefox #01] PID: 53192
[firefox #01] [15:43:57] E/local - Error code: 135
[firefox #01] [15:43:57] E/local - Error message: No update-config.json found. Run 'webdriver-manager update' to download binaries.
[firefox #01] [15:43:57] E/local - Error: No update-config.json found. Run 'webdriver-manager update' to download binaries.
[firefox #01]   at IError (~/github/lunch-and-learn-grunt-testing-angular/node_modules/protractor/built/exitCodes.js:6:1)
[firefox #01]   at ProtractorError (~/github/lunch-and-learn-grunt-testing-angular/node_modules/protractor/built/exitCodes.js:11:9)
[firefox #01]   at BrowserError (~/github/lunch-and-learn-grunt-testing-angular/node_modules/protractor/built/exitCodes.js:52:9)
[firefox #01]   at Local.addDefaultBinaryLocs_ (~/github/lunch-and-learn-grunt-testing-angular/node_modules/protractor/built/driverProviders/local.js:41:23)
[firefox #01]   at Local.setupDriverEnv (~/github/lunch-and-learn-grunt-testing-angular/node_modules/protractor/built/driverProviders/local.js:82:14)
[firefox #01]   at Local.setupEnv (~/github/lunch-and-learn-grunt-testing-angular/node_modules/protractor/built/driverProviders/driverProvider.js:111:34)
[firefox #01]   at q.then (~/github/lunch-and-learn-grunt-testing-angular/node_modules/protractor/built/runner.js:335:41)
[firefox #01]   at _fulfilled (~/github/lunch-and-learn-grunt-testing-angular/node_modules/q/q.js:834:54)
[firefox #01]   at self.promiseDispatch.done (~/github/lunch-and-learn-grunt-testing-angular/node_modules/q/q.js:863:30)
[firefox #01]   at Promise.promise.promiseDispatch (~/github/lunch-and-learn-grunt-testing-angular/node_modules/q/q.js:796:13)
[firefox #01]   at ~/github/lunch-and-learn-grunt-testing-angular/node_modules/q/q.js:857:14
[firefox #01]   at runSingle (~/github/lunch-and-learn-grunt-testing-angular/node_modules/q/q.js:137:13)
[firefox #01]   at flush (~/github/lunch-and-learn-grunt-testing-angular/node_modules/q/q.js:125:13)
[firefox #01]   at _combinedTickCallback (internal/process/next_tick.js:73:7)
[firefox #01]   at process._tickCallback (internal/process/next_tick.js:104:9)
[firefox #01]

Is a bit bewildering. I have tried:

webdriver-manager update
./node_modules/protractor/bin/webdriver-manager update
npm run update-webdriver // which just calls the above

I'll get similar things over and over:

> [email protected] update-webdriver-local ~/github/lunch-and-learn-grunt-testing-angular
> ./node_modules/protractor/bin/webdriver-manager update

[15:43:47] I/update - chromedriver: file exists ~/github/lunch-and-learn-grunt-testing-angular/node_modules/webdriver-manager/selenium/chromedriver_2.32.zip
[15:43:47] I/update - chromedriver: unzipping chromedriver_2.32.zip
[15:43:48] I/update - chromedriver: setting permissions to 0755 for ~/github/lunch-and-learn-grunt-testing-angular/node_modules/webdriver-manager/selenium/chromedriver_2.32
[15:43:48] I/update - chromedriver: chromedriver_2.32 up to date
(node:53170) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to make Github request, rate limit reached.
[15:43:48] I/update - selenium standalone: file exists ~/github/lunch-and-learn-grunt-testing-angular/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.5.3.jar
[15:43:48] I/update - selenium standalone: selenium-server-standalone-3.5.3.jar up to date

@benjaminapetersen
Copy link
Author

I'm not yet certain this issue should be closed. Either something is incorrect or at least the UX is unclear & could be improved.

@benjaminapetersen
Copy link
Author

For clarity will share my travis-ci link:

https://travis-ci.org/benjaminapetersen/lunch-and-learn-grunt-testing-angular

& completely willing to accept I have consistently done something horribly wrong 😄

@benjaminapetersen
Copy link
Author

Another stack overflow: https://stackoverflow.com/questions/42911197/webdriver-manager-update-config-json-absolute-paths

Further explanation, though follow-up comments indicate the issue was not resolved.

@Jordan-Nelson
Copy link

@benjaminapetersen Where you able to resolve this issue? I am seeing a similar issue when attempting to use a local webdriver-manager. I am seeing Error: No update-config.json, even though I have run an npm script to update the local webdriver-manager (npm script - "webdriver-update": "./node_modules/webdriver-manager/bin/webdriver-manager update"). And I can see that the update-config.json file is indeed in the local file path.

@benjaminapetersen
Copy link
Author

Currently working, though I don't remember what I did to resolve. I think its the kind of issue that just needs a little UX love to polish it off.

@macroking
Copy link
Contributor

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.

@benjaminapetersen
Copy link
Author

Rings a bell, I may have done similar.

@stephencawood
Copy link

Try adding the seleniumAddress to your Protractor config file:

// baseUrl: 'http://localhost:4000/',
seleniumAddress: 'http://localhost:4444/wd/hub/',

With my config, I now start the Selenium server by running: $ webdriver-manager start
And in a different terminal window, start tests with: $ ng e2e

@danielwashbrook
Copy link

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.

@far11ven
Copy link

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/

@SebastianKristof
Copy link

@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.

@cnishina
Copy link
Contributor

cnishina commented Mar 8, 2018

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.

JulioJu pushed a commit to JulioJu/generator-jhipster that referenced this issue Mar 31, 2018
fix random errors between `webdriver-manager update` and Travis
See also angular/webdriver-manager#269 (comment)
@avrelian
Copy link

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).

@morrisonbrett
Copy link

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

Then protractor worked. Thanks!

@mariohmol
Copy link

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

@nishankkumar1994
Copy link

nishankkumar1994 commented Feb 13, 2019

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

@dmitry-grinko
Copy link

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

@cnishina
Copy link
Contributor

Other ways to run webdriver-manager locally:

Using npx

npx webdriver-manager update

Run this locally in the project with the node_modules installed. It should run the local version in your node_modules folder.

Adding a command to your scripts in package.json

package.json

"scripts": {
  "webdriver-update": "webdriver-manager update"
}

npm run webdriver-update

@pradhan41
Copy link

I had similar issue and it got fixed by running "npx webdriver-manager update" in project directory :0

@haytastan
Copy link

haytastan commented Sep 13, 2019

Below is a working protractor.conf.js of mine:

// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');

/**
 * @type { import("protractor").Config }
 */
exports.config = {
  allScriptsTimeout: 11000,
  specs: [
    './src/**/*.e2e-spec.ts'
  ],
  capabilities: {
    'browserName': 'chrome'
  },
  //directConnect: true,
  directConnect: false,
  //baseUrl: 'http://localhost:4200/',
  seleniumAddress: 'http://localhost:4444/wd/hub/',
  framework: 'jasmine',
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000,
    print: function() {}
  },
  onPrepare() {
    require('ts-node').register({
      project: require('path').join(__dirname, './tsconfig.json')
    });
    jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
  }
};

@sudeeppaudyal
Copy link

I had the similar issue.got fixed by node ./node_modules/protractor/bin/webdriver-manager update.Thanks !!

@pratik-joshi-cactus
Copy link

pratik-joshi-cactus commented Sep 26, 2019

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

@PraveenPuttaswamy
Copy link

PraveenPuttaswamy commented Dec 13, 2019

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

@kevincai79
Copy link

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

@siddheshmalpani
Copy link

siddheshmalpani commented Jul 13, 2020

For people working with Protractor together with gulp-protractor plugin -
You'll have to update the webdriver-manager at two locations in your local node_modules directory:

node_modules/protractor/bin/webdriver-manager
node_modules/gulp-protractor/node_modules/protractor/node_modules/webdriver-manager

The second location is where gulp-protractor looks for the webdrivers.
So two commands that you need to run are:

node node_modules/protractor/bin/webdriver-manager --ignore_ssl update
node node_modules/gulp-protractor/node_modules/protractor/node_modules/webdriver-manager --ignore_ssl update

[edit]
With the latest versions of node and protractor, you need to run only the following command as npm script

node node_modules/gulp-protractor/node_modules/protractor/bin/webdriver-manager --ignore_ssl update update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests