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

Fix script for installing specific Chrome version with APT #92

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Baplar
Copy link

@Baplar Baplar commented Aug 30, 2023

Description

Fix script for installing specific Chrome version with APT

Checklist

  • [N/A] All new jobs, commands, executors, parameters have descriptions
  • [N/A] Examples have been added for any significant new features
  • [N/A] README has been updated, if necessary

Motivation, issues

When installing a specific version of Chrome on a Debian-based distro, the APT repositories were not refreshed by running apt-get update beforehand, leading to the install process failing due to unresolvable dependencies:

Google Chrome is not currently installed; installing it
Preparing Chrome installation for Debian-based systems
2023-08-30 11:21:36 URL:https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_116.0.5845.96-1_amd64.deb [96765132/96765132] -> "/tmp/chrome.deb" [1]
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'google-chrome-stable' instead of '/tmp/chrome.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 google-chrome-stable : Depends: fonts-liberation but it is not installable
                        Depends: libasound2 (>= 1.0.17) but it is not installable
                        Depends: libatk-bridge2.0-0 (>= 2.5.3) but it is not installable
                        Depends: libatk1.0-0 (>= 2.2.0) but it is not installable
                        Depends: libatspi2.0-0 (>= 2.9.90) but it is not installable
                        Depends: libcairo2 (>= 1.6.0) but it is not installable
                        Depends: libcups2 (>= 1.6.0) but it is not installable
                        Depends: libdrm2 (>= 2.4.75) but it is not installable
                        Depends: libgbm1 (>= 17.1.0~rc2) but it is not installable
                        Depends: libgtk-3-0 (>= 3.9.10) but it is not installable or
                                 libgtk-4-1 but it is not installable
                        Depends: libnspr4 (>= 2:4.9-2~) but it is not installable
                        Depends: libnss3 (>= 2:3.35) but it is not installable
                        Depends: libpango-1.0-0 (>= 1.14.0) but it is not installable
                        Depends: libu2f-udev but it is not installable
                        Depends: libvulkan1 but it is not installable
                        Depends: libxcomposite1 (>= 1:0.4.4-1) but it is not installable
                        Depends: libxdamage1 (>= 1:1.1) but it is not installable
                        Depends: libxfixes3 but it is not installable
                        Depends: libxkbcommon0 (>= 0.5.0) but it is not installable
                        Depends: libxrandr2 but it is not installable
                        Depends: xdg-utils (>= 1.0.2) but it is not installable
E: Unable to correct problems, you have held broken packages.
/bin/bash: line 129: google-chrome-stable: command not found
Google Chrome v116.0.5845.96 (stable) failed to install.

Exited with code exit status 1

Adding this update command before the install command fixes the issue.

Workaround

On an affected job, adding a step to run apt-get update before the install-chrome step fixes the resolution issue, as we manually perform the repository update before the script is run.

In other words, in the current version, this fails:

steps:
  - browser-tools/install-chrome:
      chrome-version: 116.0.5845.96

But this works:

steps:
  - run: sudo apt-get update
  - browser-tools/install-chrome:
      chrome-version: 116.0.5845.96

When installing a specific version of Chrome on a Debian-based distro, the APT repositories were not refreshed by running `apt-get update` beforehand, leading to the install process failing due to unresolvable dependencies. Adding this update command before the install command fixes the issue.
@Baplar Baplar requested a review from a team as a code owner August 30, 2023 11:47
@Baplar
Copy link
Author

Baplar commented Aug 30, 2023

Apparently I just re-discovered an already known workaround mentioned in an existing issue: #90 (comment)

zh added a commit to agileware-jp/redmine-plugin-orb that referenced this pull request Aug 31, 2023
Problem: agileware-jp/lychee_limits#40 - rspec tests failing with PostgreSQL

More information for the fix: CircleCI-Public/browser-tools-orb#92
@bondar
Copy link

bondar commented Nov 2, 2023

Had to switch to chrome v118 because of a bug found in v119 (released yesterday) and got

Google Chrome is not currently installed; installing it
Preparing Chrome installation for Debian-based systems
2023-11-01 19:25:09 URL:https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_118.0.5993.117-1_amd64.deb [104057764/104057764] -> "/tmp/chrome.deb" [1]
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'google-chrome-stable' instead of '/tmp/chrome.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 google-chrome-stable : Depends: libu2f-udev but it is not installable
E: Unable to correct problems, you have held broken packages.
/bin/bash: line 129: google-chrome-stable: command not found
Google Chrome v118.0.5993.117 (stable) failed to install.

Exited with code exit status 1

Workaround helped.

@FGoessler
Copy link

Had to switch to chrome v118 because of a bug found in v119 (released yesterday) and got

@bondar is the bug you found in Chrome 119 documented somewhere? We are also having issues with it - see #99

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 this pull request may close these issues.

None yet

3 participants