Issue 3951 in selenium: 3 hour timeout before getting UnreachableBrowserException

421 views
Skip to first unread message

sele...@googlecode.com

unread,
May 23, 2012, 10:07:20 AM5/23/12
to selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged

New issue 3951 by arthur.b...@gmail.com: 3 hour timeout before getting
UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

I have an automated browser task written in java that runs around the
clock, using selenium webdriver.

Occasionally, the browser crashes or exits unexpectedly. I haven't figured
out why that is happening. I upgraded to the latest version of selenium
(was running 2.14.0), and now it's even worse because when the browser
crashes, while the program is waiting for some kind of page element (via
driver.findElement method), the implicit timeout is no longer respected,
and instead, there is a 3 hour (!!) timeout before the program gets an
org.openqa.selenium.remote.UnreachableBrowserException. Is there any way I
can adjust that timeout? Ideally, if the browser crashes, I should get that
UnreachableBrowserException immediately.

Selenium version: 2.21.0
OS: Windows 2008 R2 Server
Browser: IE
Browser version: 9
JVM: 1.6.0_32, 64 bit

Thank you.

sele...@googlecode.com

unread,
May 23, 2012, 2:54:17 PM5/23/12
to selenium-develope...@googlegroups.com

Comment #1 on issue 3951 by nathan.c...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

We have seen this exact issue as well.

Selenium version: 2.21.0
Test Invocation OS: Win Server 2008 R2 (x86) - Java 1.6.0_31 (x86)
Hub OS: Win7 SP1 (x64)
Browser: FF
Browser version: ESR (10.0.2)
JVM: 1.6.0_32, 64 bit

sele...@googlecode.com

unread,
May 24, 2012, 2:17:12 AM5/24/12
to selenium-develope...@googlegroups.com
Updates:
Labels: Component-WebDriver

Comment #2 on issue 3951 by barancev: 3 hour timeout before getting
UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

(No comment was entered for this change.)

sele...@googlecode.com

unread,
Aug 29, 2012, 3:26:21 PM8/29/12
to selenium-develope...@googlegroups.com

Comment #3 on issue 3951 by sandeepj...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

This is a very critical issue esp. as selenium is adopted more and more and
is run round he clock to test business critical applications around the
clock. Similar issues raised in the past are 3874 and 3000.

Can we triage this issue on priority and resolve? We can provide any
additional information that may be needed to triage this defect and
prioritize for resolution in next release of WebDriver.

sele...@googlecode.com

unread,
Aug 30, 2012, 1:56:33 AM8/30/12
to selenium-develope...@googlegroups.com

Comment #4 on issue 3951 by princeke...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

We have seen exact behaviour as well.

Selenium Version : 2.25.0
OS : Windows 7 (x86)
Browser : IE 8.0.7601.17514


sele...@googlecode.com

unread,
Sep 10, 2012, 3:07:35 PM9/10/12
to selenium-develope...@googlegroups.com

Comment #5 on issue 3951 by L33tCode...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

I see this too. It only started recently. It seems from looking at the
source that the three hours is caused by the TIMEOUT_THREE_HOURS variable
located in HttpClientFactory.java. However, this value gets overridden if
a timeout greater than 0 is specified. Looking at a previous commit
(r14737):

"The final piece of the hub/node timeout puzzle; so_timeout
made proportional to browserTimeout on node"

I went into the each node and specified browserTimeout as 60 seconds.
However I am still seeing the issue.


sele...@googlecode.com

unread,
Sep 10, 2012, 3:09:30 PM9/10/12
to selenium-develope...@googlegroups.com

Comment #6 on issue 3951 by L33tCode...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

I see this too. It only started recently. It seems from looking at the
source that the three hours is caused by the TIMEOUT_THREE_HOURS variable
located in HttpClientFactory.java. However, this value gets overridden if
a timeout greater than 0 is specified. Looking at a previous commit
(r16445):

sele...@googlecode.com

unread,
Sep 12, 2012, 2:43:49 PM9/12/12
to selenium-develope...@googlegroups.com

Comment #7 on issue 3951 by davidurb...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

I have the same issue on two different machines using the latest version of
selenium (2.25.0). Any ideas on the solution yet?

sele...@googlecode.com

unread,
Oct 10, 2012, 8:09:58 AM10/10/12
to selenium-develope...@googlegroups.com

Comment #8 on issue 3951 by ShadowsA...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Found the same UnreachableBrowserException: When the browser dies (mine is
chrome and dies because there's an element that he doesn't find), the
browser is kept there. Meaning that the driver doesn't close() as it should.
When executing another test, since the browser is already there, the node
is considered occupied.

I get the UnreachableBrowserException when closing the grid itself. If we
could reprogram the 3 hour timeout. That would solve most problems here.
Any way to do it?

sele...@googlecode.com

unread,
Nov 19, 2012, 8:56:27 AM11/19/12
to selenium-develope...@googlegroups.com

Comment #9 on issue 3951 by P.Mo...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

We have also hit this issue, and would also really like a way of limiting
this timeout to 1 hour/30 mins, aswell as finding a way to kill the browser
session at this point. As documented in comment 8, my browser sessions are
kept open, causing issues down the line where further automated tests are
unable to find a suitable node with capabilities.

We are considering adding some code to each node, killing any browser
sessions that last longer than a specified time. Has anyone tried doing
this?

Do we have an eta on this at all?

sele...@googlecode.com

unread,
Nov 23, 2012, 5:13:10 AM11/23/12
to selenium-develope...@googlegroups.com

Comment #10 on issue 3951 by martin.p...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

I had this issue a while ago, and it went away, however it seems to have
come back again in the last few days. Ubuntu with Firefox 17 and Selenium
2.25.0.
It's possible that this firefox update is the most recent change to my
system.

sele...@googlecode.com

unread,
Nov 23, 2012, 7:10:13 AM11/23/12
to selenium-develope...@googlegroups.com

Comment #11 on issue 3951 by martin.p...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Some more info on this. Have now tried with Selenium 2.26 and get the same
problem. Running on Windows with Firefox 17 and running in my debugger it
looks like the 'hang' is happening in:
Thread [Forwarding clickElement on session
aeeea793-071e-4922-b271-d8fbfa2107e7 to remote] (Running)

The click has taken effect and the page is now displaying the 'new page'
that the click should have loaded, but the clickElement call doesn't seem
to have returned.

Manually hitting F5 on the browser to refresh the page brings things back
to life and the test carries on.

It's certainly not every 'clickElement' that results in this hang, but some
do more than others.
I'm clicking in sequence on 4 'tabs' on a page to get the different tabs to
load. The 3rd has sometimes 'paused' and the 4th frequently does.

The 'tabs' have the following code behind them

<li id="billingMainMenu" class="menuItem summary">
<script type="text/javascript">
/* <![CDATA[ */
$('#billingMainMenu').click(function(){
window.location.href="/ui/billing/instance/120";
});
/* ]]> */
</script>

<a href="/ui/billing/instance/120">Billing</a>
</li>




sele...@googlecode.com

unread,
Nov 23, 2012, 7:25:16 AM11/23/12
to selenium-develope...@googlegroups.com

Comment #12 on issue 3951 by martin.p...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Downgrading Firefox to 16.2 has fixed this problem, so I guess it's an
issue with Firefox. Does anyone know of a way to tell firefox about this
possible issue?

sele...@googlecode.com

unread,
Nov 29, 2012, 12:07:41 PM11/29/12
to selenium-develope...@googlegroups.com

Comment #13 on issue 3951 by hertzsprung: 3 hour timeout before getting
UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Using Selenium 2.26.0, I'm having this problem when Firefox 17.0 tries to
navigate to a URL and gets a connection refused. Couldn't we allow a user
to provide their own HttpClientFactory instance and pass it as a dependency
to HttpCommandExecutor's constructor?

sele...@googlecode.com

unread,
Dec 7, 2012, 10:14:30 AM12/7/12
to selenium-develope...@googlegroups.com

Comment #14 on issue 3951 by sca...@savingstar.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Using Selenium 2.25.0 and 2.26.0 with Firefox 17.0 both display the
problem, Only Fix was to downgrade to 16.x Firefox.


sele...@googlecode.com

unread,
Dec 7, 2012, 10:48:18 AM12/7/12
to selenium-develope...@googlegroups.com

