Installing the Latest Version of Firefox in CircleCI

known-issue
firefox

#1

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:

dependencies: 
    override: 
      - sudo apt-get update && sudo apt-get install libpango1.0-0 && sudo apt-get install firefox 

#2

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:

dependencies:
  pre:
    # get Firefox Release (43.0b5)
    - mkdir ../ff-release
    - wget -O ff-release.tar.bz2 'https://archive.mozilla.org/pub/firefox/releases/43.0b5/linux-x86_64/en-US/firefox-43.0b5.tar.bz2' && tar xjf ff-release.tar.bz2:
        pwd: ../ff-release
    # get Firefox Beta
    - mkdir ../ff-beta
    - wget -O ff-beta.tar.bz2 'https://download.mozilla.org/?product=firefox-beta-latest&os=linux64&lang=en-US' && tar xjf ff-beta.tar.bz2:
        pwd: ../ff-beta
    # get Firefox Nightly
    - mkdir ../ff-nightly
    - wget -O ff-nightly.tar.bz2 'https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/firefox-45.0a1.en-US.linux-x86_64.tar.bz2' && tar xjf ff-nightly.tar.bz2:
        pwd: ../ff-nightly

#3

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


#4

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.


Using Qt 5 with CircleCI
#5

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


#6

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


#7

Any chances of just having Firefox upgraded to 45?


#8

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.


#9

Yes this seems like the best solution. :slight_smile:

@kimh can we do this on Trusty?


#10

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


#11

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


#12

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!


#13

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


#14

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

#15

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.


#16

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

#17

#18

#19

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