Error: ECONNREFUSED connect ECONNREFUSED after upgrading Chrome to v54.0.2840.59 m
Bug report
Note that this problem appears with Chrome 54.0.2840.59 m (64-bit) but when I downgrade again to Chrome 53.0.2785.116 m then the tests run fine. The same happens in our CI environment using CentOS after downgrading the Chrome version.
Environment:
- Node Version:
6.5.0 - Protractor Version:
3.3.0 - Angular Version:
1.7.9 - Browser(s):
Google hrome 54.0.2840.59 m (64-bit) - Operating System and Version
Windows 10
Protractor configuration file:
exports.config = { allScriptsTimeout: 1000000, directConnect: true, specs: ['*.spec.js'], capabilities: { 'browserName': 'chrome', 'chromeOptions': {'args': ['lang=en-GB', 'enable-precise-memory-info', 'js-flags=--expose-gc', 'no-sandbox']} }, baseUrl : 'https://localhost:8443', framework: 'jasmine2', restartBrowserBetweenTests: false, onPrepare: function () { browser.manage().window().setSize(1600, 1000); var jasmineReporters = require('jasmine-reporters'); jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({ consolidateAll: true, filePrefix: 'results', savePath: 'reports/xml' })); var HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter'); jasmine.getEnv().addReporter(new HtmlScreenshotReporter({ dest: 'reports/html', filename: 'results.html' })); var SpecReporter = require('jasmine-spec-reporter'); // add jasmine spec reporter jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: 'all'})); }, jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 1050000, isVerbose: true, includeStackTrace: true, print: function () {} } };
Output from running the test:
Using ChromeDriver directly... [launcher] Running 1 instances of WebDriver
C:\Users\tedi\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:174 callback(new Error(message)); ^ Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:54105 at ClientRequest.
(C:\Users\tedi\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:174:16) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at Socket.socketErrorListener (_http_client.js:308:9) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at emitErrorNT (net.js:1272:8) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process.tickCallback (internal/process/next_tick.js:98:9) From: Task: WebDriver.createSession() at Function.webdriver.WebDriver.acquireSession (C:\Users\tedi\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:157:22) at Function.webdriver.WebDriver.createSession (C:\Users\tedi\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:131:30) at new Driver (C:\Users\tedi\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\chrome.js:810:36) at DirectDriverProvider.getNewDriver (C:\Users\tedi\AppData\Roaming\npm\node_modules\protractor\lib\driverProviders\direct.js:68:16) at Runner.createBrowser (C:\Users\tedi\AppData\Roaming\npm\node_modules\protractor\lib\runner.js:186:37) at C:\Users\tedi\AppData\Roaming\npm\node_modules\protractor\lib\runner.js:276:21 at _fulfilled (C:\Users\tedi\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:797:54) at self.promiseDispatch.done (C:\Users\tedi\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:826:30) at Promise.promise.promiseDispatch (C:\Users\tedi\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:759:13) at C:\Users\tedi\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:525:49 [launcher] Process exited with error code 1
Steps to reproduce the bug:
- Call the spec by running:
protractor protractor-int.conf.js --specs=documentsList.spec.js
Updating ChromeDriver is required for Webdriver to work with the latest version of Chrome. If you're using Protractor 4.x.x, running npm update should fix it for you. Otherwise you may need to download a new version manually.
That's right @calendir. Yesterday I upgraded to Protractor 4.0.9 and the tests started to work fine.
Not sure if this is still an issue and Chromedriver needs to be updated for Protractor 3.x.x or the support is over unless you move to Protractor 4.x.x
4.xx includes the standalone webdriver-manager (which has updated versions of chromedriver). If you need to support newer versions of chrome you should either:
- Upgrade protractor
- Install the latest version
webdriver-managerand use it to download a newer version of chromedriver
Going to close this now. Thanks!