Issue 3378 in selenium: Calling Quit on the Chrome IWebDriver instance does not kill the spawned chromedriver.exe instance

2,148 views
Skip to first unread message

sele...@googlecode.com

unread,
Feb 15, 2012, 1:51:09 PM2/15/12
to selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3378 by ap...@vauto.com: Calling Quit on the Chrome IWebDriver
instance does not kill the spawned chromedriver.exe instance
http://code.google.com/p/selenium/issues/detail?id=3378

Calling Quit on the Chrome IWebDriver instance does not kill the spawned
chromedriver.exe instance.

Webdriver 2.16

sele...@googlecode.com

unread,
Feb 16, 2012, 10:28:36 AM2/16/12
to selenium-develope...@googlegroups.com

Comment #1 on issue 3378 by ap...@vauto.com: Calling Quit on the Chrome
IWebDriver instance does not kill the spawned chromedriver.exe instance
http://code.google.com/p/selenium/issues/detail?id=3378

Looking at the C# API, I don't see a Stop() method to end the service. All
I see is a Start() method.

sele...@googlecode.com

unread,
Feb 16, 2012, 12:51:45 PM2/16/12
to selenium-develope...@googlegroups.com
Updates:
Status: NeedsClarification

Comment #2 on issue 3378 by james.h....@gmail.com: Calling Quit on the

Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

The service start/stop code was slightly reconfigured in 2.19. Could you
try that and see if it resolves your issue? If not, an example that
reproduces your issue would be most welcome.

sele...@googlecode.com

unread,
Feb 17, 2012, 3:19:10 PM2/17/12
to selenium-develope...@googlegroups.com

Comment #4 on issue 3378 by james.h....@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

http://code.google.com/p/selenium/downloads/list

sele...@googlecode.com

unread,
May 10, 2012, 12:16:12 AM5/10/12
to selenium-develope...@googlegroups.com

Comment #5 on issue 3378 by brad.la...@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

I have similar issue, i'm using just driver.close() in the remote webdriver
via java API. (version 19 of chromedriver) using 2.21 of standalone server.

14:08:17.876 INFO - Done: /session/1336611907264/element
14:08:18.921 INFO - Executing: [close window] at URL:
/session/1336611907264/window)
[0510/140818:ERROR:ipc_channel_win.cc(124)] pipe error: 109
[0510/140818:ERROR:automation_proxy.cc(387)] Channel error in
AutomationProxy.
[0510/140818:ERROR:automation_proxy.cc(387)] Channel error in
AutomationProxy.
.\test\automation\proxy_launcher.cc(305): error: Value of: browser.get()
Actual: false
Expected: true
14:08:19.578 INFO - Done: /session/1336611907264/window


sele...@googlecode.com

unread,
May 10, 2012, 7:32:25 AM5/10/12
to selenium-develope...@googlegroups.com

Comment #6 on issue 3378 by james.h....@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

@brad.latus (comment 5) Using driver.close() will explicitly *not* clean up
all resources, including stopping and exiting the chromedriver.exe process.
You should be using driver.quit() to get this expected behavior.

sele...@googlecode.com

unread,
May 10, 2012, 7:45:58 PM5/10/12
to selenium-develope...@googlegroups.com

Comment #7 on issue 3378 by brad.la...@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

I have since changed to driver.quit().

It still leaves sessions open at least on win 2008 enterprise where my
tests are currently running.

They also do not die when selenium server quits it appears.


sele...@googlecode.com

unread,
May 11, 2012, 1:00:37 PM5/11/12
to selenium-develope...@googlegroups.com
Updates:
Labels: Component-WebDriver Browser-Chrome

Comment #8 on issue 3378 by barancev: Calling Quit on the Chrome IWebDriver
instance does not kill the spawned chromedriver.exe instance
http://code.google.com/p/selenium/issues/detail?id=3378

(No comment was entered for this change.)

sele...@googlecode.com

unread,
May 14, 2012, 6:37:06 AM5/14/12
to selenium-develope...@googlegroups.com

Comment #9 on issue 3378 by ramesh...@gmail.com: Calling Quit on the Chrome
IWebDriver instance does not kill the spawned chromedriver.exe instance
http://code.google.com/p/selenium/issues/detail?id=3378

Facing the same issue with Windows 2008 server .Multiple process of
chromedriver.exe still remain open in task manager after calling
webdriver.quit

sele...@googlecode.com

