Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing Chrome fails (exit status 18) #33

Closed
bhb opened this issue Aug 31, 2021 · 15 comments · Fixed by #42
Closed

Installing Chrome fails (exit status 18) #33

bhb opened this issue Aug 31, 2021 · 15 comments · Fixed by #42

Comments

@bhb
Copy link

bhb commented Aug 31, 2021

Orb version

version 1.2.1

What happened

browser-tools/install-chrome (with no chrome version set, so it should be "latest")

fails with

Google Chrome is not currently installed; installing it
curl: (18) transfer closed with 72364364 bytes remaining to read

Exited with code exit status 18
CircleCI received exit code 18

e.g. https://app.circleci.com/pipelines/github/wunderteam/portal/10969/workflows/233c3e6e-65df-474d-bf2f-d2f2c07a932e/jobs/90380

This happens in roughly 75% of our builds

Expected behavior

browser-tools/install-chrome should complete without error

Workaround

I updated our config to hardcode the Chrome version, which fixed the issue:

  - browser-tools/install-chrome:
      chrome-version: "92.0.4515.159"

This seems to suggest the issue is with downloading the latest version of Chrome from https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

@jacobgavin
Copy link

We got the same issue. I tried your workaround but that doesn't work either.
I've tried all the URLs for the different chrome downloads and they all work locally, i.e. https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_92.0.4515.159-1_amd64.deb works locally in browser.

@gmemstr
Copy link

gmemstr commented Sep 1, 2021

Dupe of #34 (I suspect) so closing this issue in favour of that thread.

@gmemstr gmemstr closed this as completed Sep 1, 2021
@bhb
Copy link
Author

bhb commented Sep 1, 2021

@gmemstr FWIW, I believe this is a distinct issue. This issue appeared yesterday and we applied the workaround which worked for around 24 hours. Now we are seeing issue #34 on every build.

@bhb
Copy link
Author

bhb commented Sep 1, 2021

@FelicianoTech FelicianoTech reopened this Sep 1, 2021
brenetic added a commit to ministryofjustice/fb-editor that referenced this issue Sep 2, 2021
Swap to install all the browser tools as `install-chrome` by itself is
broken.

There is an open PR to resolve this issue. In the meantime just install
all the things.

CircleCI-Public/browser-tools-orb#33
brenetic added a commit to ministryofjustice/fb-editor that referenced this issue Sep 2, 2021
Swap to install all the browser tools as `install-chrome` by itself is
broken.

There is an open PR to resolve this issue. In the meantime just install
all the things.

CircleCI-Public/browser-tools-orb#33
brenetic added a commit to ministryofjustice/fb-runner that referenced this issue Sep 2, 2021
Swap to install all the browser tools as install-chrome by itself is
broken.

There is an open PR to resolve this issue. In the meantime just install
all the things.

CircleCI-Public/browser-tools-orb#33
brenetic added a commit to ministryofjustice/fb-metadata-api that referenced this issue Sep 2, 2021
Swap to install all the browser tools as install-chrome by itself is
broken.

There is an open PR to resolve this issue. In the meantime just install
all the things.

CircleCI-Public/browser-tools-orb#33

Also remove setting the ACCEPTANCE_TESTS_EDITOR_APP and CI_MODE environment
variables in their own step as they are set inside the command below.
brenetic added a commit to ministryofjustice/fb-runner that referenced this issue Sep 2, 2021
Swap to install all the browser tools as install-chrome by itself is
broken.

There is an open PR to resolve this issue. In the meantime just install
all the things.

CircleCI-Public/browser-tools-orb#33
@bhb
Copy link
Author

bhb commented Sep 3, 2021

Update: I tried again today and it seems fine now, so this may be resolved?

@bhb
Copy link
Author

bhb commented Feb 24, 2022

I've seen this error 3 times in the last few hours.

@bhb
Copy link
Author

bhb commented Mar 15, 2022

We continue to see this failure regularly.

@bhb
Copy link
Author

bhb commented Mar 21, 2022

We've seen this fail more than ten times across many different jobs, and it's currently blocking our ability to deploy (since we use CircleCI for continuous deployment).

Is it possible to set a higher number of retries, or add a setting to cache the downloads for some period of time?

@tetienne
Copy link

I can confirm, we face this issue a lot since yesterday.

@danrice92
Copy link

danrice92 commented Mar 22, 2022

I had this issue too.

Workaround for now was to specify the Chrome version:

- browser-tools/install-chrome:
    chrome-version: 85.0.4183.102

I used the version in the orb docs

@kreintjes
Copy link

kreintjes commented Mar 23, 2022

Same issue over here. Strangely enough for now we only see it fail in one of our projects, but not in another project which uses the same browser-tools version and similar configuration (but maybe it will start failing there soon as well).

I will try the specific Chrome version work around (thanks everybody), but a proper fix in this orb for installing the latest Chrome version would be great!
Btw is this a community project or developed/maintained by the CircleCI team?

@ramonpm
Copy link

ramonpm commented Mar 24, 2022

Also seeing this issue very often.

@jkzilla
Copy link

jkzilla commented Mar 28, 2022

👋 the below provides the fallback to continue the download using http1.1 if the initial curl doesn’t succeed:

curl --silent --show-error --location --fail --retry 3 --output google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb > /dev/null 2>&1; then

curl --http1.1 -L -o google-chrome.deb -C - https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

fi

@FelicianoTech
Copy link
Contributor

Hey everyone. The main problem here is that Google's Server is responding in strange ways. I think partially due to a form of rate limiting. The orb has been updated, circleci/browser-tools@1.2.5, with a change that should help somewhat.

v2 of this orb is being planned with a potential new install method that will hopefully avoid this problem altogether.

@joerodrig
Copy link

joerodrig commented Apr 5, 2022

I was having this problem earlier on a workflow that ran many parallel jobs that ended up downloading Chrome in each one, and the failures were resulting in some time-consuming job re-runs if just one parallel job failed. To get around this I ended up extending the base node-browsers image CircleCI provides with the Chrome download that was included in the legacy base images, so my custom image looked like this:

FROM cimg/node:<NODE_VERSION>-browsers


RUN curl --silent --show-error --location --fail --retry 3 --output /tmp/google-chrome-stable_current_amd64.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
  && (sudo dpkg -i /tmp/google-chrome-stable_current_amd64.deb || sudo apt-get -fy install)  \
  && rm -rf /tmp/google-chrome-stable_current_amd64.deb \
  && sudo sed -i 's|HERE/chrome"|HERE/chrome" --disable-setuid-sandbox --no-sandbox|g' \
  "/opt/google/chrome/google-chrome" \
  && google-chrome --version

RUN export CHROMEDRIVER_RELEASE=$(curl --location --fail --retry 3 http://chromedriver.storage.googleapis.com/LATEST_RELEASE) \
  && curl --silent --show-error --location --fail --retry 3 --output /tmp/chromedriver_linux64.zip "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_RELEASE/chromedriver_linux64.zip" \
  && cd /tmp \
  && unzip chromedriver_linux64.zip \
  && rm -rf chromedriver_linux64.zip \
  && sudo mv chromedriver /usr/local/bin/chromedriver \
  && sudo chmod +x /usr/local/bin/chromedriver \
  && chromedriver --version

This seems to have resolved the issue since now Chrome is only downloaded when a new image is created, which is happening outside of CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants