New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The SafariDriver should attempt to reconnect when the WebSocket connection is prematurely closed #6618

Open
lukeis opened this Issue Mar 4, 2016 · 3 comments

Comments

Projects
None yet
1 participant
@lukeis
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 6618

Background: 
We are using safari driver for running automation test on Mac OS 10.9.The  web app
we tested is very similar to Google Docs. We catch the web elements and simulate user
actions for editing a document. Our goal is to test the browser reliability so the
test case will be running for a very long time(24 hours). 

What is the expected output? What do you see instead?

We found while using selenium for running only about 1 hour, safari 7 will quit abnormally
and we don't see any crash reports about safari on Mac os.
From the selenium webdriver system out, we find the following errors:

Nov 25, 2013 11:25:28 AM org.openqa.selenium.safari.SafariDriverServer start
INFO: Server started on port 11763
Nov 25, 2013 11:25:29 AM org.openqa.selenium.safari.SafariDriverChannelHandler$1 operationComplete
INFO: Connection opened
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the
remote browser. It may have died.
Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:15:02'
System info: host: 'ConcordMac1.local', ip: '10.0.46.90', os.name: 'Mac OS X', os.arch:
'x86_64', os.version: '10.9', java.version: '1.6.0_65'
Driver info: driver.version: ConcordWebDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:307)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:348)
    at org.openqa.selenium.By$ById.findElement(By.java:220)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
    at com.ibm.concord.automation.utils.drivers.ConcordWebDriver.findElementByType(ConcordWebDriver.java:185)
    at com.ibm.concord.automation.appobjects.upper.CommonMenu.fireMenu(CommonMenu.java:272)
    at com.ibm.concord.automation.appobjects.modules.PresentationObject$PresentationMenu.newSlide(PresentationObject.java:413)
    at com.ibm.concord.automation.tasks.LotusLivePresentation.createNewSlide(LotusLivePresentation.java:56)
    at com.ibm.concord.automation.testcases.presentation.PresentationSingleEditTestCase.testCase_onlyNewPage(PresentationSingleEditTestCase.java:188)
    at com.ibm.concord.automation.testcases.presentation.PresentationSingleEditTestCase.runTest(PresentationSingleEditTestCase.java:622)
    at com.ibm.concord.automation.testcases.BaseTestCase.runTestCase(BaseTestCase.java:27)
    at com.ibm.concord.automation.testcases.BaseTestCase.main(BaseTestCase.java:76)
Caused by: java.lang.IllegalStateException: The WebSocket connection has been closed
    at com.google.common.base.Preconditions.checkState(Preconditions.java:150)
    at org.openqa.selenium.safari.WebSocketConnection.checkChannel(WebSocketConnection.java:38)
    at org.openqa.selenium.safari.WebSocketConnection.send(WebSocketConnection.java:48)
    at org.openqa.selenium.safari.SafariDriverConnection.send(SafariDriverConnection.java:84)
    at org.openqa.selenium.safari.SafariDriverCommandExecutor.execute(SafariDriverCommandExecutor.java:157)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:527)
    ... 12 more
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the
remote browser. It may have died.
Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:15:02'
System info: host: 'ConcordMac1.local', ip: '10.0.46.90', os.name: 'Mac OS X', os.arch:
'x86_64', os.version: '10.9', java.version: '1.6.0_65'
Driver info: driver.version: ConcordWebDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:307)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:348)
    at org.openqa.selenium.By$ById.findElement(By.java:220)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
    at com.ibm.concord.automation.utils.drivers.ConcordWebDriver.findElementByType(ConcordWebDriver.java:185)
    at com.ibm.concord.automation.appobjects.upper.CommonMenu.fireMenu(CommonMenu.java:272)
    at com.ibm.concord.automation.appobjects.modules.PresentationObject$PresentationMenu.newSlide(PresentationObject.java:413)
    at com.ibm.concord.automation.tasks.LotusLivePresentation.createNewSlide(LotusLivePresentation.java:56)
    at com.ibm.concord.automation.testcases.presentation.PresentationSingleEditTestCase.testCase_onlyNewPage(PresentationSingleEditTestCase.java:188)
    at com.ibm.concord.automation.testcases.presentation.PresentationSingleEditTestCase.runTest(PresentationSingleEditTestCase.java:622)
    at com.ibm.concord.automation.testcases.BaseTestCase.runTestCase(BaseTestCase.java:27)
    at com.ibm.concord.automation.testcases.BaseTestCase.main(BaseTestCase.java:76)
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)
    ... 12 more
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the
remote browser. It may have died.
Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:15:02'
System info: host: 'ConcordMac1.local', ip: '10.0.46.90', os.name: 'Mac OS X', os.arch:
'x86_64', os.version: '10.9', java.version: '1.6.0_65'
Driver info: driver.version: ConcordWebDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:307)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:348)
    at org.openqa.selenium.By$ById.findElement(By.java:220)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
    at com.ibm.concord.automation.utils.drivers.ConcordWebDriver.findElementByType(ConcordWebDriver.java:185)
    at com.ibm.concord.automation.appobjects.upper.CommonMenu.fireMenu(CommonMenu.java:272)
    at com.ibm.concord.automation.appobjects.modules.PresentationObject$PresentationMenu.newSlide(PresentationObject.java:413)
    at com.ibm.concord.automation.tasks.LotusLivePresentation.createNewSlide(LotusLivePresentation.java:56)
    at com.ibm.concord.automation.testcases.presentation.PresentationSingleEditTestCase.testCase_onlyNewPage(PresentationSingleEditTestCase.java:188)
    at com.ibm.concord.automation.testcases.presentation.PresentationSingleEditTestCase.runTest(PresentationSingleEditTestCase.java:622)
    at com.ibm.concord.automation.testcases.BaseTestCase.runTestCase(BaseTestCase.java:27)
    at com.ibm.concord.automation.testcases.BaseTestCase.main(BaseTestCase.java:76)
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)
    ... 12 more
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the
remote browser. It may have died.
Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:15:02'
System info: host: 'ConcordMac1.local', ip: '10.0.46.90', os.name: 'Mac OS X', os.arch:
'x86_64', os.version: '10.9', java.version: '1.6.0_65'
Driver info: driver.version: ConcordWebDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:307)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:348)
    at org.openqa.selenium.By$ById.findElement(By.java:220)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
    at com.ibm.concord.automation.utils.drivers.ConcordWebDriver.findElementByType(ConcordWebDriver.java:185)
    at com.ibm.concord.automation.appobjects.upper.CommonMenu.fireMenu(CommonMenu.java:272)
    at com.ibm.concord.automation.appobjects.modules.PresentationObject$PresentationMenu.newSlide(PresentationObject.java:413)
    at com.ibm.concord.automation.tasks.LotusLivePresentation.createNewSlide(LotusLivePresentation.java:56)
    at com.ibm.concord.automation.testcases.presentation.PresentationSingleEditTestCase.testCase_onlyNewPage(PresentationSingleEditTestCase.java:188)
    at com.ibm.concord.automation.testcases.presentation.PresentationSingleEditTestCase.runTest(PresentationSingleEditTestCase.java:622)
    at com.ibm.concord.automation.testcases.BaseTestCase.runTestCase(BaseTestCase.java:27)
    at com.ibm.concord.automation.testcases.BaseTestCase.main(BaseTestCase.java:76)
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)
    ... 12 more
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the
remote browser. It may have died.
Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:15:02'
System info: host: 'ConcordMac1.local', ip: '10.0.46.90', os.name: 'Mac OS X', os.arch:
'x86_64', os.version: '10.9', java.version: '1.6.0_65'
Driver info: driver.version: ConcordWebDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:307)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:348)
    at org.openqa.selenium.By$ById.findElement(By.java:220)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
    at com.ibm.concord.automation.utils.drivers.ConcordWebDriver.findElementByType(ConcordWebDriver.java:185)
    at com.ibm.concord.automation.appobjects.upper.CommonMenu.fireMenu(CommonMenu.java:272)
    at com.ibm.concord.automation.appobjects.modules.PresentationObject$PresentationMenu.newSlide(PresentationObject.java:413)
    at com.ibm.concord.automation.tasks.LotusLivePresentation.createNewSlide(LotusLivePresentation.java:56)
    at com.ibm.concord.automation.testcases.presentation.PresentationSingleEditTestCase.testCase_onlyNewPage(PresentationSingleEditTestCase.java:188)
    at com.ibm.concord.automation.testcases.presentation.PresentationSingleEditTestCase.runTest(PresentationSingleEditTestCase.java:622)
    at com.ibm.concord.automation.testcases.BaseTestCase.runTestCase(BaseTestCase.java:27)
    at com.ibm.concord.automation.testcases.BaseTestCase.main(BaseTestCase.java:76)
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)
    ... 12 more
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the
remote browser. It may have died.
Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:15:02'
System info: host: 'ConcordMac1.local', ip: '10.0.46.90', os.name: 'Mac OS X', os.arch:
'x86_64', os.version: '10.9', java.version: '1.6.0_65'
Driver info: driver.version: ConcordWebDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:307)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:348)
    at org.openqa.selenium.By$ById.findElement(By.java:220)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
    at com.ibm.concord.automation.utils.drivers.ConcordWebDriver.findElementByType(ConcordWebDriver.java:185)
    at com.ibm.concord.automation.appobjects.upper.CommonMenu.fireMenu(CommonMenu.java:272)
    at com.ibm.concord.automation.appobjects.modules.PresentationObject$PresentationMenu.newSlide(PresentationObject.java:413)
    at com.ibm.concord.automation.tasks.LotusLivePresentation.createNewSlide(LotusLivePresentation.java:56)
    at com.ibm.concord.automation.testcases.presentation.PresentationSingleEditTestCase.testCase_onlyNewPage(PresentationSingleEditTestCase.java:188)
    at com.ibm.concord.automation.testcases.presentation.PresentationSingleEditTestCase.runTest(PresentationSingleEditTestCase.java:622)
    at com.ibm.concord.automation.testcases.BaseTestCase.runTestCase(BaseTestCase.java:27)
    at com.ibm.concord.automation.testcases.BaseTestCase.main(BaseTestCase.java:76)
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)
    ... 12 more
