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

Left over chrome processes and zombie chromedrivers #879

Closed
cressie176 opened this issue Feb 29, 2016 · 11 comments
Closed

Left over chrome processes and zombie chromedrivers #879

cressie176 opened this issue Feb 29, 2016 · 11 comments

Comments

@cressie176
Copy link

Hi,

I have the following code in my nightwatch tests

after(function(client, done) {
    client.end(function() {
        done()
    })
});

However this just ends the current session by issuing a delete

DELETE /wd/hub/session/b49655e9-34c7-4c21-8d6e-111b142472f7 HTTP/1.1
Content-Length: 0
Host: jenkins.example.com:4444
Connection: close

Chrome is left running on our selenium server, and the chromedriver process ends up as a zombie.

Am I doing something wrong? Is there a way to call selenium.quit?

Thanks.

@beatfactor
Copy link
Member

That should be enough. Do you see any errors at the end of your selenium-debug.log? Also which versions of nightwatch/selenium/chromedriver are you on and what OS?

@cressie176
Copy link
Author

Been looking into it a bit further. Doesn't seem related to nightwatch at all. It's possible SeleniumHQ/docker-selenium#87 or something similar has been causing our tests to hang and chrome not to close. I've been running our nightwatch tests repeatedly for the last few hours and client.end has never failed to close chrome.

@silverrajat88
Copy link

I am facing the same problem.

@cressie176
Copy link
Author

@silverrajat88 the DBUS fix described in [SeleniumHQ/docker-selenium#87] fixed it for me

@kentendo
Copy link

I'm having this issue with nightwatch 0.9.19, chromedriver 2.33.2, selenium-server-stand-alone 2.33.2 on windows. Chrome closes fine but chromedriver.exe process is never killed.

@roman-dudin
Copy link

@kentendo, do you have "end_session_on_fail": false, in nightwatch.config.js?

@ocmyhome
Copy link

ocmyhome commented Jan 25, 2018

I'm having the same issue. I set end_session_on_fail to false, but chromedriver.exe still remains running.

I'm using mocha
I upgraded chromedriver to 2.35

put it on an afterEarch (didn't work)
000300

put it on the test itself (no dice)
000301

@oktak
Copy link

oktak commented Feb 8, 2018

I have tried the following method:

In "nightwatch.conf.js",

"test_settings" {
    "default" {
        "silent": true,
        ...
    },
    ...
}

I set "silent" from true to false.

It lead to becoming verbose in the console. And the chromedriver.exe will exit peacefully after running the tests.

I was using the vue template from: https://github.com/vuejs-templates/pwa

My platform:

  • Windows 7 (64bit)
  • node v8.1.3
  • "nightwatch": "^0.9.16",
  • "selenium-server": "^3.6.0",
  • "chromedriver": "^2.33.1"

@joshystuart
Copy link

The above works, however I don't really want all the output in the console. Is there a solution that doesn't require output to be so verbose?

@joshscorrar
Copy link

Same issue here.

Windows 7 (64bit)
Node 8.11.3
"chromedriver": "^2.27.2"
"selenium-server": "^3.0.1",
"nightwatch": "^0.9.21",
"nightwatch-cucumber": "^9.1.2"

2 scenarios (1 undefined, 1 passed)
11 steps (5 undefined, 6 passed)
0m12.692s

true
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ToolBox@1.0.0 e2e: node test/e2e/runner.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ToolBox@1.0.0 e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Process finished with exit code 1

@replaysMike
Copy link

Same issue here.

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

No branches or pull requests

10 participants