nightwatchjs / nightwatch

Integrated end-to-end testing framework written in Node.js and using W3C Webdriver API. Developed at @browserstack
https://nightwatchjs.org
MIT License
11.85k stars 1.35k forks source link

Functional tests fail with socket hang up mid test #4205

Open shravyakusuma09 opened 6 months ago

shravyakusuma09 commented 6 months ago

Description of the bug/issue

Functional tests failing with Socket hang up when run using Zap 2.14 and night watch - 1.3.7 and chromedriver - 124.0.1. This has suddenly stopped working, even without any changes. I've upgraded nightwatch to the latest version 3.6.1 but facing the same issue.

Error: POST /session - ECONNRESET Using: chrome (124.0.6367.119) on Windows platform. Error: socket hang up at connResetException (internal/errors.js:639:14)

Attached the nightwatch config file.

nightwatch.conf.txt

Steps to reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

Sample test

No response

Command to run

No response

Verbose Output

No response

Nightwatch Configuration

No response

Nightwatch.js Version

3.6.1

Node Version

20.12.2

Browser

Chrome 124.0.1

Operating System

Windows 10

Additional Information

No response

garg3133 commented 3 months ago

Error: socket hang up usually happens when the webdriver server (like ChromeDriver) takes more time to respond to a request than the set limit of HTTP timeout.

You can try increasing the timeout by adding a property config to webdriver config:

webdriver: {
  // other properties
  timeout_options: {
    timeout: 120000, // set HTTP timeout to 120 secs
  }
}