ericmckean / chromedriver

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

Proxy settings without local bypass cause chromedriver to hang/fail. #506

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start Internet Explorer.
2. Go to Tools -> Internet options.
3. Select the Connections tab and click on LAN settings.
4. Tick Select a proxy server for your LAN. Type in the address and Port of 
your proxy. Ensure Bypass proxy sever for local addresses is unticked. Click OK.
5. Click OK.
6. Click OK.
7. Close IE.
8. Run the following python script:
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium import webdriver
caps = getattr(DesiredCapabilities, "CHROME")
seleniumhost = "<seleniumhubaddress>"
driver = webdriver.Remote("http://%s:4444/wd/hub" % (seleniumhost), caps)

Expected results:
Chrome to appear, python prompt to return without error.

Actual result:
Chrome window appears with its location bar set to 
"data:text/html;charset=utf-8," but after a few seconds the following is 
printed at the python console:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 72, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 114, in start_session
    'desiredCapabilities': desired_capabilities,
  File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 165, in execute
    self.error_handler.check_response(response)
  File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 164, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: u"chrome not 
reachable\n  (Driver info: chromedriver=2.2,platform=Windows NT 6.1 SP1 x86_64) 
(WARNING: The server did not provide any stacktrace information)\nCommand 
duration or timeout: 21.57 seconds\nBuild info: version: '2.35.0', revision: 
'c916b9d', time: '2013-08-12 15:42:01'\nSystem info: os.name: 'Windows 7', 
os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_25'\nDriver info: 
org.openqa.selenium.chrome.ChromeDriver" ; Stacktrace: 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (None:-2)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance (None:-1)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (None:-1)
    at java.lang.reflect.Constructor.newInstance (None:-1)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable (ErrorHandler.java:191)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed (ErrorHandler.java:145)
    at org.openqa.selenium.remote.RemoteWebDriver.execute (RemoteWebDriver.java:554)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession (RemoteWebDriver.java:216)
    at org.openqa.selenium.remote.RemoteWebDriver.<init> (RemoteWebDriver.java:111)
    at org.openqa.selenium.remote.RemoteWebDriver.<init> (RemoteWebDriver.java:115)
    at org.openqa.selenium.chrome.ChromeDriver.<init> (ChromeDriver.java:150)
    at org.openqa.selenium.chrome.ChromeDriver.<init> (ChromeDriver.java:129)
    at sun.reflect.GeneratedConstructorAccessor19.newInstance (None:-1)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (None:-1)
    at java.lang.reflect.Constructor.newInstance (None:-1)
    at org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor (DefaultDriverFactory.java:62)
    at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance (DefaultDriverFactory.java:56)
    at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call (DefaultSession.java:215)
    at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call (DefaultSession.java:1)
    at java.util.concurrent.FutureTask$Sync.innerRun (None:-1)
    at java.util.concurrent.FutureTask.run (None:-1)
    at org.openqa.selenium.remote.server.DefaultSession$1.run (DefaultSession.java:169)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (None:-1)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (None:-1)
    at java.lang.Thread.run (None:-1) 

What version of the product are you using? On what operating system?
ChromeDriver = chromedriver_win32_2.2
Chrome = Version 29.0.1547.62 m
OS = Windows 7

How reproducible is the issue?
It is reproducible every time.

Additional information:
Ticking "Ensure Bypass proxy sever for local addresses" makes the issue go away 
and chrome driver works fine. This makes it sound like this is Issue #321 . In 
fact Issue #321 Comment #9 says:
'For me this was caused by having configured a proxy and not having selected 
"bypass local addresses"'
but that comment seems to have been ignored and the issue is in 
NeedsClarification.

I'm going to to attach a registry file that triggers the problem for me.

Please attach chromedriver.log to your bug report if possible - I have no idea 
how to get this when using RemoteWebDriver from Python.

Original issue reported on code.google.com by sits...@gmail.com on 2 Sep 2013 at 11:54

Attachments:

GoogleCodeExporter commented 9 years ago
Happens all the time-
chromedriver=2.10.267521 

Browser:Chrome 37

Could you please make Chrome driver overcome this situation in your next 
release?

It would be helpful to a lot of people if chrome driver doesn't depend on this 
'bypass proxy' especially in larger company settings where they have no 
permission to change it.

Thanks Chromium team.

Original comment by rin...@gmail.com on 17 Sep 2014 at 9:12

GoogleCodeExporter commented 9 years ago

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