Comment #15 on issue 3951 by barancev: 3 hour timeout before getting
UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

... or selenium update to 2.27

sele...@googlecode.com

unread,
Jan 16, 2013, 3:38:29 PM1/16/13
to selenium-develope...@googlegroups.com

Comment #16 on issue 3951 by adi...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

did you try running with java 7 instead of 6?

sele...@googlecode.com

unread,
Jan 16, 2013, 5:53:57 PM1/16/13
to selenium-develope...@googlegroups.com

Comment #17 on issue 3951 by yanaf...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

I also have the same issue. Tired the latest selenium version but still the
same. To the comment above, I'm using Java 6, cannot move to 7 as this is
required.
Is it any way how we can update the property for grid 2 for the following
code in HttpClientFactory in the selenium source:

public HttpParams getHttpParams() {
HttpParams params = new BasicHttpParams();
HttpConnectionParams.setSoReuseaddr(params, true);
HttpConnectionParams.setConnectionTimeout(params, 120 * 1000);
HttpConnectionParams.setSoTimeout(params, TIMEOUT_THREE_HOURS);
params.setIntParameter(ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE, 0);
HttpConnectionParams.setStaleCheckingEnabled(params, true);
return params;
}
Note: we are using RemoteWebdirver with grid 2, executing on FF

sele...@googlecode.com

unread,
Jan 28, 2013, 3:41:30 AM1/28/13
to selenium-develope...@googlegroups.com

Comment #18 on issue 3951 by sentacat...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

I have the same issue with tests randomly hanging in Firefox WebDriver
(Firefox versions ranging from 15 to 18, Selenium 2.25.0 to 2.29.0) but
always works fine in Chrome and IE9.
Despite having both implicit and explicit wait the test never times out but
sometimes it works correctly and passes. It happens on four different
computers, OS is Windows Vista Home Premium, Vista Business and Windows 7.

sele...@googlecode.com

unread,
Feb 1, 2013, 6:33:00 PM2/1/13
to selenium-develope...@googlegroups.com

Comment #19 on issue 3951 by f...@inkwireapp.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Same issue here

sele...@googlecode.com

unread,
Feb 5, 2013, 1:20:34 AM2/5/13
to selenium-develope...@googlegroups.com

Comment #20 on issue 3951 by nikita.p...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

I have also noticed such issue.
Tried different combination of FF (11, 16, 17) and selenium.
Issue was raised for me in 2.26.0

Start tests on VM with autodeployment and can't see the browser. But tests
are able to recover after this issue and continue. Issue was found for
several times during one test cycle execution.

org.openqa.selenium.TimeoutException: Timed out waiting for page load.
Command duration or timeout: 1800.04 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Windows Server 2008 R2', os.arch: 'amd64',
os.version: '6.1', java.version: '1.6.0_35'
Session ID: ea99898d-2a78-4db4-a783-6fb9d52e8a0c
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true,
browserName=firefox, rotatable=false, locationContextEnabled=true,
version=11.0, cssSelectorsEnabled=true, databaseEnabled=true,
handlesAlerts=true, nativeEvents=true, webStorageEnabled=true,
applicationCacheEnabled=true, takesScreenshot=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:533)
at
org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:246)
at
org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:79)
at selenium.actionbot.ActionBot._click(ActionBot.java:57)
at selenium.actionbot.ActionBot.clickLink(ActionBot.java:305)
at hrb.components.elements.BaseElement.click(BaseElement.java:215)
at hrb.components.elements.BaseElement.clickAndWait(BaseElement.java:254)
at hrb.components.elements.BaseElement.clickAndWait(BaseElement.java:250)
at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:21)
at $Proxy5.clickAndWait(Unknown Source)
at hrb.navigation.Menu.clickMessages(Menu.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
testprocess.runner.TestCaseVersionRunner.runTestStep(TestCaseVersionRunner.java:353)
at
testprocess.runner.TestCaseVersionRunner.testCaseVersionProcess(TestCaseVersionRunner.java:205)
at
testprocess.runner.TestCaseVersionRunner.run(TestCaseVersionRunner.java:95)
at testprocess.ProgramRunner.main(ProgramRunner.java:38)
Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException:
Timed out waiting for page load.
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Windows Server 2008 R2', os.arch: 'amd64',
os.version: '6.1', java.version: '1.6.0_35'
Driver info: driver.version: unknown
at <anonymous class>.<anonymous
method>(file:///C:/Users/dtkachenko/anonymous4875730119239664457webdriver-profile/extensions/fxdr...@googlecode.com/components/command_processor.js:7123)
at <anonymous class>.<anonymous
method>(file:///C:/Users/dtkachenko/anonymous4875730119239664457webdriver-profile/extensions/fxdr...@googlecode.com/components/command_processor.js:3234)
at <anonymous class>.<anonymous
method>(file:///C:/Users/dtkachenko/anonymous4875730119239664457webdriver-profile/extensions/fxdr...@googlecode.com/components/command_processor.js:3241)
at <anonymous class>.<anonymous
method>(file:///C:/Users/dtkachenko/anonymous4875730119239664457webdriver-profile/extensions/fxdr...@googlecode.com/components/command_processor.js:382)

sele...@googlecode.com

unread,
Feb 5, 2013, 1:41:55 AM2/5/13
to selenium-develope...@googlegroups.com

Comment #21 on issue 3951 by IronWol...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Same happened to me over the night:

"Fail: Error communicating with the remote browser. It may have died.
Build info: version: '2.29.0', revision: '58258c3', time: '2013-1-17
22:46:43'
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1',
java.version: '1.6.0.30'
Driver info: driver.version: RemoteWebDriver"

i've attached a file of my report showing that we started an action at
00:38:00 and it ended exactly at 03:38:01.

Attachments:
ThreeHourTimeout.jpg 47.4 KB

sele...@googlecode.com

unread,
Apr 26, 2013, 10:44:23 AM4/26/13
to selenium-develope...@googlegroups.com

Comment #22 on issue 3951 by bino...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

I tried to explore this too with a test that intentionally hangs (with a
huge select box)

even if I add a @Test(timeout=5000) to my Junit test that contains the
hanging get() call, it does not return until about 110s on my Windows box
(Java 6)

I have to check other platforms. But if this get call was in my setup
(@Before) I am out of luck and it does not time out for at least 50 minutes
on Windows.

--
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,
Jul 23, 2013, 3:15:17 PM7/23/13
to selenium-develope...@googlegroups.com
Updates:
Status: Accepted
Labels: Component-Grid

Comment #23 on issue 3951 by a.u.savchuk: 3 hour timeout before getting
UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

It was fixed at grid level at revision 0acce3ba7ebc.

Need to fix at node and client levels.

sele...@googlecode.com

unread,
Aug 13, 2013, 6:05:13 PM8/13/13
to selenium-develope...@googlegroups.com

Comment #24 on issue 3951 by ricardo....@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

I am experiencing a similar issue when instantiating RemoteWebDriver. The
call to the constructor just hangs there waiting on socket input. Is there
any way to break away from it. Interrupting the thread doesnt seem to do
much.

Thank you.

sele...@googlecode.com

unread,
Aug 19, 2013, 12:25:07 PM8/19/13
to selenium-develope...@googlegroups.com
Updates:
Cc: a.u.savchuk

Comment #25 on issue 3951 by a.u.savchuk: 3 hour timeout before getting
UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

(No comment was entered for this change.)

sele...@googlecode.com

unread,
Aug 30, 2013, 11:00:28 AM8/30/13
to selenium-develope...@googlegroups.com

Comment #26 on issue 3951 by Tatsiana...@epam.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Will it be fixed for client level soon? This issue is a real pain for our
test suite...

sele...@googlecode.com

unread,
Oct 18, 2013, 9:00:34 AM10/18/13
to selenium-develope...@googlegroups.com

Comment #27 on issue 3951 by more.and...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Same issue happening here, latest bits on everything.

sele...@googlecode.com

unread,
Nov 7, 2013, 9:24:24 AM11/7/13
to selenium-develope...@googlegroups.com

Comment #28 on issue 3951 by markus.m...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

We have encountered this issue too - Windows 7 Professional, SP1, x64,
Selenium 2.32 is used in our Java automation framework using Internet
Explorer 8, no Grid.

sele...@googlecode.com

unread,
Jan 22, 2014, 3:31:45 PM1/22/14
to selenium-develope...@googlegroups.com

Comment #29 on issue 3951 by jason.sm...@1stdibs.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Encountered this error for Selenium 2.39 - using Grid

sele...@googlecode.com

unread,
Jan 22, 2014, 3:33:57 PM1/22/14
to selenium-develope...@googlegroups.com

Comment #30 on issue 3951 by jason.sm...@1stdibs.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Note, I am starting to wonder if the BrowserTimeout field is being read as
Minutes instead of Seconds!

(my browser time out param in hub is 60)

sele...@googlecode.com

unread,
Jan 27, 2014, 11:45:10 AM1/27/14
to selenium-develope...@googlegroups.com

Comment #31 on issue 3951 by vmg...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

This issue has been appearing randomly during our tests, sometimes it make
impossible to continue running the whole.

sele...@googlecode.com

unread,
Feb 11, 2014, 11:53:51 AM2/11/14
to selenium-develope...@googlegroups.com

Comment #32 on issue 3951 by owenflet...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

This issue also happens for me. Is there a plan to resolve it?

sele...@googlecode.com

unread,
Feb 11, 2014, 11:56:03 AM2/11/14
to selenium-develope...@googlegroups.com

Comment #33 on issue 3951 by owenflet...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

This issue also happens for me. Is there a plan to resolve it?
I am using Windows 7 with Internet Explorer 10.0.
Using Selenium 2.37.0

sele...@googlecode.com

unread,
Feb 24, 2014, 4:00:11 AM2/24/14
to selenium-develope...@googlegroups.com

Comment #34 on issue 3951 by owenflet...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

I've upgraded to Selenium 2.39.0 and I am still seeing the timeout issue
with IE10.

sele...@googlecode.com

unread,
Mar 18, 2014, 11:00:53 AM3/18/14
to selenium-develope...@googlegroups.com

Comment #35 on issue 3951 by matschba...@googlemail.com: 3 hour timeout
before getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

I'm facing the same issue and the 3 hour timeout is very annoying. As a
workaround I wrapped our testcases with a junit timeout rule, which
essentially kills the thread after 30 minutes
(http://junit-team.github.io/junit/javadoc/4.10/org/junit/rules/Timeout.html).
However this leaves an open browser instance on the remote machine...

Would be great if this timeout could be adjustable!

sele...@googlecode.com

unread,
Mar 20, 2014, 3:42:27 PM3/20/14
to selenium-develope...@googlegroups.com

Comment #36 on issue 3951 by milan.vo...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

We are experiencing same issue, we use timeout in TestNG, but it still
needs to be fixed!

sele...@googlecode.com

unread,
Apr 20, 2014, 8:21:46 AM4/20/14
to selenium-develope...@googlegroups.com

Comment #37 on issue 3951 by EOS.Ro...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Same issue on our side too... I can't belive that almost few years passed
and no solution on this...

sele...@googlecode.com

unread,
May 12, 2014, 5:17:08 PM5/12/14
to selenium-develope...@googlegroups.com

Comment #38 on issue 3951 by rohitash...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

I was also facing the similiar issue with InternetExplorer. I use to get
WerFault.exe popup and the test use to hang for 3 hours before timeout.
This 3 hour timeout is actually http socket timeout. As a workaround you
can modified the selenium source code in HttpClientFactory.java, or
HttpCommandExecutor.java files. In HttpClientFactory you can change the
TIMEOUT_THREE_HOURS to what ever lesser value you prefer. Or in
HttpCommandExecutor add a getter for httpClientFactory. This getter will
give you access to modify the TIMEOUT value from outside selenium code. You
can have seperate monitoring thread that will change the TIMEOUT value in
case testcase hangs.
BasicHttpParams httpParams = (BasicHttpParams)
((HttpCommandExecutor)((InternetExplorerDriver)webDriver).getCommandExecutor()).getHttpClientFactory().getHttpClient().getParams();
HttpConnectionParams.setSoTimeout(httpParams, 60000);

sele...@googlecode.com

unread,
May 12, 2014, 5:19:46 PM5/12/14
to selenium-develope...@googlegroups.com

Comment #39 on issue 3951 by rohitash...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

I also faced similiar issue with Internet Explorer. I was getting
WerFault.exe popup and the test will hang for 3 hours before timeout. This

sele...@googlecode.com

unread,
May 12, 2014, 6:01:45 PM5/12/14
to selenium-develope...@googlegroups.com

Comment #40 on issue 3951 by jmed...@truste.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Yes, the class org.openqa.selenium.remote.internal.HttpClientFactory has
hardcoded a two minute timeout for establishing the connection and 3 hours
for starting to receive the response (socket timeout). There is no way to
change these connection parameters without changing Selenium code.

public HttpParams getHttpParams() {
HttpParams params = new BasicHttpParams();
HttpConnectionParams.setSoReuseaddr(params, true);
HttpConnectionParams.setConnectionTimeout(params, 120 * 1000);
HttpConnectionParams.setSoTimeout(params, TIMEOUT_THREE_HOURS);
params.setIntParameter(ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE, 0);
HttpConnectionParams.setStaleCheckingEnabled(params, true);
return params;
}


sele...@googlecode.com

unread,
May 12, 2014, 6:15:32 PM5/12/14
to selenium-develope...@googlegroups.com

Comment #41 on issue 3951 by milan.vo...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Just some setter for timeout would be nice.
Milan

sele...@googlecode.com

unread,
May 12, 2014, 6:18:55 PM5/12/14
to selenium-develope...@googlegroups.com

Comment #42 on issue 3951 by jmed...@truste.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

This is similar to issue 4319 and issue 7286

sele...@googlecode.com

unread,
May 12, 2014, 6:20:37 PM5/12/14
to selenium-develope...@googlegroups.com

Comment #43 on issue 3951 by jmed...@truste.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Apparently issue 4319 was merged into issue 4150

sele...@googlecode.com

unread,
Jun 16, 2014, 11:16:46 AM6/16/14
to selenium-develope...@googlegroups.com

Comment #44 on issue 3951 by jiri.loc...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
http://code.google.com/p/selenium/issues/detail?id=3951

Pull request ready https://github.com/SeleniumHQ/selenium/pull/227

sele...@googlecode.com

unread,
Oct 2, 2014, 8:00:16 AM10/2/14
to selenium-develope...@googlegroups.com

Comment #45 on issue 3951 by eelam.ra...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

Can someone review and accept the PR from @jiri ?

I see this 3hr timeout issue as well, further details below:

Selenium version: 2.41.0
Test invocation OS: AWS LINUX _ 3.10.40-50.136.amzn1.x86_64
Hub OS: AWS LINUX _ 3.10.40-50.136.amzn1.x86_64
Browser: FF v25
Java:
[root@ip-10-x-xx-xyz ~]# java -version
java version "1.6.0_35"
Java(TM) SE Runtime Environment (build 1.6.0_35-b10)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)
Date:2nd Oct 2014
This issue happens 3 out of 10 times a day

json config file:
{ "capabilities" : [ { "browserName" : "firefox",
"firefox_binary" : "/usr/local/bin/firefox",
"maxInstances" : 25,
"platform" : "LINUX",
"seleniumProtocol" : "WebDriver",
"version" : "25"
},
{
"browserName": "chrome",
"version": "35",
"platform": "LINUX",
"maxInstances": 25,
"seleniumProtocol" : "WebDriver",
}
],
"configuration" : {
"hubHost" : "10.0.17.188",
"hubPort" : 4444,
"maxSession" : 25,
"port" : 5555,
"proxy" : "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"register" : true,
"registerCycle" : 10000,
"cleanUpCycle":10000,
"timeout":240000,
"browserTimeout":120
}
}

Additional Selenium Arguments
-Xms=512M
-Xmx=1024M

sele...@googlecode.com

unread,
Oct 2, 2014, 8:09:37 AM10/2/14
to selenium-develope...@googlegroups.com

Comment #46 on issue 3951 by eelam.ra...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

This is the error seen in the hub log

INFO: REQUEST : {platform=LINUX, javascriptEnabled=true,
cssSelectorsEnabled=false, browserName=firefox, nativeEvents=false,
rotatable=false, takesScreenshot=false, version=25}
Oct 2, 2014 8:48:57 AM hudson.plugins.selenium.JenkinsCapabilityMatcher
matches
INFO: CURRENT : {seleniumProtocol=WebDriver, platform=LINUX,
firefox_binary=/usr/local/bin/firefox, browserName=firefox,
maxInstances=25, jenkins.nodeName=ip-10-0-17-154, version=25}
Oct 2, 2014 8:48:57 AM hudson.plugins.selenium.JenkinsCapabilityMatcher
matches
INFO: REQUEST : {platform=LINUX, javascriptEnabled=true,
cssSelectorsEnabled=false, browserName=firefox, nativeEvents=false,
rotatable=false, takesScreenshot=false, version=25}
Oct 2, 2014 8:48:57 AM org.openqa.grid.internal.TestSlot getNewSession
INFO: Trying to create a new session on test slot
{seleniumProtocol=WebDriver, platform=LINUX,
firefox_binary=/usr/local/bin/firefox, browserName=firefox,
maxInstances=25, jenkins.nodeName=ip-10-0-17-154, version=25}
Oct 2, 2014 11:49:39 AM org.openqa.grid.web.servlet.handler.RequestHandler
process
SEVERE: Socket timed out for session ext. key
c248125d-72b2-40b6-9ba9-f41cbf6322f9, Read timed out
Oct 2, 2014 11:56:39 AM org.openqa.grid.web.servlet.handler.RequestHandler
process
SEVERE: Socket timed out for session ext. key
c248125d-72b2-40b6-9ba9-f41cbf6322f9, Read timed out
Oct 2, 2014 12:03:39 PM org.openqa.grid.web.servlet.handler.RequestHandler
process
SEVERE: Socket timed out for session ext. key
c248125d-72b2-40b6-9ba9-f41cbf6322f9, Read timed out

sele...@googlecode.com

unread,
Oct 28, 2014, 8:31:58 PM10/28/14
to selenium-develope...@googlegroups.com

Comment #47 on issue 3951 by MatejTy...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

Until a proper solution is accepted I have provided a working workaround
for this issue:
http://matejtymes.blogspot.co.uk/2014/10/webdriver-fix-for-unreachablebrowserexc.html

sele...@googlecode.com

unread,
Nov 19, 2014, 3:44:00 PM11/19/14
to selenium-develope...@googlegroups.com

Comment #48 on issue 3951 by derr...@lucidchart.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

Pull request update: there are two alternatives proposed:
https://github.com/SeleniumHQ/selenium/pull/227 through a system property,
and
https://github.com/SeleniumHQ/selenium/pull/285 through settings in the
HttpClientFactory construction.

It would be great to get at least one of these merged.

sele...@googlecode.com

unread,
Nov 20, 2014, 2:06:33 PM11/20/14
to selenium-develope...@googlegroups.com

Comment #49 on issue 3951 by matt...@lucidchart.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

+1 for https://github.com/SeleniumHQ/selenium/pull/285

sele...@googlecode.com

unread,
Dec 1, 2014, 4:46:38 PM12/1/14
to selenium-develope...@googlegroups.com

Comment #50 on issue 3951 by barancev: 3 hour timeout before getting
UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

Issue 8186 has been merged into this issue.

sele...@googlecode.com

unread,
Dec 22, 2014, 4:53:42 AM12/22/14
to selenium-develope...@googlegroups.com

Comment #51 on issue 3951 by sankar.m...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

What is the latest update on this issue. Any solutions available for this.

sele...@googlecode.com

unread,
Apr 3, 2015, 4:03:05 AM4/3/15
to selenium-develope...@googlegroups.com

Comment #52 on issue 3951 by barancev: 3 hour timeout before getting
UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

Issue 8141 has been merged into this issue.

sele...@googlecode.com

unread,
Apr 9, 2015, 1:02:31 PM4/9/15
to selenium-develope...@googlegroups.com

Comment #53 on issue 3951 by rkhan...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

We do face the same issue. Our Test hangs in for 3 hours and then gets
killed. Any work around for this would be a great help.

sele...@googlecode.com

unread,
Apr 20, 2015, 10:44:32 AM4/20/15
to selenium-develope...@googlegroups.com

Comment #54 on issue 3951 by manjunat...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

Facing this issue in Firefox 35 & above in selenium 44 & 45.

I'm using timeouts to handle this. Please fix asap.

sele...@googlecode.com

unread,
Apr 20, 2015, 12:46:58 PM4/20/15
to selenium-develope...@googlegroups.com

Comment #55 on issue 3951 by chernyak...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

Occasionally reproducing issue.

Versions: Chrome 39.0.2171.71m, Firefox 33.1.1, WebDriver 2.44.0,
SeleniumGrid 2.44.0

sele...@googlecode.com

unread,
Apr 24, 2015, 4:21:56 AM4/24/15
to selenium-develope...@googlegroups.com

Comment #56 on issue 3951 by voyadomi...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

I am the same problem with Webdriver 2.44.0 and Firefox 32.

The problem occurs when the page is loading (document.readyState is
not 'complete') and i try to execute any Webdriver API function, for
example:
Actions action = new Actions(webdriver);
action.sendKeys("Keys.ESCAPE").build().perform();

sele...@googlecode.com

unread,
Apr 24, 2015, 4:26:32 AM4/24/15
to selenium-develope...@googlegroups.com

Comment #57 on issue 3951 by voyadomi...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

The same problem, Webdriver 2.44.0 and Firefox 33.

Generally the problem occurs when the page is in state loading and i try to
execute a webdriver API funcion or i try to execute a sentence with
JavascriptExecutor

I ned a way to modify HttpConnectionParams.setSoTimeout(params,
TIMEOUT_THREE_HOURS);

sele...@googlecode.com

unread,
May 13, 2015, 11:16:09 AM5/13/15
to selenium-develope...@googlegroups.com

Comment #58 on issue 3951 by tha...@amplify.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

Seeing this with FireFox 31.6 ESR and webdriver 2.44.0

sele...@googlecode.com

unread,
May 21, 2015, 2:36:35 PM5/21/15
to selenium-develope...@googlegroups.com

Comment #59 on issue 3951 by Discover...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

You can fix the issue by having the browser timeout in your HUB. That what
we implemented in our global framework it works successfully. The browser
will wait for certain seconds if still it hangs in Hub browser tiemout will
get into place.

sele...@googlecode.com

unread,
May 21, 2015, 2:39:14 PM5/21/15
to selenium-develope...@googlegroups.com

Comment #60 on issue 3951 by Discover...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

You can fix the issue by having the browser timeout in your HUB. We
implemented in our global framework it works successfully. We had the same
issue of which our test was running more then 3 Hours.

sele...@googlecode.com

unread,
Jul 2, 2015, 4:48:22 AM7/2/15
to selenium-develope...@googlegroups.com

Comment #61 on issue 3951 by Stou...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

Can you be more specific on HUB configuration? You mean browserTimeout?
Because I have tried all timers and nothing seems to work, I still get the
3-hour timeout.

sele...@googlecode.com

unread,
Jul 2, 2015, 5:18:22 AM7/2/15
to selenium-develope...@googlegroups.com

Comment #62 on issue 3951 by manjunat...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

Agreed with the above comment. Even after configuring all timeouts (both
from script and Grid/Node) this is still happening every now and then.

sele...@googlecode.com

unread,
Jul 29, 2015, 8:20:27 PM7/29/15
to selenium-develope...@googlegroups.com

Comment #63 on issue 3951 by dh...@dhruvbhatia.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

Same issue with docker-selenium. The timeouts don't seem to prevent the
hanging.

sele...@googlecode.com

unread,
Aug 4, 2015, 12:52:58 PM8/4/15
to selenium-develope...@googlegroups.com

Comment #64 on issue 3951 by rkhan...@gmail.com: 3 hour timeout before
getting UnreachableBrowserException
https://code.google.com/p/selenium/issues/detail?id=3951

Hub configuration below:
**************************

Sorry for the delay for your question above this is how i have configured
my HUB.

-Xmx512m -jar *Provide your Jar file here* -role hub -port 1000 –timeout
125 –browserTimeout 125
Reply all
Reply to author
Forward
0 new messages