Selenium: Unable to Obtain a Stable firefox connection in 60 seconds

Created on 27 Jul 2015  路  42Comments  路  Source: SeleniumHQ/selenium

I am getting this error on centos. I am using Selenium 2.46.2 and Firefox I have tried firefox 39, firefox 38.0 and firefox 33. But it is giving the same error. Here is my code:

Selenium::WebDriver::Firefox::Binary.path='/usr/bin/firefox'
browser = Watir::Browser.new :firefox # should open a new Firefox window
browser.goto self.url

D-firefox

Most helpful comment

Same error with:

selenium-webdriver (2.53.4) 
firefox 50

All 42 comments

I am seeing this too on CentOS 7.1.1503

RuntimeError: Exception 'unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055)'...

Exception 'unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055)'

/usr/local/share/gems/gems/selenium-webdriver-2.46.2/lib/selenium/webdriver/firefox/launcher.rb:90:in connect_until_stable' /usr/local/share/gems/gems/selenium-webdriver-2.46.2/lib/selenium/webdriver/firefox/launcher.rb:55:inblock in launch'
/usr/local/share/gems/gems/selenium-webdriver-2.46.2/lib/selenium/webdriver/common/socket_lock.rb:38:in locked' /usr/local/share/gems/gems/selenium-webdriver-2.46.2/lib/selenium/webdriver/firefox/launcher.rb:51:inlaunch'
/usr/local/share/gems/gems/selenium-webdriver-2.46.2/lib/selenium/webdriver/firefox/bridge.rb:41:in initialize' /usr/local/share/gems/gems/selenium-webdriver-2.46.2/lib/selenium/webdriver/common/driver.rb:50:innew'
/usr/local/share/gems/gems/selenium-webdriver-2.46.2/lib/selenium/webdriver/common/driver.rb:50:in for' /usr/local/share/gems/gems/selenium-webdriver-2.46.2/lib/selenium/webdriver.rb:84:infor'
/usr/local/share/gems/gems/watir-webdriver-0.8.0/lib/watir-webdriver/browser.rb:45:in initialize' /tests/helpers/browser_helper.rb:26:innew'
/tests/helpers/browser_helper.rb:26:in set_browser' /tests/libraryLink/library_link.rb:12:insetup'

You found any solution?

What we have done is revert back to FF 31.6.0 until a fix is in place, no sign of the unstable connection there, still using selenium 2.46.2

@umairmm you might add your error log output when you can, to ensure that it is the same issue

my log is:
F, [2015-07-28T03:01:26.652346 #30143] FATAL -- :
Selenium::WebDriver::Error::WebDriverError (unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055)):
app/models/site.rb:488:in new' app/models/site.rb:488:inscrape'
app/controllers/sites_controller.rb:171:in block in scrape' app/controllers/sites_controller.rb:170:inscrape'

This is still occurring in 2.47.0 on Cent OS 7

In centOS 6, with gem 'selenium-webdriver', '2.47.1' and firefox 33 I get the same error message:

"unable to obtain stable firefox connection in 60 seconds" ...

The same gem version and firefox versi贸n in windows 7, it works.

Hi!

centos version 6
selenium-webdriver v.2.47.1
and... when I update firefox version to last version available: (yum install firefox). v. 38.1.0
and exec 'dbus-uuidgen > /var/lib/dbus/machine-id'

it works!!!! =D

I faced the same issue. Downgrading the Firefox to the previous version solved my problem on Mac machine.

+1

I've seen this crop up today, given ruby gem version 2.53.1 and Firefox 47.0.0, on Ubuntu 14.04. Downgrading to Firefox 46.0.1 has temporarily solved it...but clearly I'd like to be able to use latest Firefox.

@TheMetalCode that's #2110

@lukeis Thank you!

I confirm the same behavior as described by @TheMetalCode on Mac OS 10.11.5
selenium-webdriver: 2.53.3
Firefox: 47.0

unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) (Selenium::WebDriver::Error::WebDriverError)

The issue is most likely related with firefox 47.0. Same behavior here.

selenium-webdriver: 2.53.4
OS: Ubuntu 14.04

Downgrading firefox for 46.0.1 did the trick.

You need to use Firefox 47.0.1 and the latest point release of your respective Selenium bindings.

@titusfortner , sorry this combination is not working. I am using

  • Selenium gem 2.53.4 and
  • Firefox 47.0+build3-0ubuntu0.14.04.1 (output from apt-cache show firefox | grep Version)
  • on Ubuntu 14.04.

However, after downloading the firefox version 46, the driver works. @rafaelfelix thank you!

@mojovski 47.0 doesn't work with selenium, only 47.0.1

I have the same issue:
Selenium::WebDriver::Error::WebDriverError: unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055)

However, it manages to open up the firefox with two tabs (skype tab active).
selenium_1
selenium_2

