Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

socket hang up when working with Jenkins and use 'start_process' #2058

Closed
jackniu81 opened this issue Apr 3, 2019 · 3 comments
Closed

socket hang up when working with Jenkins and use 'start_process' #2058

jackniu81 opened this issue Apr 3, 2019 · 3 comments

Comments

@jackniu81
Copy link

when working with Jenkins, and use 'start_process' to ask Jenkins to auto start ChromeDriver, but it fails.

Environment

  1. Node.js: 10.15.0
  2. Chrome Driver: 2.45.615291
  3. Windows 2008 R2,
  4. nightwatch: 1.0.18

nightwatch config:

module.exports = {
    "src_folders": [
        "tests"
    ],
    "globals_path": "./globalsModule.js",
    "webdriver": {
        "start_process": true,     // here!! Jenkins cannot auto start chromedriver
        "server_path": "node_modules/chromedriver/lib/chromedriver/chromedriver.exe",
        "port": 9515
    },
    "test_settings": {
        "default": {
            "desiredCapabilities": {
                "browserName": "chrome",
                "chromeOptions": {
                    "args": [
                        // use this to use 'headless' mode
                        // "headless", "no-sandbox", "disable-gpu"
                    ]
                },
            }
        }
    },
    "test_workers": {   //  runs the tests in parallel
        "enabled": true,
        "workers": "auto"
    }
};

Error
08:44:09 tests\report.js [Report] Test Suite
08:44:09 tests\report.js ===================
08:44:09 tests\report.js POST /session - ECONNRESET
08:44:09 tests\report.js Error: socket hang up
08:44:09 tests\report.js at createHangUpError (_http_client.js:323:15)
08:44:09 tests\report.js at Socket.socketCloseListener (_http_client.js:364:25)
08:44:09 tests\report.js An occurred error while retrieving a new session: "socket hang up"
08:44:09 tests\report.js at Socket.socketCloseListener (_http_client.js:364:11)

@JamesODonoghue
Copy link

I had a bunch of issues in Jenkins after upgrading to the latest version of nightwatch.

What helped was upgrading the chrome binary on the jenkins server, then upgrading chromedriver to support that version of chrome.

We use selenium so I upgraded that as well.

Jenkins server:
Node 10.12.0
Linux Redhat v ?
ChromeDriver 73.0.3683.68
Selenium 3.8.1

No issues in Jenkins now. Not sure if this helps.

@aberonni
Copy link
Collaborator

Could be a duplicate of #1936 ?

@beatfactor
Copy link
Member

How about this workaround?

I'm going to increase the default timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants