ericmckean / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

os/x chrome Version 22.0.1229.79 / get fails on certain URI's #157

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is using selenium 2.25.0, python bindings 

What steps will reproduce the problem?
1.
2.
3.

Simplified test case or site demonstrating the problem:

MacBook-Pro-2:workspace yak007$ python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from selenium import webdriver
>>> from selenium.common.exceptions import TimeoutException
>>> from selenium.webdriver.support.ui import WebDriverWait
>>> import time
>>> b = webdriver.Chrome()
>>> b.get("http://www.google.com")
>>> b.get("http://jama.jamanetwork.com")
>>> b.get("http://jama.jamanetwork.com/journal.aspx")
>>> b.get("http://jama.jamanetwork.com/article.aspx?articleid=1104871")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/me/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 168, in get
    self.execute(Command.GET, {'url': url})
  File "/Users/me/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 154, in execute
    response = self.command_executor.execute(driver_command, params)
  File "/Users/me/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 283, in execute
    return self._request(url, method=command_info[0], data=data)
  File "/Users/me/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 324, in _request
    response = opener.open(request)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 400, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 418, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1207, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1177, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 61] Connection refused>
>>> f=webdriver.Firefox()
>>> f.get("http://jama.jamanetwork.com/article.aspx?articleid=1104871")
>>> 

====  NOTE:
This worked in chromedriver_mac_21.0.1180.4 and Chrome V.21.xxx
===

What version of the product are you using? On what operating system?
ChromeDriver = chromedriver_mac_23.0.1240.0
Chrome = 22.0.1229.79
OS = OS X 10.8.2

Please attach chromedriver.log to your bug report if possible.

Original issue reported on code.google.com by yarkot1 on 27 Sep 2012 at 10:17

Attachments:

GoogleCodeExporter commented 9 years ago
...not sure what happened w/ copy/paste - all those b.get() calls pasted _did_ 
have closing parenthesis when run (just checked screen I copied them from)...

Original comment by yarkot1 on 27 Sep 2012 at 10:19

GoogleCodeExporter commented 9 years ago
Continuting:   chromedriver apparently hangs, not returning with the contents 
of this URL (and any suburl, as in the original post):

MacBook-Pro-2:workspace yak007$ python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from selenium import webdriver
>>> b = webdriver.Chrome()
>>> b.current_url
u'about:blank'
>>> b.get("http://jama.jamanetwork.com")
>>> b.current_url         ###  Never returns;  same, e.g., for b.page_source
^CTraceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 418, in current_url
    return self.execute(Command.GET_CURRENT_URL)['value']
  File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 155, in execute
    response = self.command_executor.execute(driver_command, params)
  File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 339, in execute
    return self._request(url, method=command_info[0], data=data)
  File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 381, in _request
    response = opener.open(request)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 400, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 418, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1207, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1180, in do_open
    r = h.getresponse(buffering=True)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1030, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 407, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 365, in _read_status
    line = self.fp.readline()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 447, in readline
    data = self._sock.recv(self._rbufsize)
KeyboardInterrupt
>>> 
------------------

NOTE:
Saving this full page (any from this site) and opening that file URL does not 
exhibit this problem.

Python Selenium:  2.26.0
chromedriver version=23.0.1240.0
Google Chrome Version 23.0.1271.64
Max OS/X  10.8.2 (12C60)

Original comment by yarkot1 on 22 Nov 2012 at 10:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Previous comment may be different issue; is different driver & python-selenium 
versions - posted as issue #170

Original comment by yarkot1 on 22 Nov 2012 at 10:31

GoogleCodeExporter commented 9 years ago
I experience the same issue with the same chrome version as posted in comment 
#2.

Appears to be due to the recent chrome update v23.0.1271.64

Original comment by chris.p....@gmail.com on 22 Nov 2012 at 2:57

GoogleCodeExporter commented 9 years ago
...also note that the operations in comment #2 work fine for other URI's, for 
example - www.google.com   Suggesting some interaction with the content.   I 
had at first suspected a buffer overflow kind of issue, which is why I tried 
saving the page, but the problem doesn't repeat for that URI saved to file.   
I'm guessing this is, then, some interaction with this particular URI and on 
screen scripts / advertisements (appears to be virtually for every URL under 
jama.jamanetwork.com).

Original comment by yarkot1 on 22 Nov 2012 at 6:51

GoogleCodeExporter commented 9 years ago
with an update to python-selenium==2.28.0,  and
Chrome Version 23.0.1271.101
(all else the same)

Some things work better, but:

$ python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from selenium import webdriver
>>> b = webdriver.Chrome()
>>> b.get("www.google.com")
>>> b.current_url
u'chrome://newtab/'
>>> b.get("http://www.google.com")
>>> b.current_url
u'http://www.google.com/'
>>> b.get("http://docs.python.org")
>>> b.current_url
u'http://docs.python.org/3/'
>>> b.get("http://jama.jamanetwork.com")
>>> b.current_url
^CTraceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 418, in current_url
    return self.execute(Command.GET_CURRENT_URL)['value']
  File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 155, in execute
    response = self.command_executor.execute(driver_command, params)
  File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 339, in execute
    return self._request(url, method=command_info[0], data=data)
  File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 381, in _request
    response = opener.open(request)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 400, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 418, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1207, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1180, in do_open
    r = h.getresponse(buffering=True)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1030, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 407, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 365, in _read_status
    line = self.fp.readline()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 447, in readline
    data = self._sock.recv(self._rbufsize)
KeyboardInterrupt
>>> 

Repeated w/ last URL typed directly into browser, then issued "b.current_url" 
(this is what attached log reflects)

Original comment by yarkot1 on 28 Dec 2012 at 9:33

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by kkania@chromium.org on 13 Mar 2013 at 11:55

GoogleCodeExporter commented 9 years ago

Original comment by kkania@chromium.org on 14 Mar 2013 at 9:20

GoogleCodeExporter commented 9 years ago

Original comment by kkania@chromium.org on 14 Mar 2013 at 9:21

GoogleCodeExporter commented 9 years ago

Original comment by kkania@chromium.org on 14 Mar 2013 at 10:26

GoogleCodeExporter commented 9 years ago
I also meet the same hanging problem on the next command right after i get 
value from current_url or get value with get_attribute.

I'm working on Mac using python to control chrome via webdriver 2.
Chrome version 27.0.1453.93.

Original comment by spring...@appier.com on 5 Jun 2013 at 10:54

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:18