• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Selenium Testing Firefox Launch Failing - Failed to start new browser session

 
Ranch Hand
Posts: 83
Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to run selenium test cases on my site from windows machine and getting a wierd firefox launching problem from past few days.

I have tried few options per selenium FAQ page, however the problem still persists.
I have tried following things

1. I have tried cleaning up the C:\DOCUME~1\fromdev\LOCALS~1\Temp directory. The directory mentioned in the java stacktrace does not really exist on my system.
2. I have also tried restarting my system, just avoid any existing processes causing this.
3. I have also tried checking the task manager on my windows machine and I dont see any firefox processes.
4. I have also tried removing existing firefox profiles and recreating them.
5. I have also tried firefox with no-addon mode, however no difference.

The exception stacktrace is as shown below.

12:06:54.218 INFO - creating new remote session
12:06:54.218 INFO - Allocated session 6461092698d344f0b9856f9152024b63 for http://www.fromdev.com, launching...
12:06:54.234 INFO - Preparing Firefox profile...
12:07:15.238 ERROR - Failed to start new browser session, shutdown browser and clear all session data
java.lang.RuntimeException: Firefox refused shutdown while preparing a profile
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.wai
tForFullProfileToBeCreated(FirefoxChromeLauncher.java:371)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.pop
ulateCustomProfileDirectory(FirefoxChromeLauncher.java:120)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.lau
nch(FirefoxChromeLauncher.java:90)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.lau
nchRemoteSession(FirefoxChromeLauncher.java:416)
at org.openqa.selenium.server.browserlaunchers.FirefoxLauncher.launchRem
oteSession(FirefoxLauncher.java:118)
at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSessi
on(BrowserSessionFactory.java:374)
at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession
(BrowserSessionFactory.java:125)
at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession
(BrowserSessionFactory.java:86)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowse
rSession(SeleniumDriverResourceHandler.java:809)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(Se
leniumDriverResourceHandler.java:435)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleComman
dRequest(SeleniumDriverResourceHandler.java:405)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(Selen
iumDriverResourceHandler.java:149)
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:9
86)
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)
Caused by: org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher$FileLockRemainedException: Lock file still present! C:\DOCUME~1\fromdev\LOCALS~1\Temp\customProfileDir6461092698d344f0b9856f9152024b63\parent.lock
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.wai
tForFileLockToGoAway(FirefoxChromeLauncher.java:322)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.wai
tForFullProfileToBeCreated(FirefoxChromeLauncher.java:369)
... 20 more
12:07:15.238 INFO - Got result: Failed to start new browser session: Error while
launching browser on session null




Any help or suggestions are welcome, I am running out of ideas to fix this problem.
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about trying a re-install of firefox?
 
Sachin Joshi
Ranch Hand
Posts: 83
Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tried it, doesn't work either. I am now using googlechrome instead.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am seeing the same issue. Firefox used to work fine until I upgraded to 13.0. The the Integrated Developer Environment works fine but when I export to Java it will not start the browser session now. All my previous tests have the same problem now - so I've got to find some fix to this. Could sure use some help.

Thank you
 
Ranch Hand
Posts: 808
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might try the hack described here. It's been a while since I used Selenium, but according to this blog it seems that having a higher version of FF than the maxVersion declared in the XML causes problems.
 
Ray Rudd
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Dennis. I haven't tried that but is sounds like a good resolution. It helps me understand why 12 works and 13 does not and how to handle it in the future. I went back to FF 12.0 and everything works well. FF has gotten a little aggressive on their releases. We were afraid something like this might happen because of that. So I've parked on FF 12.0 now (turned off auto updates - actually had to update some files - here is a link if others are interested (http://support.mozilla.org/en-US/questions/839764 ) and I'll evaluate FF releases and Selenium updates in combination now - before letting it get into our test harness.
Thanks Ray
 
What I don't understand is how they changed the earth's orbit to fit the metric calendar. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic