github-action: Chrome parallel-group-params-mismatch error

We use parallelized actions with browser: chrome, it worked well until yesterday. Now sometimes (not always) we have this behavior :

A first container starts with apparently Chrome 98 :

Capture d’écran 2022-03-11 à 15 12 17

The other containers start a minute later and show us this error :

Capture d’écran 2022-03-11 à 15 12 46

It says the specs mismatch, I guess it is because of the Chrome version here being Chrome 99 ?

So only 1 container (the first starting) goes ✅ and the others fail like above ❌

The configuration of our Github Action is like this :

- name: Cypress run
              uses: cypress-io/github-action@v2
              with:
                  browser: chrome
                  build: npm run build
                  config-file: cypress/cypress-ci.json
                  group: "Chrome"
                  parallel: true
                  record: true
                  start: [our starting script]
                  wait-on: [our local url]

I don’t see a way of specifying a particular browser version with this action, am I missing something ?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 21
  • Comments: 19 (2 by maintainers)

Commits related to this issue

Most upvoted comments

I solved this problem by avoiding the browser bundled with GitHub Actions.

Basically, I install the latest version of chromium and just use that.

Here’s what that code looks like in our GitHub action.

If the Cypress team doesn’t want to update the action itself to handle this mismatch, it might make sense to provide some examples in the documentation for how to avoid this problem!

- uses: browser-actions/setup-chrome@latest
- run: |
    echo "BROWSER_PATH=$(which chrome)" >> $GITHUB_ENV

- name: Run Cypress tests 🚀
  uses: cypress-io/github-action@v4
  with:
    install: false
    record: true
    parallel: true
    browser: "${{ env.BROWSER_PATH }}"
    start: "your start command"
  env:
    CYPRESS_RECORD_KEY: ${{ secrets.recordKey }}
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }

For information the situation solved itself after a day or two but it is still happening sometimes, like today for a mismatch between Chrome 101 and Chrome 102

The GitHub runner team have written in https://github.com/actions/runner/issues/2812#issuecomment-1708710610 that there are no plans to make changes in this area in the short- or medium-term which would ensure that containers in the same job would not use mixed runner images. 🙁

The enhancement request https://github.com/orgs/community/discussions/52956 remains on the GitHub Community board for the attention of GitHub Product Management. Given that this request has already been open for five months without any Product Management feedback, I’m not hopeful for any change there.

In the meantime, as far as Cypress recording to Cypress Cloud is concerned, the recommendation continues unchanged in README: parallel to use a Docker image to ensure that fixed, consistent, browser versions are being used (see also https://github.com/cypress-io/github-action/issues/518#issuecomment-1698811340 ^^).

Please note also related issues:

and the README: parallel documentation:

During staged rollout of a new GitHub-hosted runner version, GitHub may provide a mixture of current and new image versions used by the container matrix. It is recommended to use a Docker image in the parallel job run which avoids any Cypress Cloud errors due to browser major version mismatch from the two different image versions. A Docker image is not necessary if testing against the default built-in Electron browser because this browser version is fixed by the Cypress version in use and it is unaffected by any GitHub runner image rollout.

If there is a need to follow up about the custom Chrome issue, and this can’t be resolved soon, then I suggest to open a new issue in https://github.com/cypress-io/cypress/issues as Test Replay is not part of cypress-io/github-action. It is just invoked through the action when parameters are set to record in the Cypress Cloud.

@codybrouwers I think you meant in your Bash Script

-              sleep 30
+              sleep $interval

We had the same issue this morning with our Cypress suites running on Github Actions.

As a temporary workaround, we have switched to Electron browser to unblock teams.