Trying to get Selium 2.4.0 to work on Ubuntu wtih Firefox 6

100 views
Skip to first unread message

Jaime Requena

unread,
Aug 22, 2011, 4:56:47 PM8/22/11
to Selenium Users
I keep getting this error when I try to test:

Aug 22, 2011 4:55:01 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
16:55:01.747 INFO - Java: Sun Microsystems Inc. 20.1-b02
16:55:01.751 INFO - OS: Linux 2.6.38-11-generic amd64
16:55:01.783 INFO - v2.4.0, with Core v2.4.0. Built from revision
13337
16:55:01.977 INFO - RemoteWebDriver instances should connect to:
http://127.0.0.1:4444/wd/hub
16:55:01.979 INFO - Version Jetty/5.1.x
16:55:01.980 INFO - Started HttpContext[/selenium-server/driver,/
selenium-server/driver]
16:55:01.982 INFO - Started HttpContext[/selenium-server,/selenium-
server]
16:55:01.982 INFO - Started HttpContext[/,/]
16:55:06.392 INFO - Started
org.openqa.jetty.jetty.servlet.ServletHandler@6d62dbb6
16:55:06.392 INFO - Started HttpContext[/wd,/wd]
16:55:06.409 INFO - Started SocketListener on 0.0.0.0:4444
16:55:06.410 INFO - Started org.openqa.jetty.jetty.Server@6f507fb2
16:55:09.075 INFO - Checking Resource aliases
16:55:09.077 INFO - Command request: getNewBrowserSession[*firefox,
http://localhost/testdrive/index-test.php/] on session null
16:55:09.082 INFO - creating new remote session
16:55:09.142 INFO - Allocated session 6c60b92469244f5f8fa4b61a01226a00
for http://localhost/testdrive/index-test.php/, launching...
16:55:09.149 ERROR - Failed to start new browser session, shutdown
browser and clear all session data
java.lang.IllegalArgumentException: resource /
customProfileDirCUSTFFCHROME relative to
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher not
found.
at
com.google.common.base.Preconditions.checkArgument(Preconditions.java:
115)
at com.google.common.io.Resources.getResource(Resources.java:164)
at
org.openqa.selenium.server.browserlaunchers.ResourceExtractor.extractResourcePath(ResourceExtractor.java:
37)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.extractProfileFromJar(FirefoxChromeLauncher.java:
174)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.makeCustomProfile(FirefoxChromeLauncher.java:
216)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:
82)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.java:
412)
at
org.openqa.selenium.server.browserlaunchers.FirefoxLauncher.launchRemoteSession(FirefoxLauncher.java:
109)
at
org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:
375)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:
125)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:
87)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:
785)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:
422)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:
393)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:
146)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:
820)
at
org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:
986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:
837)
at
org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:
243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:
357)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:
534)
16:55:09.158 INFO - Got result: Failed to start new browser session:
Error while launching browser on session null
16:55:09.167 INFO - Command request: getNewBrowserSession[*firefox,
http://localhost/testdrive/index-test.php/] on session null
16:55:09.167 INFO - creating new remote session
16:55:09.168 INFO - Allocated session c1426e705c214d039888703062dd7475
for http://localhost/testdrive/index-test.php/, launching...
16:55:09.169 ERROR - Failed to start new browser session, shutdown
browser and clear all session data
java.lang.IllegalArgumentException: resource /
customProfileDirCUSTFFCHROME relative to
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher not
found.
at
com.google.common.base.Preconditions.checkArgument(Preconditions.java:
115)
at com.google.common.io.Resources.getResource(Resources.java:164)
at
org.openqa.selenium.server.browserlaunchers.ResourceExtractor.extractResourcePath(ResourceExtractor.java:
37)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.extractProfileFromJar(FirefoxChromeLauncher.java:
174)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.makeCustomProfile(FirefoxChromeLauncher.java:
216)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:
82)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.java:
412)
at
org.openqa.selenium.server.browserlaunchers.FirefoxLauncher.launchRemoteSession(FirefoxLauncher.java:
109)
at
org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:
375)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:
125)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:
87)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:
785)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:
422)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:
393)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:
146)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:
820)
at
org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:
986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:
837)
at
org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:
243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:
357)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:
534)
16:55:09.171 INFO - Got result: Failed to start new browser session:
Error while launching browser on session null
16:55:09.175 INFO - Command request: getNewBrowserSession[*firefox,
http://localhost/testdrive/index-test.php/] on session null
16:55:09.175 INFO - creating new remote session
16:55:09.176 INFO - Allocated session 05363b639e054c02882c268b25bfb678
for http://localhost/testdrive/index-test.php/, launching...
16:55:09.177 ERROR - Failed to start new browser session, shutdown
browser and clear all session data
java.lang.IllegalArgumentException: resource /
customProfileDirCUSTFFCHROME relative to
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher not
found.
at
com.google.common.base.Preconditions.checkArgument(Preconditions.java:
115)
at com.google.common.io.Resources.getResource(Resources.java:164)
at
org.openqa.selenium.server.browserlaunchers.ResourceExtractor.extractResourcePath(ResourceExtractor.java:
37)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.extractProfileFromJar(FirefoxChromeLauncher.java:
174)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.makeCustomProfile(FirefoxChromeLauncher.java:
216)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:
82)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.java:
412)
at
org.openqa.selenium.server.browserlaunchers.FirefoxLauncher.launchRemoteSession(FirefoxLauncher.java:
109)
at
org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:
375)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:
125)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:
87)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:
785)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:
422)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:
393)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:
146)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:
820)
at
org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:
986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:
837)
at
org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:
243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:
357)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:
534)
16:55:09.179 INFO - Got result: Failed to start new browser session:
Error while launching browser on session null

