cypress-io / cypress-example-kitchensink

This is an example app used to showcase Cypress.io testing.

Home Page:https://example.cypress.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CircleCI checksum failure installing GoogleChrome in Windows with Chocolatey

MikeMcC399 opened this issue · comments

Current situation

Attempting to install Google Chrome in a CircleCI Windows environment intermittently reports a checksum error when executing

choco install googlechrome

See https://app.circleci.com/pipelines/github/cypress-io/cypress-example-kitchensink/1569/workflows/15ec9f9a-c466-45f0-ad35-4cbebd7ac881/jobs/10698

The failure is in the CircleCI job win-test-chrome.

# install Chrome browser on Windows machine using Chocolatey
# https://chocolatey.org/packages/GoogleChrome
- run: choco install googlechrome

#!bash.exe
choco install googlechrome
Chocolatey v1.1.0
Installing the following packages:
googlechrome
By installing, you accept licenses for the packages.
Progress: Downloading GoogleChrome 115.0.5790.99... 100%

GoogleChrome v115.0.5790.99 [Approved]
googlechrome package files install completed. Performing other installation steps.
Downloading googlechrome 64 bit
  from 'https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise64.msi'
Progress: 100% - Completed download of C:\Users\circleci\AppData\Local\Temp\chocolatey\GoogleChrome\115.0.5790.99\googlechromestandaloneenterprise64.msi (94.4 MB).
Download of googlechromestandaloneenterprise64.msi (94.4 MB) completed.
Error - hashes do not match. Actual value was '3E8C24F18EF619A8D5A9D745EBCCA044C33772E32B67FD2C05608071A1D54DFC'.
ERROR: Checksum for 'C:\Users\circleci\AppData\Local\Temp\chocolatey\GoogleChrome\115.0.5790.99\googlechromestandaloneenterprise64.msi' did not meet '3769c7f1779f7c34489e44ac722ba5c0f90e8371be467179116f9c5838e642f3' for checksum type 'sha256'. Consider passing the actual checksums through with --checksum --checksum64 once you validate the checksums are appropriate. A less secure option is to pass --ignore-checksums if necessary.
The install of googlechrome was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\GoogleChrome\tools\chocolateyInstall.ps1'.
 See log for details.

Chocolatey installed 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - googlechrome (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\GoogleChrome\tools\chocolateyInstall.ps1'.
 See log for details.

Exited with code exit status 127
CircleCI received exit code 127

Expected

Windows jobs in CircleCI should not fail due to a checksum error installing Google Chrome.

Notes

https://community.chocolatey.org/packages/GoogleChrome says

This package always installs the latest version of Google Chrome, regardless of the version specified in the package. Google does not officially offer older versions of Chrome for download. Because of this you may get checksum mismatch between the time Google releases a new installer, and the package is automatically updated.

Chrome for Testing: reliable downloads for browser automation announced Chrome for Testing on June 12, 2023

CircleCI > browser-tools-orb does not list Windows as a supported environment for install-chrome

install-chrome
Install Google's Chrome browser, for use in browser testing. Note: only the latest stable release can be installed, as Google does not maintain a public archive of previous releases. Supports Debian/Ubuntu Linux, Alpine Linux (via Chromium), and macOS environments.

Suggestion

Install with --ignore-checksums.

Look for better alternatives to chocolatey installation.

The current checksum issue is due to the pending version https://community.chocolatey.org/packages/GoogleChrome/115.0.5790.102

image

  • This issue has been resolved through PR #735 which implemented the suggestion from this issue, using

--ignore-checksums

# install Chrome browser on Windows machine using Chocolatey
# https://chocolatey.org/packages/GoogleChrome
- run: choco install googlechrome --ignore-checksums