Stack trace using new install...

99 views
Skip to first unread message

Kevin Gann

unread,
May 5, 2009, 3:33:40 PM5/5/09
to webd...@googlegroups.com
I recently installed Vista 64, java 1.6, ganymede, and wanted to check out the saveScreenshot functionality of the FirefoxDriver. Unfortunately I'm getting the following stack trace... I tried setting the webdriver.firefox.bin and set webdriver.firefox.profile to a profile I created. The stack trace appears to point to being unable to start the FF process, but I'm unsure how to resolve that.

org.openqa.selenium.WebDriverException: Unable to clean profile
System info: os.name: 'Windows Vista', os.arch: 'amd64', os.version: '6.0', java.version: '1.6.0_13'
Driver info: driver.version: firefox
    at org.openqa.selenium.firefox.ProfileManager.initCachedProfile(ProfileManager.java:136)
    at org.openqa.selenium.firefox.ProfileManager.createProfile(ProfileManager.java:73)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:111)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:84)
    at com.ii4sm.icsr.test.IcsrLoginTest.setup(IcsrLoginTest.java:53)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
    at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.io.IOException: Cannot run program "C:\Program Files (x86)\Mozilla Firefox": CreateProcess error=5, Access is denied
    at java.lang.ProcessBuilder.start(Unknown Source)
    at org.openqa.selenium.firefox.FirefoxBinary.startProfile(FirefoxBinary.java:64)
    at org.openqa.selenium.firefox.FirefoxBinary.clean(FirefoxBinary.java:131)
    at org.openqa.selenium.firefox.ProfileManager.initCachedProfile(ProfileManager.java:134)
    ... 27 more
Caused by: java.io.IOException: CreateProcess error=5, Access is denied
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    ... 31 more


Julian Harty

unread,
May 5, 2009, 11:04:04 PM5/5/09
to webd...@googlegroups.com
Can you start Firefox manually from a command prompt? (from the same user account used when you run your program)

The program seems to be located here C:\Program Files (x86)\Mozilla Firefox and the error message implies the java process doesn't have sufficient permission to start Firefox?

I've not used Vista much so can't help much on specifics of the platform - however given it's revised security model (compared to XP) there might be a restriction on programs starting other programs?

HTH a little.


Julian

2009/5/5 Kevin Gann <kay...@gmail.com>

Kevin Gann

unread,
May 6, 2009, 1:25:46 AM5/6/09
to webd...@googlegroups.com
Looks like I figured out my problem.

On the wiki page for the FirefoxDriver it states that webdriver.firefox.bin is the "The location of the binary used to control firefox". I assumed that "location" meant that the value just needed to be a directory not including a directory. In other words the FirefoxDriver would assume that the executable name was "firefox.exe". What actually works though is the full path including the executable name. I probably could have figured this out if I had downloaded the code and purused myself...

For example this works (as well as other combinations including 8.3 conventions):
-Dwebdriver.firefox.bin="C://Program Files (x86)//Mozilla Firefox//firefox.exe"

But this doesn't work:
-Dwebdriver.firefox.bin="C://Program Files (x86)//Mozilla Firefox//"

Yes. I could start it from the command prompt manually (c:\Program Files (x86)\Mozilla Firefox>firefox.exe -p "WebDriver"). ;)

Thanks for the response though!

KG

Simon Stewart

unread,
May 6, 2009, 5:39:27 AM5/6/09
to webd...@googlegroups.com
Hi KG,

I've very recently switched from using Linux to Vista as my main
development platform for webdriver because that's where a lot of
people are running their tests. As a result, you'll be pleased to hear
that in the latest (trunk, not released) version of webdriver, I've
fixed the dumb "unable to start on Vista 64" issue :)

I'll also update the wiki to reflect that by the location of firefox
includes the executable name.

Regards,

Simon

Kevin Gann

unread,
May 6, 2009, 10:15:01 AM5/6/09
to webd...@googlegroups.com
Thanks for affirming my suspicions and preview of the "fix". :)
Reply all
Reply to author
Forward
0 new messages