unread,
May 24, 2012, 8:53:35 AM5/24/12
to selenium-develope...@googlegroups.com

Comment #10 on issue 3378 by jan.c.ke...@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

Facing the same issue with Windows7, running selenium 2.21 from java.
I tried with close, quit and close and quit. The driver is always hanging.
chromedriver.log does not show any error. My taskmgr shows chromedriver.exe.

sele...@googlecode.com

unread,
May 29, 2012, 5:12:35 AM5/29/12
to selenium-develope...@googlegroups.com

Comment #11 on issue 3378 by jan.c.ke...@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

Tried with chromedriver version=19.0.1068.0 and with version=20.0.1133.0,
against selenium driver 2.21.

sele...@googlecode.com

unread,
May 29, 2012, 9:58:44 AM5/29/12
to selenium-develope...@googlegroups.com

Comment #12 on issue 3378 by jan.c.ke...@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

I managed to solve this issue by using ChromeDriver instead of
remotewebdriver for my driver. Old code:
DesiredCapabilities chromeCapabilities = DesiredCapabilities.chrome();
chromeCapabilities.setCapability(CapabilityType.TAKES_SCREENSHOT,true);

System.setProperty("webdriver.chrome.driver",
PropertyHolder.testProperties.("ChromedriverPath"));

ChromeDriverService service = new ChromeDriverService.Builder()
.usingChromeDriverExecutable(new
File(PropertyHolder.testProperties.("ChromedriverPath")))
.usingAnyFreePort().build();

logger.info("Starting chrome driver service..");
service.start();

WebDriver driverGC = new
RemoteWebDriver(service.getUrl(),chromeCapabilities);


New code:

DesiredCapabilities chromeCapabilities = DesiredCapabilities.chrome();
System.setProperty("webdriver.chrome.driver",
PropertyHolder.testProperties.("ChromedriverPath"));
WebDriver driverGC = new ChromeDriver(chromeCapabilities);

I guess my service never got stopped. That is an easy explanation.

Regards Jan.


sele...@googlecode.com

unread,
Nov 30, 2012, 7:00:54 AM11/30/12
to selenium-develope...@googlegroups.com

Comment #13 on issue 3378 by julien.c...@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

I was reproducing the exact same issue with selenium-server-standalone
2.26.0 and chromedriver_win_23.0.1240.0 under Windows Server 2008 R2 (x86).

Calling driver.quit() works fine.
Whereas driver.close() hangs. Note that only happens in that specific
environment; on various Linux and Mac OS and a few other Windows versions,
driver.close() does not hang.

sele...@googlecode.com

unread,
Jan 21, 2013, 4:22:36 AM1/21/13
to selenium-develope...@googlegroups.com

Comment #14 on issue 3378 by Kamatchi...@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

I'm facing issue in invoking chrome in Windows Server 2008 to under scripts
using selenium. It is installed in the path C:\\Program Files
(x86)\\Google\\Chrome\\Application\\chrome.exe. It says Chrome binary not
found. What to do?


sele...@googlecode.com

unread,
Feb 1, 2013, 7:19:21 AM2/1/13
to selenium-develope...@googlegroups.com

Comment #15 on issue 3378 by ranjitha...@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

Hi,
I am Facing the same issue in Windows7, with running
selenium-java-2.28.0.and
selenium-server-standalone-2.28.0.
I tried with close, quit. The driver is always hanging. due to this process
getting slow.

My taskmgr shows chromedriver.exe.

sele...@googlecode.com

unread,
May 2, 2013, 10:53:23 AM5/2/13
to selenium-develope...@googlegroups.com

Comment #16 on issue 3378 by t...@filmchicago.org: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

@james.h (comment 6) "Using driver.close() will explicitly *not* clean up
all resources, including stopping and exiting the chromedriver.exe process.
You should be using driver.quit() to get this expected behavior."

If you look at the Javadoc for WebDriver close(), it states:

"Close the current window, quitting the browser if it's the last window
currently open."
See:
http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/WebDriver.html#close()

So calling close() _should_ close the browser/driver instance should it
not? Or is the browser considered separate from the driver? I thought they
were part and parcel and if the browser instance closes you've effectively
killed your driver session as well. AFAIK there is no way to reopen the
browser once you've closed the last window.

Thanks,
Tim

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

sele...@googlecode.com

unread,
May 2, 2013, 11:07:36 AM5/2/13
to selenium-develope...@googlegroups.com

Comment #17 on issue 3378 by james.h....@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

@16 Yes, the driver executable and browser are separate. Consider the case
where you've manually started the chromedriver executable, and are using
RemoteWebDriver to connect to it. In that case, you expressly do *not* want
the quit() method to close the driver executable, just the browser session
and all of its associated windows. The driver executable has no way to
distinguish between these two scenarios merely from receiving the HTTP
request made by the quit() method.

sele...@googlecode.com

unread,
May 8, 2013, 10:18:44 AM5/8/13
to selenium-develope...@googlegroups.com

Comment #18 on issue 3378 by t...@filmchicago.org: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

@17 But consider this problem: With Selenium Server running on a machine
(I've only tested in standalone configuration, not with a hub yet), if a
test is run with chrome as the desired browser, and the driver instance is
not properly quit() at the end of the test - let's say the test
fails/crashes or is quit prematurely (such as when debugging in an IDE),
then you will end up with background instances of ChromeDriver running on
the Selenium Server machine which _never_ get cleaned up, regardless of the
timeout value for Selenium Server. This is not typically a problem for me
except when I am debugging in an IDE and stop my browser prematurely, but
it is a problem. ChromeDriver should at least provide some way for it to
time out or be closed automatically when called by Selenium Server so that
we do not end up with rogue processes running on remote selenium grid
servers. I intend on setting up a grid in the very near future and this is
a concern for me.

I think the real problem in the above scenario is probably with the
behavior of Selenium Server itself not handling the timeout for the Chrome
Driver properly.


| timeout | Controls how long the client is is allowed to be gone before
the session is reclaimed (value in seconds) |

sele...@googlecode.com

unread,
May 8, 2013, 11:44:55 AM5/8/13
to selenium-develope...@googlegroups.com

Comment #19 on issue 3378 by james.h....@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

@tim The onus is on the automator to ensure quit() is properly called. Full
stop. In test code, most testing frameworks provide a suitable hook method
run at the conclusion of a test case or series of test cases for exactly
this purpose. For debugging in an IDE, you as a developer need to be aware
of the state of your system and to adjust accordingly if you prematurely
stop WebDriver code.

At any rate, this doesn't have anything to do with the original issue.
We've strayed from "calling quit() doesn't shut down chromedriver.exe"
to "chromedriver.exe doesn't shut itself down after magically detemining
I'm through with it." If someone can provide a consistent repro case for
the former, it'd be worth looking at. If people want to continue to discuss
the latter, I'm happy to do so on IRC (#selenium on freenode.net), but this
issue's comments are not the appropriate place for that conversation.

sele...@googlecode.com

unread,
Jun 26, 2013, 5:10:38 AM6/26/13
to selenium-develope...@googlegroups.com

Comment #20 on issue 3378 by aro...@gmail.com: Calling Quit on the Chrome
IWebDriver instance does not kill the spawned chromedriver.exe instance
http://code.google.com/p/selenium/issues/detail?id=3378

I'm also experiencing this on Windows 7 (quit does not shut down the driver
process on the Remote server).
We have to log on every couple of days to kill off the driver processes.

sele...@googlecode.com

unread,
Aug 26, 2013, 1:47:54 PM8/26/13
to selenium-develope...@googlegroups.com

Comment #21 on issue 3378 by Jfreak...@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

I'm using NUnit. Driver.Quit(); is in my TearDown method. If the test hits
an exception, the ChromeDriver instance is not closed and just sits there.
How can I prevent zombie instances of ChromeDriver when automating the test
process?

sele...@googlecode.com

unread,
Aug 28, 2013, 1:45:00 PM8/28/13
to selenium-develope...@googlegroups.com

Comment #22 on issue 3378 by Jfreak...@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

I've solved my problem. I was running the tests on an external server which
did not, as it eventually turned out, actually have Chrome installed.

sele...@googlecode.com

unread,
Aug 30, 2013, 5:15:46 PM8/30/13
to selenium-develope...@googlegroups.com

Comment #23 on issue 3378 by Curtis.K...@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

I'm having this same issue with Windows 2012 Server, Remote Web Driver,
Chrome

sele...@googlecode.com

unread,
Sep 23, 2013, 4:38:37 AM9/23/13
to selenium-develope...@googlegroups.com

Comment #24 on issue 3378 by aidan.mc...@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

@james.h

