Closed jtsom closed 7 years ago
Are you behind a proxy by any chance?
You seem to have some hosts/ports blocked.
[12:50:04] E/launcher - Error message: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:53256
[12:50:04] E/launcher - Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:53256
There might be a way around it, but I'd advice to check https://github.com/angular/protractor on how to do it. The CLI just uses protractor for e2e tests.
No, no proxy. And you do realize that 127.0.0.1 is the localhost, right? So no, there aren't any ports blocked.
I'm also getting this issue on my home PC (work computer works fine).
For me this turned out to be an issue w/ the latest version of Chrome (v54) and how it interacts w/ Chromedriver.
So when you install the latest Chromedriver via webdriver-manager update
, right now it's installing the default Chromedriver version which is 2.22. In Chrome 54 they changed something w/ the Devtools API which breaks that version. I got around this issue by forcing webdriver-manager to download Chromedriver v.2.2.4 doing this:
webdriver-manager update --versions.chrome=2.24
That will download version v.2.24. However, if you are connecting to Protractor using directConnect: true
in the config (which you probably are), protractor will still attempt to use the default (v.2.22) driver when running tests. To fix that, you need to specify a chromeDriver
setting in protractor.conf.js as well. To get it to work on Windows and Unix platforms you can do something like this:
chromeDriver: `./node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.24${process.platform.indexOf('win') === 0 ? '.exe' : ''}`
Kind of annoying but at least it's working.
Thanks @ecozoic your solution has helped running protractor tests again for Chrome 54.
Just tried this on Mac OS Sierra and got a bunch of errors, on a pretty much stock Angular-CLI app:
> a2test@0.0.0 pree2e /Users/John/Dev/Javascript/Angular/a2test
> webdriver-manager update --versions.chrome=2.24
[09:56:22] I/downloader - chromedriver: downloading version 2.24
[09:56:22] I/downloader - curl -o /Users/John/Dev/Javascript/Angular/a2test/node_modules/webdriver-manager/selenium/chromedriver_2.24mac32.zip https://chromedriver.storage.googleapis.com/2.24/chromedriver_mac32.zip
[09:56:22] E/downloader - Error: Got code 404 from https://chromedriver.storage.googleapis.com/2.24/chromedriver_mac32.zip
[09:56:22] I/update - selenium standalone: file exists /Users/John/Dev/Javascript/Angular/a2test/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar
[09:56:22] I/update - selenium standalone: v2.53.1 up to date
[09:56:22] E/downloader - Error: Got error Error: ENOENT: no such file or directory, stat '/Users/John/Dev/Javascript/Angular/a2test/node_modules/webdriver-manager/selenium/chromedriver_2.24mac32.zip' from https://chromedriver.storage.googleapis.com/2.24/chromedriver_mac32.zip
> a2test@0.0.0 e2e /Users/John/Dev/Javascript/Angular/a2test
> protractor "./protractor.conf.js"
[09:56:22] I/direct - Using ChromeDriver directly...
[09:56:22] I/launcher - Running 1 instances of WebDriver
[09:56:23] E/direct - Error code: 135
[09:56:23] E/direct - Error message: Could not find chromedriver at /Users/John/Dev/Javascript/Angular/a2test/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.24
[09:56:23] E/direct - Error: Could not find chromedriver at /Users/John/Dev/Javascript/Angular/a2test/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.24
at Direct.getNewDriver (/Users/John/Dev/Javascript/Angular/a2test/node_modules/protractor/built/driverProviders/direct.js:65:27)
at Runner.createBrowser (/Users/John/Dev/Javascript/Angular/a2test/node_modules/protractor/built/runner.js:198:43)
at /Users/John/Dev/Javascript/Angular/a2test/node_modules/protractor/built/runner.js:277:30
at _fulfilled (/Users/John/Dev/Javascript/Angular/a2test/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/Users/John/Dev/Javascript/Angular/a2test/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/Users/John/Dev/Javascript/Angular/a2test/node_modules/q/q.js:796:13)
at /Users/John/Dev/Javascript/Angular/a2test/node_modules/q/q.js:556:49
at runSingle (/Users/John/Dev/Javascript/Angular/a2test/node_modules/q/q.js:137:13)
at flush (/Users/John/Dev/Javascript/Angular/a2test/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
[09:56:23] E/launcher - Process exited with error code 135
npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/Cellar/node/6.8.0/bin/node" "/usr/local/bin/npm" "run" "e2e" "--" "./protractor.conf.js"
npm ERR! node v6.8.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! a2test@0.0.0 e2e: `protractor "./protractor.conf.js"`
npm ERR! Exit status 135
npm ERR!
npm ERR! Failed at the a2test@0.0.0 e2e script 'protractor "./protractor.conf.js"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the a2test package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! protractor "./protractor.conf.js"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs a2test
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls a2test
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/John/Dev/Javascript/Angular/a2test/npm-debug.log
Some end-to-end tests failed, see above.
Yeah you might have to adjust the path of chromeDriver
based on where it's actually installed. I have a Macbook at home but I haven't tested it on that one yet, still running on Windows 10 at the moment.
Hm. Seems there isn't a "chromedriver" anywhere. I did a find . -name "*chromedriver*"
in my node_modules folder and nothing came up.
Thanks ecozoic for the workaround. Just sharing that in my case all I had to do was the below in order to solve our issue with protractor:
cd protractor/node_modules/webdriver-manager/bin
./webdriver-manager update --versions.chrome 2.24
In my project (again, a simple Angular-cli app), there isn't anything under the node_modules/protractor/node_modules
folder - it's empty.
I did find node_modules/protractor/bin/webdriver-manager
, and when trying the command given, I get:
➜ bin git:(master) ✗ ./webdriver-manager update --versions.chrome 2.24
[10:28:21] I/file_manager - creating folder /Users/John/Dev/Javascript/Angular/a2test/node_modules/webdriver-manager/selenium
[10:28:21] I/downloader - selenium standalone: downloading version 2.53.1
[10:28:21] I/downloader - curl -o /Users/John/Dev/Javascript/Angular/a2test/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar
[10:28:21] I/downloader - chromedriver: downloading version 2.24
[10:28:21] I/downloader - curl -o /Users/John/Dev/Javascript/Angular/a2test/node_modules/webdriver-manager/selenium/chromedriver_2.24mac32.zip https://chromedriver.storage.googleapis.com/2.24/chromedriver_mac32.zip
[10:28:22] E/downloader - Error: Got code 404 from https://chromedriver.storage.googleapis.com/2.24/chromedriver_mac32.zip
[10:28:22] E/downloader - Error: Got error Error: ENOENT: no such file or directory, stat '/Users/John/Dev/Javascript/Angular/a2test/node_modules/webdriver-manager/selenium/chromedriver_2.24mac32.zip' from https://chromedriver.storage.googleapis.com/2.24/chromedriver_mac32.zip
It looks like it's trying and failing to download chromedriver_2.24mac32.zip
, which doesn't exist.
Exactly same error than jtsom.
I am having this exact same problem since Chrome updated to v54 and getting the same errors when trying to download chromedriver version 2.24. Has anyone found a solution?
If that helps anyone I manualy downloaded the chrome-driver version 2.24. from http://chromedriver.storage.googleapis.com/index.html then dropped it in C:\Users\%UserProfile%\AppData\Local\Temp\chromedriver
and that did the job for me as when I run the commands now it finds it from the temp directory
@mantisbayne if you are still having problems you might try:
webdriver-manager
is a dependency of protractor and has a config file specifying the driver version. You should be on 10.2.5 or above. Provided you are above that version it should automatically get the 2.24 driver. I was running into this problem on my CI and had to reset my dependency cache. Providing you are on an updated version of protractor this problem should resolve itself automatically without manually downloading the chromedriver. I would nuke your node_modules directory and do a fresh npm install
.
I forgot I had posted on this thread too. I got a response from protractor that webdriver-manager was updated two days ago, so everything started working again once I updated to 4.0.9. & did npm install. Issue fixed
I'm still encountering this issue with the following (up to date) dependencies:
protractor
version 4.0.9
webdriver-manager
version 10.2.7
chromedriver
version 2.25.426935
chrome
version 54.0.2840.87
For the time being I switched to using Canary with the following settings within protractor.conf.js
:
capabilities: {
"browserName": "chrome",
"chromeOptions": {
"binary": "/Users/XXX/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary"
}
},
https://github.com/angular/protractor/issues/1198#issuecomment-259801454 mentions a chromedriver bug and a temporary solution by setting export LANG=en_US.UTF-8
.
export LANG=en_US.UTF-8
ng e2e
... works for me.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Mac OSX El Cap
ng --version
. If there's nothing outputted, please run in a Terminal:node --version
and paste the result here:angular-cli: 1.0.0-beta.14
node: 6.6.0
os: darwin x64
new application, start the server with
ng serve
and in another terminal window try to run the tests withng e2e