Protractor: Can´t start protractor, for firefox browser, due a error "Could not find update-config.json. Run 'webdriver-manager update' to download binaries."

Created on 5 Jul 2018  ·  15Comments  ·  Source: angular/protractor

Hi,

On the bellow dev environment, the protractor failed to start.

ENV
protractor Version 5.3.2
windows 10 os: x64
Angular CLI: 6.0.8
Node: 8.11.3
Angular: 6.0.7
npm --version
5.6.0
firefox version 61.0

My "protractor.conf.js" has the follow configuration:

exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src//.e2e-spec.ts'
// './src/
/.e2e-testrail-spec.ts'
],
capabilities: {
'browserName': 'firefox'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}

};

I run "ng e2e" to start testing but it fails due:

I can´t start testing due a error " [16:37:31] E/direct - Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries."

I executed the "webdriver-manager update" but it didn´t resolve.

LOG:

PS Z:\GIT\biblioteca_app\Neadvance\ClientApp> ng e2e
* Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ *

Date: 2018-07-05T15:37:29.516Z
Hash: 9b08bd6304a90f781661
Time: 10596ms
chunk {main} main.js, main.js.map (main) 188 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 227 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 245 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 4.06 MB [initial] [rendered]
i 「wdm」: Compiled successfully.
[16:37:29] I/update - chromedriver: file exists Z:\GIT\biblioteca_app\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.40.zip
[16:37:29] I/update - chromedriver: unzipping chromedriver_2.40.zip
[16:37:30] I/update - chromedriver: chromedriver_2.40.exe up to date
(node:229400) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[16:37:31] I/launcher - Running 1 instances of WebDriver
[16:37:31] I/direct - Using FirefoxDriver directly...
[16:37:31] E/direct - Error code: 135
[16:37:31] E/direct - Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
[16:37:31] E/direct - Error: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
at Direct.getNewDriver (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\built\driverProviders\direct.js:91:31)
at Runner.createBrowser (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\built\runner.js:195:43)
at q.then.then (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\built\runner.js:339:29)
at _fulfilled (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\node_modules\q\q.js:796:13)
at Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\node_modules\q\q.js:556:49
at runSingle (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\node_modules\q\q.js:137:13)
at flush (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)

[16:37:31] E/launcher - Process exited with error code 135
An unexpected error occured: undefined
PS Z:\GIT\biblioteca_app\Neadvance\ClientApp>

PS Z:\GIT\biblioteca_app\Neadvance\ClientApp> webdriver-manager update
[16:37:35] I/update - chromedriver: file exists C:\Users\crodrigues\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.40.zip
[16:37:35] I/update - chromedriver: unzipping chromedriver_2.40.zip
[16:37:35] I/update - chromedriver: chromedriver_2.40.exe up to date
[16:37:35] I/update - selenium standalone: file exists C:\Users\crodrigues\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.13.0.jar
[16:37:35] I/update - selenium standalone: selenium-server-standalone-3.13.0.jar up to date
[16:37:36] I/update - geckodriver: file exists C:\Users\crodrigues\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\geckodriver-v0.21.0.zip
[16:37:36] I/update - geckodriver: unzipping geckodriver-v0.21.0.zip
[16:37:36] I/update - geckodriver: geckodriver-v0.21.0.exe up to date

PS Z:\GIT\biblioteca_app\Neadvance\ClientApp> ng e2e
* Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ *

Date: 2018-07-05T15:37:54.627Z
Hash: 9b08bd6304a90f781661
Time: 12095ms
chunk {main} main.js, main.js.map (main) 188 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 227 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 245 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 4.06 MB [initial] [rendered]
i 「wdm」: Compiled successfully.
[16:37:55] I/update - chromedriver: file exists Z:\GIT\biblioteca_app\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.40.zip
[16:37:55] I/update - chromedriver: unzipping chromedriver_2.40.zip
[16:37:55] I/update - chromedriver: chromedriver_2.40.exe up to date
(node:230376) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[16:37:56] I/launcher - Running 1 instances of WebDriver
[16:37:56] I/direct - Using FirefoxDriver directly...
[16:37:56] E/direct - Error code: 135
[16:37:56] E/direct - Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
[16:37:56] E/direct - Error: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
at Direct.getNewDriver (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\built\driverProviders\direct.js:91:31)
at Runner.createBrowser (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\built\runner.js:195:43)
at q.then.then (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\built\runner.js:339:29)
at _fulfilled (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\node_modules\q\q.js:796:13)
at Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\node_modules\q\q.js:556:49
at runSingle (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\node_modules\q\q.js:137:13)
at flush (Z:\GIT\biblioteca_app\Neadvance\ClientApp\node_modules\protractor\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)

I even removed all my local repository but i could´t resolve.

Most helpful comment

Yeah, your issue related to this command flow. I also faced with this issue many times. Try to run node node_modules\protractor\bin\webdriver-manager update from project root folder and then start tests.

All 15 comments

Hi, @carodrigues ! Please describe step by step all commands which you used.

Hi @IgorSasovets!

Thank you.

Not at all) @carodrigues , please provide list of commands which you used. Then I'll try to resolve your issue.

I used this commands to setup my env commands:
npm install -g protractor
npm install
npm i testrail-promise
npm i protractor-testrail-promise
npm i jasmine-reporters
npm i hex-rgb

ng e2e 
webdriver-manager update
ng e2e

Is this sequence a problem?
I only have the reported problem with firefox.

Yeah, your issue related to this command flow. I also faced with this issue many times. Try to run node node_modules\protractor\bin\webdriver-manager update from project root folder and then start tests.

:)

Thank you @IgorSasovets. it woks.

No problem)) Please close this issue

@IgorSasovets you mean

node node_modules/protractor/bin/webdriver-manager update

(slash instead of backslash)

Hi, @pycraft114 ! No, I mean exactly backslash because it's for Windows OS. If you want to use it on MacOS|Linux you need to run node_modules/protractor/bin/webdriver-manager update from project root folder.

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

Why do I need to run both

webdriver-manager update
and
node node_modules\protractor\bin\webdriver-manager update
?

I did not even have the command "webdriver-manager". How can I run it? I only have "node node_modules\protractor\bin\webdriver-manager", but "webdriver-manager", sorry, do not have.

@peterborkuti , you'll be able to use webdriver-manager command if you install protractor globally. But it isn't mandatory, you can run node_modules\protractor\bin\webdriver-manager and then start protractor tests using this command node_modules\protractor\bin\protractor <path_to_your_config_file>.js

@sbley , it depends on how you start your tests. It is not required to run both commands before the tests

Yeah, your issue related to this command flow. I also faced with this issue many times. Try to run node node_modules\protractor\bin\webdriver-manager update from project root folder and then start tests.

Thanks mate, now i can finaly start using JS for automation! God bless you!

Was this page helpful?
0 / 5 - 0 ratings