Open MaximeHussenet opened 6 years ago
I have the same random exception (WebDriverError: java.net.ConnectException: Connection refused: connect) Node Version: 8.5.0 Protractor Version: 5.3.1 Angular Version: 5.2.9 Browser(s): Chrome driver 2.37 Operating System and Version Windows 10 Pro x64
Same issue here, random as well:
WebDriverError: java.net.ConnectException: Connection refused: connect
From: Task: WebDriver.manage().deleteAllCookies()
or
From: Task: WebDriver.findElements(By(css selector, #passwordNext))
or any other driver task.
protractor 5.2.0 || 5.3.1 chromedriver 2.37.544315 webdriver-manager 12.0.6 node 8.9.4 windows 7 pro
any idea?
The Selenium server/driver can only handle a specific amount of parallel requests and all functions with concurrent requests can hang up Selenium.
That is an issue in selenium-webdriver. Here is my patch to resolve it (only work in protractor/selenium-webdriver 3.6.0)
var fs = require('fs');
var httpIndexFile = 'node_modules/selenium-webdriver/http/index.js';
fs.readFile(httpIndexFile, 'utf8', function (err, data) {
if (err)
throw err;
var result = data.replace(/\(e.code === 'ECONNRESET'\)/g, "(e.code === 'ECONNRESET' || e.code === 'ECONNREFUSED')");
console.log(`Patching ${httpIndexFile}`)
fs.writeFileSync(httpIndexFile, result, 'utf8');
});
Bug report
9.2.0
5.3.0
1.5.11
Chrome
macOS 10.13.3
URL is our dev cluster, but in this case we're targeting Google on a separate tab or window