Running selenium test : org.openqa.selenium.remote.UnreachableBrowserException

310 views
Skip to first unread message

manasa priya

unread,
Nov 23, 2013, 4:40:39 AM11/23/13
to webd...@googlegroups.com
Hi Guys,

I am  a newbie to selenium and webdriver, and trying to execute some tests using selenium 2.37.0.
Surprisingly, the tests run perfectly fine in Ubuntu/Firefox 2.37.0/Selenium 2.37.0, but the same tests fail in the same environment, but with mac OS.

I get the following exception in safari, chrome and firefox too. I found many threads with similar issue, but without any solution.
Any tips/suggestions on how to proceed with this, is greatly appreciated.


org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: '2.37.0', revision: 'a7c61cbd68657e133ae96672cf995890bad2ee42', time: '2013-10-18 09:51:02'
System info: host: 'Steves-MacBook-Air-2.local', ip: '192.168.1.129', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.5', java.version: '1.6.0_51'
Driver info: driver.version: RemoteWebDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
    at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:783)
    at com.springapp.mvc.Browser.load(Browser.java:24)
    at com.springapp.mvc.WelcomePageTests.initializeSetup(WelcomePageTests.java:25)
    at com.springapp.mvc.WelcomePageTests.testPageLoad(WelcomePageTests.java:30)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.IllegalStateException: Currently waiting on a command response
    at com.google.common.base.Preconditions.checkState(Preconditions.java:150)
    at org.openqa.selenium.safari.SafariDriverConnection.send(SafariDriverConnection.java:72)
    at org.openqa.selenium.safari.SafariDriverCommandExecutor.execute(SafariDriverCommandExecutor.java:157)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:527)
    ... 30 more

Thanks in advance,
Manasa

darrell

unread,
Nov 24, 2013, 10:18:41 AM11/24/13
to webd...@googlegroups.com
The version of Selenium has to match the version of Firefox. If you have a new Firefox but an older Selenium or the opposite, you might see random failures like this. It is possible that your Linux system has a different version of software. So the Firefox and Selenium on the Linux machine are correct. I'd suspect that your Mac is automatically updating Firefox to the very latest version but you don't have the right version of Selenium.

I always set up a test environment where my versions are control by something like Puppet or Chef. This helps to eliminate the possibility my Selenium and browsers get out of sync. When a new Selenium comes out I update my Selenium and let the system update to the matching version of the browsers.For example, Selenium 2.37.0 was release on October 18, 2013 but Firefox 25 was release on October 25, 2013. This means there is no version of Selenium yet for Firefox 25. I would force my system to stay at Firefox 24 until there is a new version of Selenium.
Reply all
Reply to author
Forward
0 new messages