Error communicating with the remote browser. It may have died - RemoteWebDriver

1,755 views
Skip to first unread message

confusa

unread,
Jan 9, 2012, 6:17:11 PM1/9/12
to webdriver
Using the RemoteWebDriver client to connect to a remote server using
Firefox. Tests all run fine and work as expected. The tests have an
@AfterSuite tear down that runs the .quit() command which spits the
following trace into the TestNG logs:

Error communicating with the remote browser. It may have died. Build
info: version: '2.13.0', revision: '14793', time: '2011-11-18
13:17:03' System info: os.name: 'Linux', os.arch: 'amd64', os.version:
'2.6.38-13-generic', java.version: '1.6.0_22' Driver info:
driver.version: RemoteWebDriver
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:
412)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:
420)
at
org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:
297)

Caused by Session ID may not be null Build info: version: '2.13.0',
revision: '14793', time: '2011-11-18 13:17:03' System info: os.name:
'Linux', os.arch: 'amd64', os.version: '2.6.38-13-generic',
java.version: '1.6.0_22' Driver info: driver.version: RemoteWebDriver
org.openqa.selenium.remote.HttpCommandExecutor
$CommandInfo.get(HttpCommandExecutor.java:633)
at org.openqa.selenium.remote.HttpCommandExecutor
$CommandInfo.getMethod(HttpCommandExecutor.java:617)
at
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:
361)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:
398)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:
420)
at
org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:
297)

I want to close out the session so that I don't have a lot of open
browser windows. What am I doing wrong here?

Luke Inman-Semerau

unread,
Jan 9, 2012, 6:53:43 PM1/9/12
to webd...@googlegroups.com
What version of Firefox?  If you were upgraded to 9, you'll need to upgrade your selenium to 2.16.1. Either way, upgrade and see if that resolves your issue.


--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.


Krishnan Mahadevan

unread,
Jan 9, 2012, 7:15:14 PM1/9/12
to webd...@googlegroups.com
Only yesterday I stumbled into this error and I was on 2.15.0. I had this. Bypassed by enclosing driver.quit() within a try catch and gobbling up the exception and doing nothing about it (an ugly way of sweeping the dust under carpet). Will try to come up with a short concise test to reproduce this issue in 2.16.1 and if i can get this reproduced will log an issue.

I was on firefox 8.0 if i remember correctly.
--
Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

confusa

unread,
Jan 9, 2012, 7:25:20 PM1/9/12
to webdriver
Firefox 9.0.1 and upgrading to 2.16.1 sadly did not resolve the
problem.

Krishnan Mahadevan

unread,
Jan 9, 2012, 7:27:48 PM1/9/12
to webd...@googlegroups.com
Perhaps you should create a small test against a public site that showcases this issue and log a bug on this.

Mark Collin

unread,
Jan 10, 2012, 4:02:12 AM1/10/12
to webd...@googlegroups.com
Can you show us your code, it looks like you are trying to call quite on an
object that has already been cleared.

--


You received this message because you are subscribed to the Google Groups
"webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to
webdriver+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/webdriver?hl=en.


--
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.

If you have received this email in error please notify postm...@ardescosolutions.com

confusa

unread,
Jan 10, 2012, 12:53:55 PM1/10/12
to webdriver
Yeah, this is perhaps an issue with how the test is configured.
Running the tests using TestNG as a suite from the testng.xml. Each
test has an @AfterSuite that should run the .quit(). For some reason
it looks like that AfterSuite is getting called multiple times, not
sure why. For now I fixed it with this sort of tweak to the tear down:

if (remoteWebDriver().getSessionId() != null) {
remoteWebDriver().quit();
> For more options, visit this group athttp://groups.google.com/group/webdriver?hl=en.
>
> --
> This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
>
> If you have received this email in error please notify postmas...@ardescosolutions.com

santosh mankala

unread,
Jan 30, 2012, 9:13:24 PM1/30/12
to webd...@googlegroups.com
I am getting the same error, I also used driver.quit() method, instead of close. I am using 2.16.1 and FF 3.6.25 version. I used session id not null condition in tear down it did not work, any other works around please

Mark Collin

unread,
Feb 6, 2012, 7:20:13 AM2/6/12
to webd...@googlegroups.com

There was nothing to work round from what I can tell it was a coding error in the teardown.

 

Show us your code so we can see what you are doing.

--

You received this message because you are subscribed to the Google Groups "webdriver" group.

To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/OAWO1ZPRep0J.


To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.


-- This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify postm...@ardescosolutions.com

santosh mankala

unread,
Feb 13, 2012, 6:19:50 PM2/13/12
to webd...@googlegroups.com

if (!System.getProperty("keepBrowser", "false").equals("true")) {

if (driver != null) {

driver.quit();

}
}

santosh mankala

unread,
Feb 13, 2012, 6:20:42 PM2/13/12
to webd...@googlegroups.com
Thanks Mark, I posted my code below. I think I will try the try catch logic as Krishnan mentioned. But that is not a correct way to do it
Reply all
Reply to author
Forward
0 new messages