Unable to create Firefox profile directory

427 views
Skip to first unread message

Orjan

unread,
Nov 14, 2011, 9:21:14 AM11/14/11
to Selenium Users
Hi,

I am working on a project where we want to use Selenium in our
testing. The setup is headless test server running an Bamboo remote
agent with Xvfb.

The setup is as follows:
CentOS 6 x86_64
Atlassian Bamboo
Maven 2.2.1
Java 1.6.0_29
Xvfb 1.7.7
Selenium 2.10.0
Firefox 3.6.9

When running the tests through Bamboo we get the following error.

-------------------------------------------------------
build 14-Nov-2011 14:43:26 T E S T S
build 14-Nov-2011
14:43:26 -------------------------------------------------------
build 14-Nov-2011 14:43:26 Running SomeITCase
build 14-Nov-2011 14:43:30 log4j:WARN No appenders could be found for
logger (org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager).
build 14-Nov-2011 14:43:30 log4j:WARN Please initialize the log4j
system properly.
build 14-Nov-2011 14:44:15
org.openqa.selenium.firefox.NotConnectedException: Unable to connect
to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
build 14-Nov-2011 14:44:15 mkdir: cannot create directory `/.mozilla':
Permission denied
build 14-Nov-2011 14:44:15 Xlib: extension "RANDR" missing on display
":5.0".
build 14-Nov-2011 14:44:15 /usr/lib64/firefox-3.6/run-mozilla.sh: line
131: 22517 Segmentation fault (core dumped) "$prog" ${1+"$@"}
build 14-Nov-2011 14:44:15
build 14-Nov-2011 14:44:15 at
org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:
95)
build 14-Nov-2011 14:44:15 at
org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:
149)
build 14-Nov-2011 14:44:15 at
org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:
75)
build 14-Nov-2011 14:44:15 at
org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:
128)
build 14-Nov-2011 14:44:15 at
org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:
79)
build 14-Nov-2011 14:44:15 at
sb1.selenium.mobilepasswordorder.MobilePasswordOrderITCase.setUp(MobilePasswordOrderITCase.java:
31)
build 14-Nov-2011 14:44:15 at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
build 14-Nov-2011 14:44:15 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
build 14-Nov-2011 14:44:15 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
build 14-Nov-2011 14:44:15 at
java.lang.reflect.Method.invoke(Method.java:597)
build 14-Nov-2011 14:44:15 at org.junit.runners.model.FrameworkMethod
$1.runReflectiveCall(FrameworkMethod.java:44)
build 14-Nov-2011 14:44:15 at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:
15)

Notice the mkdir error - "cannot create directory `/.mozilla'.
I have tried manually creating this directory (/.mozilla) and
assigning ownership to the atlassian user but does not seem to make
any difference...

When running the samme unit tests from command line as atlassian user
everything works fine. Also when running from command line there is a
temporary firefox profile directory created under '/tmp'. Ex: /tmp/
anonymous7645808369331264586webdriver-profile/
Owner is the atlassian user.
This directory is _not_ created when running automatically...

Am I correct in guessing that the /.mozilla directory that fails
creation in the automatic run is the fallback profile directory that
Selenium tries to use? If so - what regulates where the profile
directory should be created?

Hope someone has some input to help me on the way here :-)

Thanks in advance.

-- Ørjan

Orjan

unread,
Nov 15, 2011, 5:23:50 AM11/15/11
to Selenium Users
Just to summarize.
Turned out to be a missing HOME variable when running in automated
mode that caused all the trouble. That variable is used when
initializing the Firefox profile.

Case closed.

-- Ørjan

On Nov 14, 3:21 pm, Orjan <orjanmje...@yahoo.com> wrote:
> Hi,
>
> I am working on a project where we want to use Selenium in our
> testing. The setup is headless test server running an Bamboo remote
> agent with Xvfb.
>
> The setup is as follows:
> CentOS 6 x86_64
> Atlassian Bamboo
> Maven 2.2.1
> Java 1.6.0_29
> Xvfb 1.7.7
> Selenium 2.10.0Firefox3.6.9
>
> When running the tests through Bamboo we get the following error.
>
> -------------------------------------------------------
> build   14-Nov-2011 14:43:26     T E S T S
> build   14-Nov-2011
> 14:43:26        -------------------------------------------------------
> build   14-Nov-2011 14:43:26    Running SomeITCase
> build   14-Nov-2011 14:43:30    log4j:WARN No appenders could be found for
> logger (org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager).
> build   14-Nov-2011 14:43:30    log4j:WARN Please initialize the log4j
> system properly.
> build   14-Nov-2011 14:44:15
> org.openqa.selenium.firefox.NotConnectedException: Unable to connect
> to host 127.0.0.1 on port 7055 after 45000 ms.Firefoxconsole output:
> Notice themkdirerror - "cannot create directory `/.mozilla'.
> I have tried manually creating this directory (/.mozilla) and
> assigning ownership to the atlassian user but does not seem to make
> any difference...
>
> When running the samme unit tests from command line as atlassian user
> everything works fine. Also when running from command line there is a
> temporaryfirefoxprofiledirectory created under '/tmp'. Ex: /tmp/
> anonymous7645808369331264586webdriver-profile/
> Owner is the atlassian user.
> This directory is _not_ created when running automatically...
>
> Am I correct in guessing that the /.mozilla directory that fails
> creation in the automatic run is the fallbackprofiledirectory that

poobathy r

unread,
Nov 17, 2011, 11:37:44 PM11/17/11
to seleniu...@googlegroups.com

What type of  proxy you are trying to create
please paste you code here....

--
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.


Reply all
Reply to author
Forward
0 new messages