Backtrace of the error:

C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/firefox/launcher.rb:90:in `connect_until_stable'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/firefox/launcher.rb:55:in `block in launch'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/common/socket_lock.rb:43:in `locked'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/firefox/launcher.rb:51:in `launch'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/firefox/bridge.rb:43:in `initialize'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/common/driver.rb:53:in `new'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/common/driver.rb:53:in `for'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver.rb:84:in `for'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/watir-webdriver-0.9.3/lib/watir-webdriver/browser.rb:46:in `initialize'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/research-1.0.0/lib/research/website.rb:10:in `new'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/research-1.0.0/lib/research/website.rb:10:in `initialize'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/research-1.0.0/lib/research/query.rb:35:in `new'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/research-1.0.0/lib/research/query.rb:35:in `block in search'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.8-x64-mingw32/lib/nokogiri/xml/node_set.rb:187:in `block in each'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.8-x64-mingw32/lib/nokogiri/xml/node_set.rb:186:in `upto'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.8-x64-mingw32/lib/nokogiri/xml/node_set.rb:186:in `each'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/research-1.0.0/lib/research/query.rb:31:in `search'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/research-1.0.0/lib/research/exec/sitesearch.rb:44:in `run'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/research-1.0.0/lib/research/exec/base.rb:68:in `process_args'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/research-1.0.0/lib/research/exec/base.rb:38:in `parse'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/research-1.0.0/lib/research/exec/base.rb:22:in `parse!'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/research-1.0.0/bin/sitesearch:11:in `<top (required)>'
C:/Ruby23-x64/bin/sitesearch:22:in `load'
C:/Ruby23-x64/bin/sitesearch:22:in `<main>'

Firefox version: 48.0 (August 2 Release)
OS: Windows 10 Home v1511 Build 10586.545
Ruby: 2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]

I have no problems with my application on Firefox version: 44.0.2

Hi all, I am still facing the same problem with firefox 47.0.1 and 47, ubuntu 14.04.1 and Selenium gem 2.53.4.

Please find the below error

unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) (Selenium::WebDriver::Error::WebDriverError)
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/firefox/launcher.rb:90:in `connect_until_stable'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/firefox/launcher.rb:55:in `block in launch'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/common/socket_lock.rb:43:in `locked'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/firefox/launcher.rb:51:in `launch'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/firefox/bridge.rb:43:in `initialize'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/common/driver.rb:53:in `new'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/common/driver.rb:53:in `for'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver.rb:84:in `for'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/watir-webdriver-0.9.3/lib/watir-webdriver/browser.rb:46:in `initialize'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/watir-page-helper-1.0.3/lib/watir-page-helper/commands.rb:23:in `new'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/watir-page-helper-1.0.3/lib/watir-page-helper/commands.rb:23:in `create'
/home/krmamill/b2bfunctionaltests/features/support/env.rb:11:in `<top (required)>'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load_code_file'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:142:in `load_file'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:84:in `block in load_files!'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `each'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `load_files!'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:253:in `load_step_definitions'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:61:in `run!'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/cucumber-2.4.0/lib/cucumber/cli/main.rb:32:in `execute!'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/cucumber-2.4.0/bin/cucumber:8:in `<top (required)>'
/home/krmamill/.rvm/gems/ruby-2.3.0/bin/cucumber:22:in `load'
/home/krmamill/.rvm/gems/ruby-2.3.0/bin/cucumber:22:in `<top (required)>'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `load'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `kernel_load'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:24:in `run'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/cli.rb:304:in `exec'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/cli.rb:11:in `start'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/exe/bundle:27:in `block in <top (required)>'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
/home/krmamill/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/exe/bundle:19:in `<top (required)>'
/home/krmamill/.rvm/gems/ruby-2.3.0/bin/bundle:22:in `load'
/home/krmamill/.rvm/gems/ruby-2.3.0/bin/bundle:22:in `<main>'
/home/krmamill/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/home/krmamill/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'

Below is the gem list.

*** LOCAL GEMS ***

bigdecimal (default: 1.2.8)
builder (3.2.2)
bundler (1.12.5, 1.10.6)
bundler-unload (1.0.2)
childprocess (0.5.9)
cucumber (2.4.0)
cucumber-core (1.5.0)
cucumber-wire (0.0.1)
data_magic (0.22)
did_you_mean (1.0.0)
diff-lcs (1.2.5)
executable-hooks (1.3.2)
faker (1.6.6)
ffi (1.9.14)
firefox (0.1.0)
gem-wrappers (1.2.7)
gherkin (4.0.0)
headless (2.2.3)
i18n (0.7.0)
inifile (3.0.0)
io-console (default: 0.4.5)
json (default: 1.8.3)
minitest (5.8.3)
multi_json (1.12.1)
multi_test (0.1.2)
net-http-persistent (2.9.4)
net-telnet (0.1.1)
page_navigation (0.9)
parallel (1.9.0)
parallel_tests (2.7.1, 1.9.0)
power_assert (0.2.6)
psych (default: 2.0.17)
rack (2.0.1)
rake (11.2.2, 10.4.2)
rdoc (default: 4.2.1)
rspec (3.5.0)
rspec-core (3.5.2)
rspec-expectations (3.5.0)
rspec-mocks (3.5.0)
rspec-support (3.5.0)
rubygems-bundler (1.4.4)
rubygems-update (2.6.6)
rubyzip (1.2.0)
rvm (1.11.3.9)
selenium-webdriver (2.53.4)
test-unit (3.1.5)
watir-page-helper (1.0.3)
watir-webdriver (0.9.3)
websocket (1.2.3)
yml_reader (0.7)

Same problem using Selenium Webdriver 2.53.4. Tried with Firefox 48, uninstalled that and installed Firefox 46.0.1 and problem persists. All the info I've found so far on this error dates back to much older versions of firefox and selenium. Anyone figure this one out recently?

Sadly, I solved remedied this by uninstalling ff 46.0.1 and installing ff 45 esr.
Source of solution and reason for issue: https://github.com/SeleniumHQ/selenium/issues/2559 scroll to comment by lukeis

WTF selenium dead ? this issue open from 2015,
still Unable to Obtain a Stable firefox connection in 60 seconds.

Downgrading FF to version 45 worked for me:

 sudo apt-get install firefox=45.0.2+build1-0ubuntu1

+1
firefox 49.0.1
selenium-webdriver (2.53.4)
I can't install another firefox, it's my dev. comp.

selenium-webdriver (2.53.4)
firefox 45.0

works for me.

I am also getting the same error for below configuration.

selenium-webdriver (2.53.4) 
firefox 49.0.2

Any suggestion will be helpful for me.

Thanks,
Hare

Same error with:

selenium-webdriver (2.53.4) 
firefox 50

Running into this issue as well. Looks like there's an awkward transition happening to a new driver. You can try upgrading to selenium-webdriver >= 3.0, though it looks like you'll also need to install geckodriver. You can download it from here and toss the executable somewhere in your path. Not too sure, but it looks like geckodriver may not be feature complete, yet, so if you need a stable API your best bet may be to downgrade your version of firefox instead. Looks like Firefox versions <= 47 should still work fine.

Same issue with:

selenium-webdriver-2.53.4
firefox 51.0.1 (64 bit)

Also, when I use selenium-webdriver 3.0.7 and the above version of firefox, I get the error:

Unable to find Mozilla geckodriver. Please download the server from

Unable to find Mozilla geckodriver. Please download the server from

you need to install geckodriver to use Firefox now

Unable to find Mozilla geckodriver. Please download the server from

you need to install geckodriver to use Firefox now

I should have specified that it was installed and working with selenium-webdriver 2.53.4 but selenium-webdriver 3.0.7 produced the error saying that it couldn't find it.

Is it the latest version of geckodriver? Are you sure it is on your PATH? Since you appear to be using Ruby, you can gem install webdrivers and it will manage the downloading/updating of the drivers for you.

It is indeed on my PATH, and it is the latest version.

The only thing I change about my setup is uninstalling selenium-webdriver 3.0.7 and using 2.53.4 instead.

If you switch to 2.53.4 you have to remember to pass in marionette: true when initializing the driver.

i had this error. The launch of the firefox is taking place at the VDS server
determinate problem - browser must run in a minimized mode

solution: gem 'headless'

require 'headless' # before require capybara
headless = Headless.new
headless.start

https://github.com/leonid-shevtsov/headless

Last Firefox version supported by Selenium 2.53.1 in ESR 45.
Last Firefox version supported by Selenium 3 in legacy mode is Firefox ESR 52.
If you want to run tests in newer Firefox versions you have to use Selenium 3 (3.5 at the moment) and new Firefox driver implementation (aka geckodriver).

If you get this error among other things make sure you have the right version of geckodriver compatible with your system

I update the firefox for the version of 57.0 (64-bit) and don't run. I have this problems so many times with the Firefox. So I think it's better to do with Chrome.
So I set up with Chrome on spec/support/capybara.rb
Capybara.javascript_driver = :selenium_chrome
and then was needed to install the chromedriver, So for install:
brew install chromedriver
And work's with Chrome.

I Have updated the firefox 60.1.0esr (64-bit) on centos 7.5.1. My geckodriver version is 0.21.0 linux 64
and my selenium-webdriver gem version is 3.13. and its working fine with these versions.

FIXED: Same issue while running Firefox 47.0.1 on CentOS7. selenium-webdriver-2.45. Updated selenium-webdriver to 2.53.4 and it worked.

Was this page helpful?
0 / 5 - 0 ratings