robotframework / OldSeleniumLibrary

Deprecated Selenium library for Robot Framework
Apache License 2.0
13 stars 3 forks source link

Open Browser fails to open Firefox 3.5.4 on OS X 10.6.1 #60

Closed spooning closed 9 years ago

spooning commented 9 years ago

Originally submitted to Google Code by dhem... on 4 Nov 2009

I am unable to open my Firefox browser with Selenium Library on my system.

Here's the syntax I'm using: | | Open Browser | http://localhost:4567 | *firefox /Applications/Firefox.app/Contents/MacOS/firefox |

This causes Firefox to abort on startup. The error message says "firefox-bin quit unexpectedly." If I click "report" on the error dialog I get this additional info:

=== BEGIN QUOTE === Dyld Error Message: 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 ==== END QUOTE ====

The error message is the same whether I specify firefox or firefox-bin at the end of the path.

Google search suggests that this libsqlite3 library incompatibility problem is well known, and offers several potential workarounds: (1) Delete the libsqlite3.dylib library from my Firefox package. (2) Copy a different libsqlite3.dylib from elsewhere on my system into the Firefox package.

Neither of those approaches worked for me. I don't remember the details of how they failed.

I have also tried using custom instead of firefox. This does not yield the error message as above, but instead causes an exception in the Selenium Library. Here is a snip from the selenium server log:

=== BEGIN QUOTE === 11:44:11.206 INFO - Command request: getNewBrowserSession[*custom /Applications/Firefox.app/Contents/MacOS/firefox, http://localhost:4567 ] on session null 11:44:11.208 INFO - creating new remote session 11:44:11.268 INFO - Allocated session 8ddb0e4876934d2089836e7790bcdebb for http://localhost:4567 launching... 11:44:11.268 ERROR - Failed to start new browser session, shutdown browser and clear all session data java.lang.NullPointerException at org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher.launchRemoteSession(AbstractBrowserLauncher.java:30) at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:357) at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:122) at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:84) at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:699) at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:393) at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:364) at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:125) 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:820) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) 11:44:11.270 INFO - Got result: Failed to start new browser session: Error while launching browser on session null ==== END QUOTE ====

I have deleted the Firefox.app from my system and reinstalled. The fresh install yields the same results as above.

If I specify *safari (without a path), my tests run correctly under Safari.

Here are the versions of the bits that seem likely to be involved: OS X 10.6.1 Firefox 3.5.4 Robot Framework 2.1.2 Selenium Library 2.2.1

spooning commented 9 years ago

Originally submitted to Google Code by dhem... on 6 Nov 2009

The problem occurs with the shiny new Firefox 3.5.5. as well.

spooning commented 9 years ago

Originally submitted to Google Code by @yanne on 25 Nov 2009

Unfortunately I have currently no resources (mainly lacking a machine with OSX, contributions welcome) to test this. Will test as soon as opportunity presents itself.

spooning commented 9 years ago

Originally submitted to Google Code by jerry57 on 21 Jan 2010

Just a heads up, this is a known issue. If you google "Firefox crash libsqlite3" you will see lots of hits on Mac and Linux. The fix for us was to rename /Applications/Firefox.app/Contents/MacOS/libsqlite3.dylib to /Applications/Firefox.app/Contents/MacOS/bad_libsqlite3.dylib. Once this was done we were back up and running without a problem.

spooning commented 9 years ago

Originally submitted to Google Code by dhem... on 24 Jan 2010

jerry57, I tried that a while ago, and again just now (with FF3.6), and it doesn't work for me.

Upon launching, FF gives this error: "SQLite Version Error. The application has been updated, but your version of SQLite is too old and the application cannot run."

So my system differs in some important way from other people's. Harumph.

spooning commented 9 years ago

Originally submitted to Google Code by jerry57 on 9 Feb 2010

I realize this now that I have upgraded my FF, sorry. I have not been able to find another fix and am looking into several. Should I find something new, I will be sure to post it here for you.

spooning commented 9 years ago

Originally submitted to Google Code by jerry57 on 10 Feb 2010

Since yesterday I have gotten this working once again. Beware though, I am using the alpha selenium-server.jar. Here is what I did to get this working: OS Mac OS X 10.6.2 FireFox 3.5.7 (not tested with any other version yet) python 2.6 robotframework 2.1.2 robotframework-seleniumlibrary 2.2.2

goto https://code.google.com/p/selenium/downloads/list download selenium-server-standalone-2.0a2.jar as root (or sudo) goto /Library/Python/2.6/site-packages/SeleniumLibrary/lib/ mv selenium-server.jar to selenium-server-org.jar cp /<downloadpath>/selenium-server-standalone-2.0a2.jar ln -s selenium-server-standalone-2.0a2.jar selenium-server.jar

Make sure there are no python or robotframework processes running before doing the above. I used default installs of all versions listed above and then installed the latest selenium-server-standalone-2.0a2.jar

spooning commented 9 years ago

Originally submitted to Google Code by jerry57 on 10 Feb 2010

above was tested on a system that was previously failing for libsqlite3.dylib error being too old/different version.

spooning commented 9 years ago

Originally submitted to Google Code by dhem... on 10 Feb 2010

Thanks, Jerry. I can now drive Firefox with RF/SL!

spooning commented 9 years ago

Originally submitted to Google Code by jerry57 on 10 Feb 2010

Great news, at least it is working on more than just my machine :) I can also say it is working with FF 3.6 as I upgraded that this morning for further testing. All still seems to be working, but still haven't fully tested all features of selenium-server.jar.

