New issue
Advanced search Search tips

Issue 711345 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Apr 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Python Crashes after Calling Selenium's driver.quit() Method in Google Chrome 57

Reported by chrisatp...@gmail.com, Apr 13 2017

Issue description

Chrome Version       : 57.0.2987.133
URLs (if applicable) :
Other browsers tested: Unknown
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari:
    Firefox:
         IE:

What steps will reproduce the problem?
(1) Launch Selenium 3.0.2
(2) With Python 3.6
(3) Utilize Chromedriver 2.29
(3) Execute e2e test or just open webdriver.Chrome() and navigate to URL
(4) call driver.quit()

What is the expected result?
The expected result is the browser will close and Python will continue to execute whatever else is left in the script.

What happens instead?
The browser closes as expected and then Python throws this error:

Traceback (most recent call last):
  File "01-LegendPanel-test.py", line 179, in <module>
    driver.quit()
  File "/home/pgadmin/anaconda3/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 90, in quit
    self.service.stop()
  File "/home/pgadmin/anaconda3/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 149, in stop
    self.send_remote_shutdown_command()
  File "/home/pgadmin/anaconda3/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 125, in send_remote_shutdown_command
    url_request.urlopen("%s/shutdown" % self.service_url)
  File "/home/pgadmin/anaconda3/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/home/pgadmin/anaconda3/lib/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/home/pgadmin/anaconda3/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/home/pgadmin/anaconda3/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/home/pgadmin/anaconda3/lib/python3.6/urllib/request.py", line 1346, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/home/pgadmin/anaconda3/lib/python3.6/urllib/request.py", line 1321, in do_open
    r = h.getresponse()
  File "/home/pgadmin/anaconda3/lib/python3.6/http/client.py", line 1331, in getresponse
    response.begin()
  File "/home/pgadmin/anaconda3/lib/python3.6/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/home/pgadmin/anaconda3/lib/python3.6/http/client.py", line 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7fdd0733dd68>>
Traceback (most recent call last):
  File "/home/pgadmin/anaconda3/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 173, in __del__
  File "/home/pgadmin/anaconda3/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 149, in stop
  File "/home/pgadmin/anaconda3/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 120, in send_remote_shutdown_command
ImportError: sys.meta_path is None, Python is likely shutting down


This bug started happening on Monday April 10, 2017.

 
Cc: gmanikpure@chromium.org
gmanikpure@ can you please triage the bug accordingly.
Components: Tests>WebDriver
Labels: Needs-Feedback
chrisatplanitgeo@,

Error "ImportError: sys.meta_path is None, Python is likely shutting down" does not look related to Chromedriver. 

I executed the below sample test and it works fine on Chrome v57 with Chromedriver v2.29 :

from selenium import webdriver
browser = webdriver.Chrome(executable_path='/path/to/chromedriver')
browser.get('http://google.com')
browser.quit()

Is this different from what you are trying to do? Please share repro test.
Cc: -gmanikpure@chromium.org
Labels: -Needs-Feedback
Status: WontFix (was: Unconfirmed)
There is no response from the issue reporter for > 2 weeks. Closing the issue.

Sign in to add a comment