I installed protractor following this tutorial and when i use webdriver-manager update it says:
selenium standalone is up to date.
chromedriver is up to date.
thou when i try to run the protractor tests, it says:
C:\Users\****\AppData\Roaming\npm\node_modules\protractor\lib\driverProviders\local.dp.js:42
throw new Error('Could not find chromedriver at ' +
^
Error: Could not find chromedriver at C:\Users\****\AppData\Roaming\npm\node_modules\protractor\selenium\chromedriver.exe
at LocalDriverProvider.addDefaultBinaryLocs_ (C:\Users\****\AppData\Roaming\npm\node_modules\protractor\lib\driverProviders\local.dp.js:42:15)
at LocalDriverProvider.setupEnv (C:\Users\****\AppData\Roaming\npm\node_modules\protractor\lib\driverProviders\local.dp.js:59:8)
at Runner.run (C:\Users\****\AppData\Roaming\npm\node_modules\protractor\lib\runner.js:308:31)
at process.<anonymous> (C:\Users\****\AppData\Roaming\npm\node_modules\protractor\lib\runFromLauncher.js:32:14)
at process.EventEmitter.emit (events.js:98:17)
at handleMessage (child_process.js:318:10)
at Pipe.channel.onread (child_process.js:345:11)
[launcher] Runner Process Exited With Error Code: 8
I checked the local.dp.js and saw that it tried to load the chromedriver from ..\node_modules\protractor\selenium\chromedriver but there only was an empty zip file called chromedriver_2.9.
So i downloaded the chromedriver manually and copied it to this location, producing a new error:
C:\Users\****\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1549
throw error;
^
Error: Server exited with 1
at Error (<anonymous>)
at ChildProcess.onServerExit (C:\Users\****\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\remote\index.js:193:11)
at ChildProcess.g (events.js:180:16)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:797:12)
[launcher] Runner Process Exited With Error Code: 8
Anyone any Ideas?
In my case it was the due to damaged chromedriver zip file.
I have done following things to resolve this problem.
Downloaded chromedriver zip from ChromeDriver Download Page
Extracted that zip file at "node_modules\protractor\selenium\" (i.e. Copied "chromedriver.exe" to this location)
Then it started working as expected. Hope this will help you.
I followed that tutorial and had the same problem. The issue here was that you need to specify the path to your selenium jar and chrome driver exe in your protractor config file. Mine was installed globally in AppData folder so this is what mine protractor.confg.js file looks like:
That seemed to do the trick.
On mac osx, change the version in package.json for protractor to "*", remove node_modules, and install again.
After looking around for a while, I noticed that the
package.json
file included in the angular phonecat repo defines aupdate-webdriver
task.Running that task (with
npm run update-webdriver
) fixed protractor for me.For me the
npm install
andnpm run update-webdriver
commands just kept downloading the corruptChromedriver_x.xx.zip
file. So I tried runningwebdriver-manager update
, and it worked.Jeez, so many answers...
On the Mac, this worked for me:
There's GOT to be a better way of fixing it but at least this let me move on.