spooning commented 9 years ago

Originally submitted to Google Code by jerry57 on 10 Feb 2010

Looks like the permanent fix for this is going to be to upgrade the selenium-server.jar that is deployed as part of SeleniumLibrary install.

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 10 Feb 2010

If simply upgrading the selenium-server.jar fixes this problem I don't see why we couldn't do that already in 2.3 release. I'm slightly worried about the alpha2 label but if all the AcceptanceTests pass it ought to be safe. Has anyone checked is there any official 1.x release that would have the same fix?

Big thanks jerry57 and dhemery for debugging this!

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 11 Feb 2010

There are two problems in bundling the 2.0alpha2 version of the selenium-server.jar with the forthcoming SeLib 2.3 release:

1) As I already wrote in comment 11, the alpha label is somewhat worrying. I also expect more alphas/betas/rcs to appear in the near future and trying to keep up doesn't sound like a good idea. An official release would be much better.

2) The 2.0 series jars seem to be 10MB (~15MB vs ~5MB) bigger than the 1.0 versions. That's quite a lot bigger dependency for all users to download.

I just discussed this with Janne and we feel that incorporating the 2.0alpha2 jar at this point isn't probably too wise. Instead of that, we could add a note to installation instructions about problems with OSX 10.6 and Firefox with a link to workaround instructions.

The best solution would be getting 1.0.x jar with the same fix that's in the 2.0alpha2. Has anyone found a bug report describing this problem from the Selenium issue tracker with more information about where/how it's fixed? Nor Janne or I have time investigate this any further before this Friday when we try to get the 2.3 release out (nor do we have 0S X 10.6 to actually tests this). It would be awesome if someone else would have a possibility to do that.

spooning commented 9 years ago

Originally submitted to Google Code by jerry57 on 11 Feb 2010

Agreed, I don't bundling the alpha version is wise. Adding a note for the work-around is a good idea for now, at least until this is permanently fix. Here is a link to the selenium bug/issue. http://jira.openqa.org/browse/SRC-743

Also, here is another reported work around, but I have not tried this at all. http://www.qaautomation.net/?p=15

Unfortunately I have not had time to run the AcceptanceTests either. I have one 10.6 machine to test on, but time is a very limiting factor right now, sorry.

spooning commented 9 years ago

Originally submitted to Google Code by @yanne on 12 Feb 2010

Since we decided not to upgrade selenium-server at this point, I am descoping this issue from 2.3. I added a note to Wiki in InstallationInstructions about this issue.

spooning commented 9 years ago

Originally submitted to Google Code by jerry57 on 15 Feb 2010

I checked out the source code on Feb 11. Over the weekend I upgraded a Mac OS X 10.5 machine to 10.6. The version of FF installed was 3.5.7. I then proceeded to run the acceptance tests after replacing the selenium-server.jar with selenium-server-standalone-2.0a2.jar. I ran the tests for both python and jython (version of jython was 2.5.1). I am attaching the results from the Jython run as it had the greatest number of failures, but both failed for Press Native Key. Press Native Key was the only failure for python though.

I see there is a new release today of the SeleniumLibrary and will update my source checkout and rerun the tests if it would help?

I think the InstallationInstructions note on the wiki will help for now and fully understand about not releasing the latest alpha selenium jar.