Krishnan Mahadevan

unread,
Aug 22, 2011, 10:15:03 PM8/22/11
to seleniu...@googlegroups.com
Jaime,
Can you please include the commands that you are trying to launch the Hub and the webDriver node (along with the contents of the nodeConfig file if you are using one), and also include a sample code that you are trying to run, which is causing you these problems ?

That would be more helpful for someone in this forum to troubleshoot.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"




--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


Ken

unread,
Aug 23, 2011, 2:07:11 AM8/23/11
to Selenium Users
How are you creating the new Selenium instance? It would be helpful if
you could post the code used to create the Selenium object.


On Aug 22, 1:56 pm, Jaime Requena <jrequ...@towerstream.com> wrote:
> I keep getting this error when I try to test:
>
> Aug 22, 2011 4:55:01 PM org.openqa.grid.selenium.GridLauncher main
> INFO: Launching a standalone server
> 16:55:01.747 INFO - Java: Sun Microsystems Inc. 20.1-b02
> 16:55:01.751 INFO - OS: Linux 2.6.38-11-generic amd64
> 16:55:01.783 INFO - v2.4.0, with Core v2.4.0. Built from revision
> 13337
> 16:55:01.977 INFO - RemoteWebDriver instances should connect to:http://127.0.0.1:4444/wd/hub
> 16:55:01.979 INFO - Version Jetty/5.1.x
> 16:55:01.980 INFO - Started HttpContext[/selenium-server/driver,/
> selenium-server/driver]
> 16:55:01.982 INFO - Started HttpContext[/selenium-server,/selenium-
> server]
> 16:55:01.982 INFO - Started HttpContext[/,/]
> 16:55:06.392 INFO - Started
> org.openqa.jetty.jetty.servlet.ServletHandler@6d62dbb6
> 16:55:06.392 INFO - Started HttpContext[/wd,/wd]
> 16:55:06.409 INFO - Started SocketListener on 0.0.0.0:4444
> 16:55:06.410 INFO - Started org.openqa.jetty.jetty.Server@6f507fb2
> 16:55:09.075 INFO - Checking Resource aliases
> 16:55:09.077 INFO - Command request: getNewBrowserSession[*firefox,http://localhost/testdrive/index-test.php/] on session null
> 16:55:09.082 INFO - creating new remote session
> 16:55:09.142 INFO - Allocated session 6c60b92469244f5f8fa4b61a01226a00
> forhttp://localhost/testdrive/index-test.php/, launching...
> 16:55:09.167 INFO - Command request: getNewBrowserSession[*firefox,http://localhost/testdrive/index-test.php/] on session null
> 16:55:09.167 INFO - creating new remote session
> 16:55:09.168 INFO - Allocated session c1426e705c214d039888703062dd7475
> forhttp://localhost/testdrive/index-test.php/, launching...
> 16:55:09.175 INFO - Command request: getNewBrowserSession[*firefox,http://localhost/testdrive/index-test.php/] on session null
> 16:55:09.175 INFO - creating new remote session
> 16:55:09.176 INFO - Allocated session 05363b639e054c02882c268b25bfb678
> forhttp://localhost/testdrive/index-test.php/, launching...
> 146)
>         at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
>         at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
>         at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
>         at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:
> 820)
>         at
> org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:
> 986)
>         at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:
> 837)
>         at
> org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:
> 243)
>         at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:
> 357)
> ...
>
> read more »

Jaime Requena

unread,
Aug 23, 2011, 10:04:25 AM8/23/11
to Selenium Users
Here is some more detail:

I'm trying to get PHPUnit to work with Selenium in the Yii Framework.

I'm starting the selenium server in a terminal window.

In another window I'm doing the command :

phpunit functional/SiteTest.php

I get these errors:

PHPUnit 3.5.5 by Sebastian Bergmann.

EEE

Time: 0 seconds, Memory: 8.50Mb

There were 3 errors:

