Running Nightwatch CI tests in Chrome. Sometimes (approximately once in 5 lines) I meet the following error in one of the tests. Each test before this works great.
I have the latest standalone Chromedriver and Selenium server.
I realized that the problem is that the Selenium server crashes in the middle of the request, I donโt know why.
Error retrieving a new session from the selenium server
Connection refused! Is selenium server started?
{ Error: socket hang up
at createHangUpError (_http_client.js:254:15)
at Socket.socketCloseListener (_http_client.js:286:23)
at emitOne (events.js:101:20)
at Socket.emit (events.js:188:7)
at TCP._handle.close [as _onclose] (net.js:498:12) code: 'ECONNRESET' }
Also here is a part of mine nightwatch.jsonthat takes care of selenium.
"selenium": {
"start_process": true,
"server_path": "scripts/Nightwatch/selenium-server-standalone-3.0.1.jar",
"log_path": "app/E2E/reports/selenium",
"port": 4444,
"cli_args": {
"webdriver.chrome.driver": "scripts/Nightwatch/chromedriver"
}
}
Any ideas why Selenium is crashing and how to solve this problem?
source
share