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

chromedriver.exe stays running after tunnel stops #58

Closed
kanagan123 opened this issue Jan 25, 2018 · 2 comments
Closed

chromedriver.exe stays running after tunnel stops #58

kanagan123 opened this issue Jan 25, 2018 · 2 comments
Labels

Comments

@kanagan123
Copy link

I've noticed after my functional tests finish, the browser closes, but chromedriver.exe stays running, leading to multiple instances of chromedriver piling up. The tunnel emits the stopped status and in my console i see "Stopped", so it doesn't seem to be an issue of the tunnel not stopping. I am using selenium tunnel with the following config:

{
    "functionalSuites": "tests/functional/*.js",
    "environments": [
        {
            "browserName": "chrome"
        }
    ],
    "reporters": [{"name": "junit", "filename": "report.xml"}, "runner"],
    "tunnelOptions": {
        "version": "3.8.1",
        "drivers": [
            {
                "name": "chrome"
            }
        ]
    }
}

I was able to get chromedriver.exe to exit by changing

childProcess.kill('SIGINT')

in ./node_modules/@theintern/digdug/Tunnel.js to

setTimeout(function() {
	childProcess.kill('SIGINT');
}, 100);

So, by waiting for 1/10 of a second before killing java.exe, chromedriver.exe actually gets killed. I'm not sure if this is a problem with your codebase or my configuration, which is very minimal. Any help is greatly appreciated.

Intern Version: 4.1.5
Selenium-Server-Standalone-Jar Version: 3.8.1
Chromedriver Version: 2.35
OS: Windows 7
Browser: Chrome Stable (v63)

Both chromedriver.exe and selenium-server-standalone-3.8.1.jar are in ./node_modules/@theintern/digdug/selenium-standalone

@jason0x43 jason0x43 added the bug label Jan 26, 2018
@jason0x43
Copy link
Member

It's not just you -- I'd noticed that on occasion, too, but hadn't looked into it much yet. We're probably killing Selenium before it's had a chance to properly shutdown chromedriver, although I would have thought chromedriver would die when Selenium was killed. In any case, we can probably inspect Selenium's output to determine when chromedriver has been shut down before sending the SIGINT.

jason0x43 added a commit that referenced this issue Mar 20, 2018
Use tree-kill to try to ensure all processes in the Selenium tree are killed
during Selenium shutdown.

references #58
@jason0x43
Copy link
Member

This should be fixed in c2c0347, which is included in release 2.1.0. If the issue comes up again, we can reopen this.

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

No branches or pull requests

2 participants