Jerry Schneider iPlantCollaborative/BIO5 UofA

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 15 Feb 2010

Press Native Key keyword is really fragile so it failing isn't really a surprise. The keyword calls the Selenium API directly so there's not much we can do there. I actually added a note about these problems to the documentation of this keyword before 2.3 release.

We don't yet officially support Jython 2.5.1 so failures with it are expected too. We tested that the 2.3 release works with Jython 2.2.1, though.

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 22 Feb 2010

Could someone test does Selenium 1.0.2 fix these problems? http://seleniumhq.wordpress.com/2010/02/22/selenium-1-0-2-release-firefox-3-6-and-snow-leopard-support/

We should probably create SeLib 2.3.1 w/ Se 1.0.2 in the near future.

spooning commented 9 years ago

Originally submitted to Google Code by jerry57 on 23 Feb 2010

I did the following on a machine that was failing previously and was using Selenium-server 2.0a2 Installed: RobotFramework-SeleniumLibrary v2.3 Pulled down selenium-remote-control-1.0.2.zip unpacked selenium-remote-control-1.0.2.zip cd /Library/Python/2.6/site-packages/SeleniumLibrary/lib sudo mv selenium-server.jar selenium-server-org.jar sudo cp ~/tmp//selenium-remote-control-1.0.2/selenium-server-1.0.2/selenium-server-standalone-1.0.2.jar . sudo ln -s selenium-server-standalone-1.0.2.jar selenium-server.jar I then proceeded to run some of our tests. All worked as expected. After that I ran the Robotframework-SeleniumLibrary AcceptanceTests that I worked with before and got only one failure for "python ff", the Press Native Key.

I believe this would be a better fix than using the alpha library and have left it in place for my continued usage here. I will report more if there are any problems.

Jerry Schneider iPlantCollaborative/BIO5 UofA

spooning commented 9 years ago

Originally submitted to Google Code by jerry57 on 23 Feb 2010

I just saw that 1.0.3 (http://seleniumhq.wordpress.com/2010/02/23/selenium-1-0-3-released/) was released to fix some windows issues so I ran it through the same tests as above and got the same results as above.

The only difference I saw in the packaging was that the selenium-server.jar is now named that and NOT selenium-server-standalone-1.0.2.jar

Jerry Schneider iPlantCollaborative/BIO5 UofA

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 23 Feb 2010

Thanks for testing Jerry. Did you check how big 1.0.3 jar file is? 1.0.2 was something like 16MB (the same as 2.0 alpha) when 1.0.1 is only 5.4MB.

It's probably best for us to wait a little to see if more regressions are found from Se 1.0.2/3. We are anyway concentrating on RF 2.1.3 currently and SeLib 2.3.1 release with the latest Se version could be done after that possibly next week. That would give people more time to find bugs from SeLib 2.3 too.

spooning commented 9 years ago

Originally submitted to Google Code by jerry57 on 23 Feb 2010

I just looked and the original selenium.jar is 5.3M while the 1.0.2/1.0.3/2.0a2 are all 15M in size.

Waiting a bit would not be a bad idea considering how fast Windows issues showed up on 1.0.2 :)

Thanks and good luck getting 2.1.3 ready!

spooning commented 9 years ago

Originally submitted to Google Code by @yanne on 1 Mar 2010

We already upgraded to 1.0.3 on trunk, so I am closing this. If the problem somehow persists after 2.3.1, this can be reopened.

spooning commented 9 years ago

Originally submitted to Google Code by stavanm on 16 Apr 2012

Hi,

I am using VERSION = '2.8.1' and I am still facing issue "Failed to start new browser session: Error while launching browser".

I am using Open Browser ${LOGIN_URL} firefox

spooning commented 9 years ago

Originally submitted to Google Code by tarnnum.... on 3 Sep 2012

Hi All,

I am executing test script using robot framework. Browser has been launched but url is not passed. I got following error. Please suggest

command: pybot.bat –argumentfile c:\users\tarnnu~1.ban\appdata\local\temp\RIDEufqggb.d\argfile.txt –listener C:\Python27\Lib\site-packages\robotide\contrib\testrunner\SocketListener.py:61876 C:\Python27\Scripts\tuto

unable to open socket to “localhost:61876″ error: [Errno 10061] No connection could be made because the target machine actively refused it

Tuto

Tuto.myFirstTest :: This is your first test

process 5560 killed