Hanging on "Preparing Firefox profile..."

655 views
Skip to first unread message

Jeff Horn

unread,
Aug 19, 2008, 1:55:46 PM8/19/08
to selenium-users...@googlegroups.com
I'm trying to get Selenium running on CentOS using Sun's JRE 1.6 and firefox. When I enter the command:

cmd=getNewBrowserSession&1=*firefox /usr/lib/firefox-3.0.1/firefox&2=http://www.google.com/

I get this output:

cmd=getNewBrowserSession&1=*firefox /usr/lib/firefox-3.0.1/firefox&2=http://www.google.com/\\ 10:47:01.614 INFO - ---> Requesting http://localhost:4444/selenium-server/driver?cmd=getNewBrowserSession&1=*firefox /usr/lib/firefox-3.0.1/firefox&2=http://www.google.com/\\ 10:47:01.623 INFO - Command request: getNewBrowserSession[*firefox /usr/lib/firefox-3.0.1/firefox, http://www.google.com/] on session null\\ 10:47:01.976 INFO - Launching session 21623\\ 10:47:02.350 INFO - Preparing Firefox profile...

but then when I say:

cmd=open&1=http://www.google.com&sessionId=21623

I get:

10:50:21.718 INFO - ---> Requesting http://localhost:4444/selenium-server/driver?cmd=open&1=http://www.google.com&sessionId=21623\\ 10:50:21.727 INFO - Command request: open[http://www.google.com, ] on session 21623\\ 10:50:21.728 WARN - GET /selenium-server/driver/?cmd=open&1=http://www.google.com&sessionId=21623 HTTP/1.1\\ java.lang.NullPointerException\\ at java.util.concurrent.ConcurrentHashMap.containsKey(Unknown Source)\\ at org.openqa.selenium.server.FrameGroupCommandQueueSet.justLoaded(FrameGroupCommandQueueSet.java:626)\\ at org.openqa.selenium.server.FrameGroupCommandQueueSet.markWhetherJustLoaded(FrameGroupCommandQueueSet.java:630)\\ at org.openqa.selenium.server.FrameGroupCommandQueueSet.doCommand(FrameGroupCommandQueueSet.java:354)\\ 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)\\ Server returned HTTP response code: 500 for URL: http://localhost:4444/selenium-server/driver/?cmd=open&1=http://www.google.com&sessionId=21623\\
This is on a remote CentOS box, which I have displaying back to my workstation using XHostForwarding through putty. I can successfully run /usr/lib/firefox-3.0.1/firefox and have it display to my workstation. It's not incredibly peppy, but does work.

Question: I wanted to automate a lot of tests, is there a way to do these tests without actually having the browser display back to my workstation at all? sort of a null display?

Threddy

unread,
Aug 19, 2008, 3:38:16 PM8/19/08
to selenium-users...@googlegroups.com
Apologies if I have misundertood. When you start your selenium under UNIX/LINUX you could just redirect your stdout and stderr.
So:

<your selenium commands> 2>&1 > selenium.txt

This would redirect all output.
HTH.

Jeff Horn

unread,
Aug 19, 2008, 5:02:50 PM8/19/08
to selenium-users...@googlegroups.com
Moving to Selenium RC 0.8.x fixed this problem, sort of. I now get a browser sent to my display from the remote CentOS box and it seems to respond to some commands. However, I'd really like to run these tests from a cron job or command line and not have to have the browser display back to my screen, so what I'm hoping is there's some magic way of setting the DISPLAY veriable and possibly running an external process that will consume the display output the same way /dev/null would consume text output. I'm not looking for what to do with the text output from the selenium server, I'm trying to avoid having to have a screen on which the browser has to be displayed. I understand firefox needs to run... just wonder if it actually has to display as well.

Wade Catron

unread,
Aug 19, 2008, 6:20:32 PM8/19/08
to selenium-users...@googlegroups.com
I've heard about using Xvfb to run a headless Firefox instance on Linux. Perhaps something like this would work for you:

http://dadicy.wordpress.com/2007/10/09/what-will-you-need-to-run-a-headless-application-in-linux/

Good luck!

Laurynas

unread,
Aug 20, 2008, 2:06:08 AM8/20/08
to selenium-users...@googlegroups.com
Are you using Firefox 3 ?
I had the same problem when I updated my Firefox 2.0.0.x to 3.0.
I've re-installed older version and it was ok.

Reply all
Reply to author
Forward
0 new messages