libnss3.so can't be found, and so session ID is null

34 views
Skip to first unread message

Olivia Yang

unread,
Feb 13, 2009, 3:10:23 PM2/13/09
to selenium-users...@googlegroups.com
Hi, I'm trying to run Selenium tests written in Java from Eclipse on Linux machine.  The following is a list of what I have on my machine.

1. PATH=:/apollo/env/SDETools/bin:... ...:/home/oliviay/firefox20
2. LD_LIBRARY_PATH=/opt/third-party/lib:/usr/lib:/home/oliviay/firefox20:/apollo/env/SDETools/lib:/usr/lib/firefox
3. Updating /etc/ld.so.conf, and then you ‘ldconfig’
/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib/mysql
/usr/lib/qt-3.1/lib
/usr/lib/firefox
4. Symlink

oliviay-2.desktop% ls -l /usr/lib/firefox
         lrwxrwxrwx1 rootroot           23 Feb 12 14:31 /usr/lib/firefox -> /home/oliviay/firefox20
oliviay-2.desktop% ls -l /usr/bin/firefox*
         lrwxrwxrwx1 rootroot           24 Feb 12 16:10 /usr/bin/firefox -> /usr/lib/firefox/firefox
         lrwxrwxrwx1 rootroot           28 Feb 12 15:05 /usr/bin/firefox-bin -> /usr/lib/firefox/firefox-bin

  5. Unfortunenately, running the following command still gives me error.And so does the tests themselves.
I have verified that libnss3.so exists at /usr/lib


oliviay-2.desktop% ldd /usr/lib/firefox/firefox-bin|grep libnss3.so
/usr/lib/firefox/firefox-bin: /usr/lib/libnss3.so: version `NSS_3.9.2' not found (required by /usr/lib/firefox/firefox-bin)
/usr/lib/firefox/firefox-bin: /usr/lib/libnss3.so: version `NSS_3.11.1' not found (required by /usr/lib/firefox/firefox-bin)
/usr/lib/firefox/firefox-bin: /usr/lib/libnss3.so: version `NSS_3.9.3' not found (required by /usr/lib/firefox/firefox-bin)
/usr/lib/firefox/firefox-bin: /usr/lib/libnss3.so: version `NSS_3.10' not found (required by /usr/lib/firefox/firefox-bin)
        libnss3.so => /usr/lib/libnss3.so (0x00646000)


**********************************************************************
The actual test error:

11:37:53.305 INFO - Java: Sun Microsystems Inc. 1.6.0_02-b05
11:37:53.306 INFO - OS: Linux 2.4.21-50a6smp i386
11:37:53.308 INFO - v1.0-beta-2 [2571], with Core v1.0-beta-2 [2330]
11:37:53.468 INFO - Version Jetty/5.1.x
11:37:53.472 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
11:37:53.512 INFO - Started HttpContext[/selenium-server,/selenium-server]
11:37:53.512 INFO - Started HttpContext[/,/]
11:37:53.521 INFO - Started SocketListener on 0.0.0.0:4444
11:37:53.559 INFO - Started [org.mortbay.jetty.Server@5ac072]
11:37:58.195 INFO - Checking Resource aliases
11:37:58.202 INFO - Command request: getNewBrowserSession[*chrome, [http://development.amazon.com|http://development.amazon.com/], ] on session null
11:37:58.247 INFO - creating new remote session
11:37:58.347 INFO - Allocated session 9095517975e747dcb1451c222fccc8e5 for [http://development.amazon.com|http://development.amazon.com/], launching...
11:37:58.392 INFO - Preparing Firefox profile...
/usr/lib/firefox/firefox-bin: /usr/lib/libnss3.so: version `NSS_3.9.2' not found (required by /usr/lib/firefox/firefox-bin)
/usr/lib/firefox/firefox-bin: /usr/lib/libnss3.so: version `NSS_3.11.1' not found (required by /usr/lib/firefox/firefox-bin)
/usr/lib/firefox/firefox-bin: /usr/lib/libnss3.so: version `NSS_3.9.3' not found (required by /usr/lib/firefox/firefox-bin)
/usr/lib/firefox/firefox-bin: /usr/lib/libnss3.so: version `NSS_3.10' not found (required by /usr/lib/firefox/firefox-bin)
11:38:18.842 ERROR - Failed to start new browser session, shutdown browser and clear all session data
java.lang.RuntimeException: Timed out waiting for profile to be created!
        at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:261)
        at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.populateCustomProfileDirectory(FirefoxChromeLauncher.java:119)
        at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:96)
        at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.java:310)
        at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:351)
        at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:119)
        at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:82)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:658)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:392)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:368)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:129)
        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)
11:38:18.862 INFO - Got result: Failed to start new browser session: Error while launching browser on session null

When trying to launch the tests using command line, I have the following error:


oliviay-2.desktop% java -cp . NewTest
Exception in thread "main" java.lang.NoClassDefFoundError: com/thoughtworks/selenium/DefaultSelenium
        at NewTest.init(NewTest.java:9)
        at NewTest.main(NewTest.java:42)

Any idea how can I get it work, through either Eclipse or command line?  Thanks a lot.

Reply all
Reply to author
Forward
0 new messages