Have this issue on Chromedriver v2.3 , chrome Version 29.0.1547.76 and
Selenium Grid with 4 nodes.
By the end of the run all nodes are at 100% CPU usage.

Using RemoteWebDriver.Quit()
Does the fix in #12 still stand or is there another solution
?

sele...@googlecode.com

unread,
Sep 23, 2013, 4:53:23 AM9/23/13
to selenium-develope...@googlegroups.com
Updates:
Cc: kka...@google.com

Comment #25 on issue 3378 by barancev: Calling Quit on the Chrome
IWebDriver instance does not kill the spawned chromedriver.exe instance
http://code.google.com/p/selenium/issues/detail?id=3378

(No comment was entered for this change.)

sele...@googlecode.com

unread,
Sep 25, 2013, 2:18:58 PM9/25/13
to selenium-develope...@googlegroups.com

Comment #26 on issue 3378 by salm...@gmail.com: Calling Quit on the Chrome
IWebDriver instance does not kill the spawned chromedriver.exe instance
http://code.google.com/p/selenium/issues/detail?id=3378

I'm experiencing similar issue and i have windows 7 professional, chrome
driver v2.3, chrome browser 29.0.1547.76, with selenium-dotnet-2.35.0
binding. when driver could not find an element, it's not closing the
browser. Even though I'm calling driver.quit in teardown method.

sele...@googlecode.com

unread,
Sep 25, 2013, 2:21:41 PM9/25/13
to selenium-develope...@googlegroups.com

Comment #27 on issue 3378 by salm...@gmail.com: Calling Quit on the Chrome
IWebDriver instance does not kill the spawned chromedriver.exe instance
http://code.google.com/p/selenium/issues/detail?id=3378

I'm experiencing similar issue like #21.i have windows 7 professional,

sele...@googlecode.com

unread,
Sep 25, 2013, 2:39:24 PM9/25/13
to selenium-develope...@googlegroups.com

Comment #29 on issue 3378 by salm...@gmail.com: Calling Quit on the Chrome

sele...@googlecode.com

unread,
Sep 25, 2013, 2:40:24 PM9/25/13
to selenium-develope...@googlegroups.com

Comment #28 on issue 3378 by salm...@gmail.com: Calling Quit on the Chrome

sele...@googlecode.com

unread,
Oct 18, 2013, 6:35:54 AM10/18/13
to selenium-develope...@googlegroups.com
Updates:
Cc: -kka...@google.com james.h....@gmail.com
Labels: Lang-CSharp

Comment #30 on issue 3378 by barancev: Calling Quit on the Chrome
IWebDriver instance does not kill the spawned chromedriver.exe instance
http://code.google.com/p/selenium/issues/detail?id=3378

Is there any evidence of the fact that calling Quit on the Chrome driver
does not kill the chromedriver.exe in the recent versions of Selenium .Net
binding?

Please provide a reproduction scenario and make sure that your code
*really* calls Quit (that is if you use a testing framework make sure your
teardown method is *really* executed, not skipped due to a test failure).

sele...@googlecode.com

unread,
Dec 3, 2013, 3:56:08 AM12/3/13
to selenium-develope...@googlegroups.com

Comment #31 on issue 3378 by martin.l...@gmail.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
http://code.google.com/p/selenium/issues/detail?id=3378

It's kinda strange but it works for me. I had the same issue, after several
debugging sessions I found that there was still a UI action going on in the
browser (URL loading or so), when I hit WebDriver.Quit().

The solution for me (altough very nasty) was to add a Sleep() of 3 seconds
before calling Quit().

sele...@googlecode.com

unread,
Dec 21, 2013, 4:52:37 PM12/21/13
to selenium-develope...@googlegroups.com
Updates:
Status: Fixed

Comment #32 on issue 3378 by barancev: Calling Quit on the Chrome
IWebDriver instance does not kill the spawned chromedriver.exe instance
http://code.google.com/p/selenium/issues/detail?id=3378

Closing as fixed, feel free to reopen if the issue is still actual.

sele...@googlecode.com

unread,
Sep 8, 2014, 4:16:48 AM9/8/14
to selenium-develope...@googlegroups.com

Comment #33 on issue 3378 by paras.pa...@lmsin.com: Calling Quit on the
Chrome IWebDriver instance does not kill the spawned chromedriver.exe
instance
https://code.google.com/p/selenium/issues/detail?id=3378

test
Reply all
Reply to author
Forward
0 new messages