Failed to get stable firefox connection in 60 seconds (127.0.0.1:7055)

When testing the cucumber script, I get the following error when running rspec tests

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

Using ruby (1.9.2) selenium-webdriver (2.27.2) and firefox (19.0)

Using rspec-rails (2.12.1) , capybara (2.0.2) and several other gems. I also added launchy gem, but they don't seem to be a problem. And I am using Windows 7 .

+74
ruby-on-rails selenium-webdriver cucumber rspec-rails capybara
Jan 13 '13 at 11:53 on
source share
12 answers

I had the same problem (on Linux). Corrected:

 gem update selenium-webdriver 

Now I am using ruby ​​1.9.3-p286, selenium-webdriver 2.29.0, firefox 18.0 as well as rspec-rails 2.9.0, capybara 1.1.2 and capybara-webkit 0.12.1

I added selenium-webdriver 2.29.0 to my gemfile to be safe.

+87
Jan 27 '13 at 20:59
source share

Selenium Webdriver seems to be updated frequently to keep up with Firefox. But how do you know which version you need? We hope that this procedure will work even when changing versions:

  1. Go to http://www.seleniumhq.org/download/ .

  2. Scroll down to the Selenium and WebDriver client language bindings .

  3. In this section, in the Ruby language line, click Change Log ( direct link ).

  4. In the change log, determine which version of Selenium you need for your version of Firefox.

If you are using a bundler, run bundle show selenium-webdriver to see which version you have. To upgrade, for example, to 2.35.0, add this line to your Gemfile :

 gem 'selenium-webdriver', '2.35.0' 

and then run bundle update to install. If you are using Spork, be sure to restart it before running the tests again.

Updating a single https://stackoverflow.com/a/126258/117/ indicates that the change log can be updated earlier in the source code repository than on seleniumhq.org. The changelog for Ruby is here: https://github.com/SeleniumHQ/selenium/blob/master/rb/CHANGES .

Downgrading Firefox

If you need to downgrade Firefox on Ubuntu 12.04, this answer explains how to get back to Firefox 20. A more general description of the way to upgrade to any version of Firefox is given here . Then use this answer to pause Firefox updates until Selenium releases an update that works with a later version of Firefox.

In my case, I downgraded Firefox just to find that Selenium Webdriver has recently been updated to work with the latest version, so check for Selenium updates first!

+46
Aug 15 '13 at 22:47
source share
 bundle update selenium-webdriver 
+10
Jan 30 '15 at 15:32
source share

I just stumbled upon this on the CI server and found that it was due to the fact that Firefox did not use the mapping. I thought that selenium-webdriver would do the job without further intervention, but that was not the case.

Adding Xvfb to the mix made it work.

For Rails using cucumber functions:

 gem 'headless' 

then in the /support/env.rb functions

 Before do if Capybara.current_driver == :selenium require 'headless' headless = Headless.new headless.start end end 
+9
Jul 30 '15 at 15:42
source share

This error occurs when the versions of selenium and firefox are incompatible.

There are two options.

  • Update Selenium:

    gem update selenium-webdriver

    If still unsuccessful, selenium is not updated to the latest version.

  • Downgrade firefox:

    sudo apt-get purge firefox

    To view the available packages for downloading apt-cache showpkg firefox

    sudo apt-get install firefox=#older_version#

+3
Oct 10 '14 at 18:27
source share

The magic combination that worked for me was Firefox 19.0 and the selenium 2.32.1 web driver (the latter at the time of writing). Firefox 20.x and 21.x do not work. I had to downgrade Firefox. Also keep in mind that (at least on Mac OS), if you go to FireFox → About Firefox, it will automatically update to the latest version. Do not do this.

+1
May 21 '13 at 12:27
source share

If the above works now, as in my case, take a picture.

I was getting a time error on one machine and not another. Both machines are thin clients that work with the same versions of everything. So incompatible versions of firefox are excluded (the error occurred on one machine, and not on another)

It turned out that there was a problem with the port that the headless used. There was another process with this port.

Below is the problem for me:
Add the following line to the .zshenv file
export XVFB_DISPLAY='new-port-number'
then run the zsh command in terminal to set the change

+1
Aug 26 '16 at 0:58
source share

I had this problem when I ran irb from the terminal where I got access to another user. I get this error when I run irb as this user. But not if I ran as root. And not when I went back to the shell belonging to the registered user.

0
Apr 27 '13 at 14:52
source share

For me, I already updated the gems, but then I needed to update my package.

In powershell, navigate to your directory, and then update the node:

 cd D:\Projects\LazyAutomation bundle update 
0
Jan 07 '14 at 11:06
source share

for those using Vagrant, if you are logging in, letting XServer firefox run correctly, which solved it for me. tramp ssh - -X

0
Sep 26 '15 at 2:26
source share

Downgrade Firefox.

If using gem 'headless' and updating gems is already undesirable, as now, then you need to downgrade Firefox.

For Ubuntu (but other Linux distributions will be very similar) you should:

Uninstall Firefox that ships with the latest versions of Ubuntu

 sudo apt-get purge firefox 

You can complement the deletion of some related data as described here.

Now install an older version of Firefox. Version 42.0 worked for me (as our Travis.ci uses)

 $ export FIREFOX_SOURCE_URL='https://download.mozilla.org/?product=firefox-42.0&lang=en-US&os=linux64' $ wget --no-verbose -O /tmp/firefox-42.0.tar.bz2 $FIREFOX_SOURCE_URL $ tar xvC ~/. -f /tmp/firefox-42.0.tar.bz2 ln -s ~/firefox/firefox ~/bin/firefox 

Open a new terminal tab and run the cucumber / selenium specifications.

Now you can download the latest version of Firefox and create a .desktop file in /usr/share/applications/ to access it from the dock. And let Selenium find the older version by default. Take this for reference

0
04 Oct '18 at 14:23
source share

After running the ballPointPenguin sentence, I can now use watir-webdriver to extract local files or files in the local apache install htdocs directory or in files on the Internet:

 1) file:///Users/me/jquery_programs/1.htm 2) 'http://localhost:8080/my.html' 3) 'http://www.google.com' require 'watir-webdriver' browser = Watir::Browser.new :firefox browser.goto 'http://localhost:8080/my.html' 

Before updating, I received an error:

`connect_until_stable ': it is not possible to get a stable firefox connection in 60 seconds (127.0.0.1:7055) (Selenium :: WebDriver :: Error :: WebDriverError)

-3
May 17 '13 at 23:03
source share



All Articles