History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SRC-464
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Hendrik
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Selenium Remote Control

"unexpected command" error after proxy error has occured (firefox live bookmarks)

Created: 16/Apr/08 04:53 AM   Updated: 12/Aug/08 05:36 PM
Component/s: Server
Affects Version/s: 1.0 beta 1
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Windows XP, Firefox 2.0.0.9


 Description  « Hide
We have an extensive selenium test-suite in java (over 500 selenium tests) running every night. To gain some time, we implemented a mechanism to keep the browser open if the user running the test is the same as the user running the previous test. This results in the browser being openend for long periods of time (longer than 30 minutes).

Firefox, however, tries to refresh it's live bookmarks every 30 minutes. The url it requests is passed to the selenium server proxy, which doesn't have the correct proxy settings for our network. This results the following failure in the log:
org.openqa.selenium.server.ProxyHandler - Could not proxy http://en-us.fxfeeds.mozilla.com/en-US/firefox/headlines.xml
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:788)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:654)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
at org.openqa.selenium.server.ProxyHandler.proxyPlainTextRequest(ProxyHandler.java:374)
at org.openqa.selenium.server.ProxyHandler.handle(ProxyHandler.java:250)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

When this happens right after a setTimeout command was triggered (org.openqa.selenium.server.SeleniumDriverResourceHandler - Session 546626 going to doCommand(setTimeout,60000,))
something seems to be screwed up from that point on, since every other setTimeout command (same log statement) results in:
java.lang.RuntimeException: unexpected command cmd=setTimeout&1=60000&2= in place before new command setTimeout could be added.
at org.openqa.selenium.server.CommandQueue.doCommandWithoutWaitingForAResponse(CommandQueue.java:164)
at org.openqa.selenium.server.CommandQueue.doCommand(CommandQueue.java:99)
at org.openqa.selenium.server.FrameGroupCommandQueueSet.doCommand(FrameGroupCommandQueueSet.java:355)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:478)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:375)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:123)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
00:41:04.064 DEBUG [11] org.mortbay.http.HttpConnection - RESPONSE:
HTTP/1.1 500 Internal Server Error
Date: Tue, 15 Apr 2008 22:41:04 GMT
Server: Jetty/5.1.x (Windows XP/5.1 x86 java/1.6.0_04
Connection: close

We managed to work around it by setting the proxy settings for our selenium server so the firefox live bookmark url gets through, but I guess something else is wrong with the exception handling...

 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.