Installing the Latest Version of Firefox in CircleCI

The Latest version of Firefox fails to install due to missing libpango depdenencies that are not being resolved by apt. In order to install the latest version of Firefox in CircleCI you will need to add the following to your circle.yml file:

      - sudo apt-get update && sudo apt-get install libpango1.0-0 && sudo apt-get install firefox 
1 Like

To add, if you are just using firefox for testing like I am, something like this may work if you don’t need to install it:

    # get Firefox Release (43.0b5)
    - mkdir ../ff-release
    - wget -O ff-release.tar.bz2 '' && tar xjf ff-release.tar.bz2:
        pwd: ../ff-release
    # get Firefox Beta
    - mkdir ../ff-beta
    - wget -O ff-beta.tar.bz2 '' && tar xjf ff-beta.tar.bz2:
        pwd: ../ff-beta
    # get Firefox Nightly
    - mkdir ../ff-nightly
    - wget -O ff-nightly.tar.bz2 '' && tar xjf ff-nightly.tar.bz2:
        pwd: ../ff-nightly
1 Like

Is there a way to get this cached? This works, but it takes quite a bit of time on each build.

Right now we do not cache apt packages. The best way to cache this would be to download the .deb somewhere into your home folder (which can be cached) and then install it with sudo dpkg -i $PACKAGE_NAME.deb.

It’s not just the single deb, it pulls in some 15 dependencies.

Makes sense, you would need to pull those in as well. Without proper support for apt caching this is the only way for now.

Any chances of just having Firefox upgraded to 45?

Installing FF this way adds a full minute to my build process… not a big thing, but it’s a waste of Circle’s resources.

1 Like

Yes this seems like the best solution. :slight_smile:

@kimh can we do this on Trusty?

@retorquere so FF 45 and Chrome 48 works for you? I can update theses on Trusty image.

1 Like

I think that would be awesome, this would knock out this one as well Update Chrome in container image

FF 45 works (although I’ve set up things so that 38 now also works). I only test on FF as I’m building a XUL based plugin.

Much appreciated!

1 Like

If i want to install specific version of firefox i.e. 47.0.1. How can i achieve that. Any help ?

This is how Mozilla (who happen to use CricleCi) do it:

- pip install mozdownload mozinstall
- mozdownload --version latest --destination firefox.tar.bz2
- mozinstall firefox.tar.bz2

Point of note, this will install to ~/:project/firefox/firefox instead of overwriting the binary at /usr/bin/firefox so you will need to advise your test runner of the new path.

I got it to work by replacing the existing Firefox binary with a symlink:

sudo apt-get update
sudo apt-get install libpango1.0-0
sudo apt-get install firefox
sudo ln -sf /usr/lib/firefox/firefox /usr/bin/firefox

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.