Time:2013-11-25:122839
java.lang.NullPointerException
    at com.ibm.concord.automation.appobjects.upper.CommonMenu.fireMenu(CommonMenu.java:272)
    at com.ibm.concord.automation.appobjects.modules.PresentationObject$PresentationMenu.newSlide(PresentationObject.java:413)
    at com.ibm.concord.automation.tasks.LotusLivePresentation.createNewSlide(LotusLivePresentation.java:56)
    at com.ibm.concord.automation.testcases.presentation.PresentationSingleEditTestCase.testCase_onlyNewPage(PresentationSingleEditTestCase.java:188)
    at com.ibm.concord.automation.testcases.presentation.PresentationSingleEditTestCase.runTest(PresentationSingleEditTestCase.java:622)
    at com.ibm.concord.automation.testcases.BaseTestCase.runTestCase(BaseTestCase.java:27)
    at com.ibm.concord.automation.testcases.BaseTestCase.main(BaseTestCase.java:76)
get exception on BitmapOps#doScreenCapture


Selenium version:2.37
OS:Mac OS 10.9
Browser: safari
Browser version: 7



Reported by EvanHon1987 on 2013-11-25 11:16:49

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member

Reported by barancev on 2013-11-25 17:18:11

  • Labels added: Browser-Safari
Member

lukeis commented Mar 4, 2016

Reported by barancev on 2013-11-25 17:18:11

  • Labels added: Browser-Safari
@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
The SafariDriver client and browser extension communicate over a WebSocket. If that
socket is closed, the driver currently does not make any attempts to reconnect.

Reported by jmleyba on 2013-12-01 16:55:02

  • Labels added: Component-WebDriver
  • Labels removed: Status-Untriaged
Member

lukeis commented Mar 4, 2016

The SafariDriver client and browser extension communicate over a WebSocket. If that
socket is closed, the driver currently does not make any attempts to reconnect.

Reported by jmleyba on 2013-12-01 16:55:02

  • Labels added: Component-WebDriver
  • Labels removed: Status-Untriaged
@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member

Reported by luke.semerau on 2015-09-17 17:45:56

  • Labels added: Restrict-AddIssueComment-Commit
Member

lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 17:45:56

  • Labels added: Restrict-AddIssueComment-Commit

@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.