Issue Details (XML | Word | Printable)

Key: SRC-743
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Patrick Lightbody
Reporter: Michael Hendricks
Votes: 18
Watchers: 19
Operations

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

Launching Firefox on Snow Leopard (OS X 10.6)

Created: 01/Sep/09 01:56 PM   Updated: 19/Mar/11 06:50 AM   Resolved: 23/Feb/10 12:24 PM
Component/s: Launcher - Firefox
Affects Version/s: 1.0.1
Fix Version/s: 1.0.3

File Attachments: 1. Text File selenium-server-1.0.3.1-standalone.patch (1 kB) 19/Mar/11 06:50 AM - George
2. Text File snow-leopard.patch (0.7 kB) 08/Sep/09 12:24 PM - Michael Hendricks

Environment: Darwin ginosko 10.0.0 Darwin Kernel Version 10.0.0: Fri Jul 31 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I386 i386 i386


 Description  « Hide

Running Selenium RC server v1.0.1 on Mac OS X 10.6 results in the
following error when it tries to launch Firefox:

12:47:29.260 INFO - Java: Apple Inc. 14.1-b02-90
12:47:29.262 INFO - OS: Mac OS X 10.6 i386
12:47:29.276 INFO - v1.0.1 [2696], with Core v@VERSION@ [@REVISION@]
12:47:29.387 INFO - Version Jetty/5.1.x
12:47:29.389 INFO - Started HttpContext[/selenium-server/driver,/
selenium-server/driver]
12:47:29.390 INFO - Started HttpContext[/selenium-server,/selenium-
server]
12:47:29.391 INFO - Started HttpContext[/,/]
12:47:29.407 INFO - Started SocketListener on 0.0.0.0:4444
12:47:29.407 INFO - Started org.mortbay.jetty.Server@763f5d
12:47:44.372 INFO - Checking Resource aliases
12:47:44.377 INFO - Checking Resource aliases
12:47:44.384 INFO - Command request: getNewBrowserSession[*chrome, https://stage.osceola.taxsys.net/, ] on session null
12:47:44.387 INFO - creating new remote session
12:47:44.542 INFO - Allocated session 7dbf48c722cb4e7aafe43b893b86658e for https://stage.osceola.taxsys.net/, launching...
12:47:45.414 INFO - Preparing Firefox profile...
dyld: Library not loaded: /usr/lib/libsqlite3.dylib
Referenced from: /System/Library/Frameworks/Security.framework/
Versions/A/Security
Reason: Incompatible library version: Security requires version
9.0.0 or later, but libsqlite3.dylib provides version 1.0.0
12:47:47.056 INFO - Launching Firefox...

As discussed elsewhere (http://bit.ly/5h9ub), this problem is because RC sets
DYLD_LIBRARY_PATH before launching firefox.



Sort Order: Ascending order - Click to sort in descending order
Matt Solnit added a comment - 01/Sep/09 02:18 PM

I can confirm that changing the code to not set DLYD_LIBRARY_PATH does fix the issue. I had to make this change in both FirefoxCustomProfileLauncher and FirefoxChromeLauncher.

This fix should be safe for Firefox 3.0 and 3.5, but I have not had a chance to test with 2.x or earlier.


Patrick Lightbody added a comment - 07/Sep/09 08:58 AM

Just a quick note: I plan to get this fixed soon.


Michael Hendricks added a comment - 08/Sep/09 12:25 PM

For those building Selenium RC from source on Snow Leopard, this is a very quick and ugly hack which fixes the problem. It can be used to buy time until the official solution is included in the Subversion tree.


adam goucher added a comment - 15/Sep/09 08:22 PM

Tareque Hossain added a comment - 23/Sep/09 12:46 PM

To apply patch/ alter code, I had to rebuild Selenium RC and the details of that is listed on this page: http://wiki.openqa.org/display/SRC/Developer%27s+Guide under section: Developing the Java Selenium Server.


Evan Leonard added a comment - 15/Oct/09 09:45 AM

Here's a work around that worked for me:
http://agilesoftwaretesting.com/?p=105


Christoph Kempen added a comment - 17/Oct/09 04:31 AM

I wrote an installation manuel for 10.6 snow leopard and firefox 3.5

http://www.god-object.com/2009/10/16/user-interface-testing-on-mac-os-10-6-snow-leopard/


JD Huntington added a comment - 03/Nov/09 04:18 PM

With Firefox 3.5.4 (Released ~2009.10.30), the method of copying the system's sqlite library results in firefox crashing.


Tim Riley added a comment - 03/Nov/09 07:19 PM

Recommended work around fix on the Selenium side is in bug 513747 (https://bugzilla.mozilla.org/show_bug.cgi?id=513747c52):

1) Run firefox-bin, not firefox
2) Don't set DYLD_LIBRARY_PATH

Patrick Lightbody said he planed to get this fixed soon in Selenium. Is that still the plan?

This should be fixed in Firefox 3.5.5 or 3.5.6 and 3.6.


Andrew Cox added a comment - 20/Nov/09 07:12 AM

What's the recommended workaround for this issue right now?

I just spent a few hours building Firefox from source last night trying to apply the 2 patches that are supposed to make Firefox work with Snow Leopard from the command line, but I still can't start a new browser session with Selenium with the new build. I see the patch above as a possible fix. Is that confirmed to work? I don't want to end up chasing the wrong rabbit.


Andrew Cox added a comment - 21/Nov/09 02:29 PM

I just rebuilt using the patch attached to this bug and can confirm that it works (using Firefox 3.5.5). The build process was much less painful than rebuilding Firefox from source

For those that have never patched a file before (like myself), here's my complete set of steps to get a working selenium-server.jar:

$ svn co http://svn.openqa.org/svn/selenium-rc/trunk .
$ patch -p0 < snow-leopard.patch
$ mvn install
$ cp selenium-server.jar selenium-server.jar.bak
$ cp selenium-server/target/selenium-server-1.0.2-SNAPSHOT-standalone.jar selenium-server.jar


Peter Bell added a comment - 14/Dec/09 09:21 AM

I tried the complete set of steps above at http://jira.openqa.org/browse/SRC-743#action_18980

The svn checkout works fine, but when I run the "patch -p0 < snow-leopard.patch" I get a "snow-leopard.patch: No such file or directory" response. Tried running it both in the selenium directory (which was where I ran the checkout) and in the created trunk subdirectory. Also searched the checked out tree for such a file but it wasn't there. Guessing there's a step I'm missing, but I'm also thinking if I'm getting confused others are too.

Any thoughts on what's missing?


Patrick Lightbody added a comment - 14/Dec/09 09:27 AM

All,
Snow Leopard support is working again in the latest release. The patch instructions Andrew provided are no longer accurate because we've moved SVN to Google Code (http://code.google.com/p/selenium/) and we no longer use Maven as our build system. The patch also isn't necessary because the fix has been checked in to trunk.

In fact, Selenium 2.0 alpha 1 was released on Thursday last week, and it works great with Snow Leopard. Please give it a shot and let us know how it went for you.

Patrick


nodje added a comment - 14/Dec/09 06:16 PM

thanks, good news!

Just, out of curiosity, what did you replace maven with for your build?

-nodje


Patrick Lightbody added a comment - 14/Dec/09 07:59 PM

Nodje - we switched to Rake + some home-brewed Ruby magic


nodje added a comment - 15/Dec/09 01:40 AM

Patrick, that sounds really exiting to me.

This is not the right place, but there a couple of question I'd like to ask you. Like
Are you using Raven?
What made you make this move for a Java project?

-nodje


Simon Stewart added a comment - 15/Dec/09 11:56 AM

The project isn't just java: there are ruby, python and .net pieces that also need to be compiled and packaged. We're not using Raven — the build grammar is just pure ruby and rake.


David Smiley added a comment - 25/Jan/10 01:09 PM

If this issue is supposedly fixed then please mark this issue as fixed and indicate which release or branch or tag to get it.


Patrick Lightbody added a comment - 25/Jan/10 02:20 PM

David,
The issue is fixed in version 2.0. alpha 1. We'll also be releasing a 2.0 alpha 2 shortly. We're in the middle of migrating bug trackers, so I'm a little hesitant to add a "2.0" fix-for version for fear it might conflict when we make the switch. In the meantime, my advice is: grab the 2.0 releases.


Andrew Cox added a comment - 26/Jan/10 07:30 AM

I'm actually having problems now after upgrading to Firefox 3.6 (on both Leopard and Snow Leopard). I can launch the Selenium Server without error (using 2.0a1 from here: http://code.google.com/p/selenium/downloads/list), but I cannot start a new browser session using the Ruby selenium-client (http://github.com/ph7/selenium-client).

I tried switching to Chrome to see if all was well there, but it's still trying to use Firefox even though I'm telling it to use *chrome:

$ java -jar selenium_server/selenium-server.jar
08:28:32.342 INFO - Java: Apple Inc. 1.5.0_20-141
08:28:32.344 INFO - OS: Mac OS X 10.5.8 i386
08:28:32.353 INFO - v2.0 [a1], with Core v2.0 [a1]
08:28:32.479 INFO - RemoteWebDriver instances should connect to: http://192.168.56.1:4444/wd/hub
08:28:32.482 INFO - Version Jetty/6.1.9
08:28:32.483 INFO - Started HttpContext[/,/]
08:28:32.484 INFO - Started HttpContext[/selenium-server,/selenium-server]
08:28:32.484 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
08:28:32.509 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@b4be3d
08:28:32.509 INFO - Started HttpContext[/wd,/wd]
08:28:32.516 INFO - Started SocketListener on 0.0.0.0:4444
08:28:32.516 INFO - Started org.openqa.jetty.jetty.Server@4cee32
08:28:42.338 INFO - Checking Resource aliases
08:28:42.343 INFO - Command request: getNewBrowserSession[*chrome, http://www.google.com, , ] on session null
08:28:42.346 INFO - creating new remote session
08:28:42.436 INFO - Allocated session c6945c0330044d268776c462e6a8bef0 for http://www.google.com, launching...
08:28:42.558 INFO - Preparing Firefox profile...
08:28:45.520 INFO - Launching Firefox...


Andrew Cox added a comment - 26/Jan/10 07:58 AM

Ok, so I just learned that "*chrome" is a special version of Firefox and not Google Chrome (which is *googlechrome). I tested Selenium Server v2.0a1 with Ruby selenium-client 1.2.18 and it worked with my simple test case [1], so it does seem that my problem is somewhere between Firefox 3.6, Leopard and Selenium Server 2.0a1.

[1] Simple test case:

#!/usr/bin/env ruby
require "rubygems"
gem "selenium-client", ">=1.2.18"
require "selenium/client"

begin
@browser = Selenium::Client::Driver.new \
:host => "localhost",
:port => 4444,
:browser => "*googlechrome /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome",
:url => "http://www.google.com",
:timeout_in_second => 60

@browser.start_new_browser_session
@browser.open "/"
@browser.type "q", "Selenium seleniumhq.org"
@browser.click "btnG", :wait_for => :page
puts @browser.text?("seleniumhq.org")
ensure
@browser.close_current_browser_session
end


Patrick Lightbody added a comment - 26/Jan/10 11:02 AM

Andrew,
We are releasing 2.0 alpha 2 today or tomorrow and it will for sure have all issues with Snow Leopard and/or Firefox 3.6 resolved.

Matt,
SOASTA is more than welcome to contribute back to the community any time they'd like


Matt Solnit added a comment - 26/Jan/10 11:07 AM

Thanks . I figured you had a fix already, after seeing your comment on 9/7/09. But this is good to know for next time.


Patrick Lightbody added a comment - 26/Jan/10 11:12 AM

Matt,
The code is the easy part. The hard part is packaging up a release, documentation, bug triage, communicating with the community, etc. Truly can always use help in those areas, as well as core code contributions. Feel free to drop by selenium-developers if you'd like to pitch in!


Rob Aldred added a comment - 02/Feb/10 03:47 AM

Hey, I still can't get Firefox to load properly with RC standalone 2a2 and firefox 3.6 on snow leopard.

09:39:55.223 INFO - Checking Resource aliases
09:39:55.225 INFO - Command request: getNewBrowserSession[*firefox, http://www.google.com] on session null
09:39:55.226 INFO - creating new remote session
09:39:55.287 INFO - Allocated session 971b5a2eb85642bc9223590de34efa9c for http://www.google.com, launching...
09:39:55.349 INFO - Preparing Firefox profile...
09:39:58.169 INFO - Launching Firefox...

The only way out is Ctrl+C which also closes the blank firefox window that was opened

It opens a blank Firefox window then stops
I'm testing with the following command:
java -jar selenium-server-standalone-2.0a1.jar -interactive -singleWindow

--Rob


Dimitri BAELI added a comment - 11/Feb/10 07:22 PM

For selenium-maven-plugin and JUnit Selenium users here is what worked for me:

Use them in your build, it was sufficient for me.


Patrick Lightbody added a comment - 23/Feb/10 12:25 PM

George added a comment - 19/Mar/11 06:50 AM

I've found that Patrick Lightbody's fix in 1.0.3 wasn't applicable to the *firefoxproxy launcher. The attached patch updates FirefoxCustomProfileLauncher.java with the solution code that Patrick made to FirefoxChromeLauncher.java in support of Snow Leopard.