Update Chrome in container image

container-image

#1

Hi folks

The version of Chrome bundled is quite old, (43), when the newest version is 47. Is it possible to upgrade this with the next build env update?


Installing the Latest Version of Firefox in CircleCI
#2

@kimh what do you think?


#3

@danielcompton Sure, we can update Chrome in the future container image release. We’ll try do this as soon as we can!


#4

@danielcompton

Actually, I could just upload the latest chrome so that you don’t have to wait for our container image release. Please try the following circle.yml.

dependencies:
  override:
    - curl -L -o google-chrome.deb https://s3.amazonaws.com/circle-downloads/google-chrome-stable_current_amd64_47.0.2526.73-1.deb
    - sudo dpkg -i google-chrome.deb
    - sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome
    - rm google-chrome.deb

Here is a working demo: https://circleci.com/gh/kimh/circleci-playground/12


Using the latest version of Chrome on CircleCI
Apt-get update fails
#5

FYI, this works great, but you should use pre: instead of override:, to avoid blowing away any default automatic behavior of the dependencies: step.


#6

@kimh My build https://circleci.com/gh/jhuntoo/angular2-webpack-starter/54 is failing because it expects a modern version of chrome.

It was working until just a day ago, with - sudo apt-get update && sudo apt-get install --only-upgrade google-chrome-stable

However now it doesnt work, I’ve noticed this container tweak

Applying container tweaks
$ echo ‘UseRoaming no’ >> /home/ubuntu/.ssh/config; chown ubuntu:ubuntu /home/ubuntu/.ssh/config; rm -f /etc/apt/sources.list.d/{google.list,google-chrome.list}

Is this intentional ? What is the official method for getting a specific of latest version of chrome ?


#7

I was running into the same problem as you: I was just able to resolve it with this config:

dependencies:
pre:
- google-chrome --version
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
- sudo sh -c ‘echo “deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main” >> /etc/apt/sources.list.d/google.list’
- sudo apt-get update
- sudo apt-get --only-upgrade install google-chrome-stable
- google-chrome --version


#9

This also caused us a problem but the @robertfmurdock answer resolved it


#10

Thanks! I found a similar workaround in the end but I’ll compare it with this one.


#11

The workaround that @robertfmurdock posted was working yesterday. However this morning I am now running into the following error:

Err http://dl.google.com/linux/chrome/deb/ stable/main google-chrome-stable amd64 49.0.2623.110-1
  404  Not Found [IP: 74.125.22.190 80]

Failed to fetch http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_49.0.2623.110-1_amd64.deb  404  Not Found [IP: 74.125.22.190 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

sudo apt-get --only-upgrade install google-chrome-stable returned exit code 100

Action failed: sudo apt-get --only-upgrade install google-chrome-stable

Is anyone else seeing this?

edit It looks like the stable version is not available atm.


#12

Hi There,

Can we get an update as to when Chrome & chromedriver will be updated in the container image? Having to download & install a version of this every time will cause our tests to take longer.

Thank you.


#13

I’m facing the same problem. Our team is about to use ES2015 but because of the old Chrome version, our tests always fail and the workarounds above didn’t work for us. (We are using Karma + Jasmine)

We’d be very happy if we could use the latest Chrome without any command all the time.


#14

We were facing the same issue with the recent update of Chrome.
I just created a repo and a bash script to automatically use the latest stable version. Feel free to use it

Jeremy


#15

I believe this to be fixed per the last image release and I am marking it as so.
If anyone is still having an issue, please let us know!


#16

I’m still facing this issue. My build reports “Chrome version must be >= 55.0.2883.0”.


#17

Using Ubuntu 14.04 (Trusty) in the CircleCI’s OS setting (Settings > Build Environment), the following worked for me:

dependencies:
  pre:
    - curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    - sudo dpkg -i google-chrome.deb
    - sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome
    - rm google-chrome.deb

As provided here: https://gist.github.com/Arjeno/8564d9643f16d072a85b9c9b5a9f7de0


#18