1) SiteTest::testIndex
PHPUnit_Framework_Exception: Response from Selenium RC server for
getNewBrowserSession(*firefox /usr/bin/firefox, http://localhost/testdrive/index-test.php/).
Failed to start new browser session: Error while launching browser.


/home/jrequena/workspace/yii/framework/test/CWebTestCase.php:61

2) SiteTest::testContact
PHPUnit_Framework_Exception: Response from Selenium RC server for
getNewBrowserSession(*firefox /usr/bin/firefox, http://localhost/testdrive/index-test.php/).
Failed to start new browser session: Error while launching browser.


/home/jrequena/workspace/yii/framework/test/CWebTestCase.php:61

3) SiteTest::testLoginLogout
PHPUnit_Framework_Exception: Response from Selenium RC server for
getNewBrowserSession(*firefox /usr/bin/firefox, http://localhost/testdrive/index-test.php/).
Failed to start new browser session: Error while launching browser.


/home/jrequena/workspace/yii/framework/test/CWebTestCase.php:61

FAILURES!
Tests: 3, Assertions: 0, Errors: 3.



On the Selenium server window, I get the error listed below (my
original post).



Here is my phpunit.xml file:

<phpunit bootstrap="bootstrap.php"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnFailure="false">

<selenium>
<browser name="Firefox"
browser="*firefox /usr/bin/firefox"
host="localhost"
port="4444"
timeout="30000" />
</selenium>

</phpunit>



Thanks for any help

Jaime





On Aug 23, 2:07 am, Ken <kenneth.koo...@gmail.com> wrote:
> How are you creating the new Selenium instance? It would be helpful if
> you could post the code used to create the Selenium object.
>
> ...
>
> read more »

Kenneth Koontz

unread,
Aug 24, 2011, 1:16:55 AM8/24/11
to Selenium Users
I'm going to take a wild guess here.

What happens when you remove /usr/bin/firefox?

browser=*firefox ?

On Aug 23, 7:04 am, Jaime Requena <jrequ...@towerstream.com> wrote:
> Here is some more detail:
>
> I'm trying to get PHPUnit to work with Selenium in the Yii Framework.
>
> I'm starting the selenium server in a terminal window.
>
> In another window I'm doing the command :
>
> phpunit functional/SiteTest.php
>
> I get these errors:
>
> PHPUnit 3.5.5 by Sebastian Bergmann.
>
> EEE
>
> Time: 0 seconds, Memory: 8.50Mb
>
> There were 3 errors:
>
> 1) SiteTest::testIndex
> PHPUnit_Framework_Exception: Response from Selenium RC server for
> getNewBrowserSession(*firefox /usr/bin/firefox,http://localhost/testdrive/index-test.php/).
> Failed to start new browser session: Error while launching browser.
>
> /home/jrequena/workspace/yii/framework/test/CWebTestCase.php:61
>
> 2) SiteTest::testContact
> PHPUnit_Framework_Exception: Response from Selenium RC server for
> getNewBrowserSession(*firefox /usr/bin/firefox,http://localhost/testdrive/index-test.php/).
> Failed to start new browser session: Error while launching browser.
>
> /home/jrequena/workspace/yii/framework/test/CWebTestCase.php:61
>
> 3) SiteTest::testLoginLogout
> PHPUnit_Framework_Exception: Response from Selenium RC server for
> getNewBrowserSession(*firefox /usr/bin/firefox,http://localhost/testdrive/index-test.php/).
> ...
>
> read more »

Jaime Requena

unread,
Aug 24, 2011, 9:07:54 AM8/24/11
to Selenium Users
I had

browser=*firefox

originally and I was still getting the same error. I'm surprised no
other people have run into this problem with the YII framework.

Jaime

On Aug 24, 1:16 am, Kenneth Koontz <kenneth.koo...@gmail.com> wrote:
> I'm going to take a wild guess here.
>
> What happens when you remove  /usr/bin/firefox?
>
> browser=*firefox ?
>
> ...
>
> read more »

Krishnan

unread,
Aug 24, 2011, 10:53:32 PM8/24/11
to Selenium Users
I have also started seeing an issue with Firefox 6 on my Ubuntu
machine.

Exception that I am seeing :
org.openqa.selenium.firefox.NotConnectedException: Unable to connect
to host 127.0.0.1 on port 7055 after 45000 ms

Here's my configuration :

OS : Ubuntu 11.04 (32 bit)
Firefox : v6.0
Selenium version : 2.3.1

Sample Code :
public class TestFirefoxBrowser {
public static void main(String[] args){
WebDriver driver = null;
try{
driver = new FirefoxDriver();
driver.get("http://www.google.com");

}catch(Exception e){

}finally{
driver.quit();
}
}
}

Exception :
org.openqa.selenium.firefox.NotConnectedException: Unable to connect
to host 127.0.0.1 on port 7055 after 45000 ms
at
org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:
98)
at
org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:
148)
at
org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:
86)
at
org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:
127)
at
org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:
78)
at
selenium.two.unleashed.TestFirefoxBrowser.main(TestFirefoxBrowser.java:
10)
Exception in thread "main" java.lang.NullPointerException
at
selenium.two.unleashed.TestFirefoxBrowser.main(TestFirefoxBrowser.java:
16)
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages