nightwatch: "socket hang up" error immediately on running nightwatch 1.0.4

I tried upgrading to 1.0.4 and immediately on running nightwatch I get:

   connect ECONNREFUSED 127.0.0.1:4444

   socket hang up
       at createHangUpError (_http_client.js:302:15)
       at Socket.socketCloseListener (_http_client.js:334:23)

Meaning I can’t run the tests at all. This is on Mac with the following config:

  "webdriver": {
    "start_process": true,
    "server_path": "./bin/mac/chromedriver-v2.37",
    "port": 4444,
    "host": "localhost"
  }

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 38 (11 by maintainers)

Most upvoted comments

Also get this error, using “nightwatch”: “^1.0.11”:

connect ECONNREFUSED 127.0.0.1:4444

   socket hang up
       at createHangUpError (_http_client.js:331:15)
       at Socket.socketCloseListener (_http_client.js:363:23)

I’ve updated to v1.0.12 and now get the following error;

Error: Timeout while trying to connect to Selenium Server on port 4444.

15:37:27.551 INFO [GridLauncherV3.launch] - Selenium build info: version: ‘3.11.0’, revision: ‘e59cfb3’ 15:37:27.555 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 4444 2018-11-15 15:37:28.033:INFO::main: Logging initialized @1330ms to org.seleniumhq.jetty9.util.log.StdErrLog

I am getting the same error using "nightwatch": "^1.0.19" and "chromedriver": "^2.46.0" on macOS High Sierra Version 10.13.6.

Seems like this is still an issue.

@lynscott I just switched back to 0.9.x until a fix is released.

@RyanSadowski Ditto. It breaks in my GitLab runner for both Chrome and Firefox. This is the container I am using

@wallzero

I am having the same issue. It runs fine on my Linux machine but fails in my GitLab runner.

Same, failing in my gitlab runner but excellent otherwise. Have you found a workaround for this?

@beatfactor I’m experiencing the same issue with "nightwatch": ^1.1.11, "chromedriver": "^2.46.0" and "selenium-server": "^3.141.59" on macOS. This issue still exist in latest version.

Error: Timeout while trying to connect to Selenium Server on port 4444.
       at Socket.socketErrorListener (_http_client.js:387:9)
       at emitErrorNT (internal/streams/destroy.js:64:8)
       at _combinedTickCallback (internal/process/next_tick.js:138:11)
 00:00:19.825 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
 00:00:19.935 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444
 2019-06-07 00:00:20.051:INFO::main: Logging initialized @677ms to org.seleniumhq.jetty9.util.log.StdErrLog

I get the same error. I had to run the command several times to make the tests run.

"chromedriver": "^74.0.0",
"nightwatch": "^1.0.19",

I’m running on macOS Mojave 10.14.3. Same happening when I run against Windows 10 machine.