-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Ensure consistent Chrome versions during CI-parallelization #25040
Comments
From @conversaShawn "Thanks for reporting Murat. The current workaround is to use a specific version as you did or use one of Cypress images: https://github.com/cypress-io/cypress-docker-images/tree/master/browsers |
Would ideally like to avoid the current workaround as it adds additional overhead to our job duration. It would be great if |
Since Chrome 111 was just released, I am encountering this error again. I also agree that I'd rather have If the solution is manually downloading a pinned image, which would add significant time to CI, I'd much rather turn off parallelization and save money on Cypress Cloud. What I want to say: This bug is actively hurting your paid product and making it partially useless. |
We are also see this problem. Especially since default versions of browsers on Github runners are not under our control, it would be great if via configurability we could say certain parameters are no of concern. |
We’re also running into this and don’t want to add significant time to our CI and don’t see a viable workaround. Is there one? Maybe one option for the cypress team is to add a flag (or just always) to change the behavior to warn on browser version differences. The warning can be close to the test errors, so that if browser versions cause test failures it can be apparent why. |
@AyrA: Funny enough, automatic updating (which could cause test errors) isn't even the issue here — it's only when they are out of sync because some workers auto-updated and others didn't. So most users wouldn't even want to be warned about version mismatched. If a new version actually causes a test failure, you are dealing with a whole different can of worms. |
What’s the reason to not attempt running the tests when the versions are out of sync? It’s not clear why not trying to run the tests when one is on Chrome 110 and one is one Chrome 111 |
In the end we decided to switch our tests to run on electron for the short term just to unblock the team from merging PR's. This worked fine and didn't slow down our pipeline. We're thinking of switching back to Chrome after a couple days. The cypress team should find a real solution to this or else we're stilling going to be getting the same problem once v112 comes out. |
Chrome 112 is out, and it is happening again. Very disappointed about the radio silence because this will cause us a lot of hassle again, and parallelization is the only reason we are paying for Cypress. If this keeps breaking every few weeks, we'd rather switch to the free version and turn off parallelization. I want to point out this is a core feature of the paid product, and it reliably breaks once a month for like a week. |
Adding one of the Docker lists the available containers on https://hub.docker.com/r/cypress/browsers/tags The GitHub Action CI documentation for Parallelization shows the use of a Docker container, although the current example One example would be:
otherwise there are newer images which have Chrome, Firefox and Edge included. Edit: GitHub Actions product feedback added in https://github.com/orgs/community/discussions/52956. |
cypress-io/github-action > README > Parallel now contains the specific advice: "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." |
Cypress documentation GitHub runners are currently preparing to update from Google Chrome GitHub product management didn't respond so far to https://github.com/orgs/community/discussions/52956 |
The workaround of using a Cypress Docker image is only available for Ubuntu / Linux on GitHub. These are the only operating systems supported as containers on GitHub. Windows and macOS are not supported. See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontainer |
|
Our app requires MacOS and bare metal GPU access, so the docker images are not helpful here. What compounds the issue is Chrome's rolling updates, and how they don't really support disabling auto updates (the recommended Keystone plist updates seem to be no longer supported). Can the check for browserVersion at least be made configurable? |
Don't know why i don't see it highlighted here, but this workaround has worked for me @nick-fields |
I'm hitting this error now and it just seems so strange. Cypress has intentionally added a conditional that crashes some workers during a run, which breaks builds... but why? Has anyone received an explanation for why this is the case? I'm fine with Chrome being different between different workers on the same runs. This effectively breaks the parallel test runs that we pay for with Cypress, doesn't it? Am I missing something? I believe any workaround for this requires us to manually manage Chrome versions, monitoring Chrome updates and changing a version number manually, and/or additional CI minutes to install versions. Is there one that doesn't cost me CI time and doesn't require us to add yet another version of something to manage and upgrade over time? |
The logic errors when there is a difference in MAJOR browser version between two specs within the same parallelized run. A core component of testing and getting reliable results is ensuring a stable environment in which all of the tests are run. If one specfile runs in Chrome 119 and one runs in Chrome 120, you may get mixed results due to the vast amount of changes that Chrome makes in major updates. We encountered this ourselves - our own internal tests at Cypress began failing with a Chrome update when they changed their behavior around http to https upgrades. You would end up with mixed results in this situation. I would encourage you to look towards solutions that maintain a stable browser version to run your tests within - using our provided docker-images or other solutions that ensure browsers don't auto-update in the middle of runs. We'll leave this issue open for future consideration, but to accomplish this would be Cypress providing our own browsers and a versioning system which we spent some time investigating but is a lot of work to implement. |
Thanks for the response, @jennifer-shehane. I understand that upgrades like that may cause inconsistencies in results -- and I'm happy to take on the responsibility for that. I'd rather it over Cypress failing my test suite entirely, or having to manage Chrome versions manually. Why doesn't Cypress give me an option to "enable browser inconsistencies" or something? Opt-in, with a clear warning, and just disable this one check. |
I have a situation on Github CI in which I install the browser via:
which installed the same chrome version on all 8 of 8 parallel jobs
then set the browser via
using the ubuntu 24 runner
and cypress parallel failed me, with a list of browsers of
and error
so, it sounds quite dumb that cypress is looking up the major version in a way that's not related to the specified |
According to the GitHub Runners dashboard there is currently no active deployment for the beta runner Ubuntu 24.04 so you have hit a different issue from the one described by the original post here. The beta version Ubuntu 24.04 is currently deployed with
You write that you added Chrome Your error is:
This would need investigation to find out whether the problem is coming from Cypress, Cypress Cloud or Chrome |
Current behavior
Here's a very ambiguous CI issue during parallelization
It happens because Chrome rolls out varying versions , and if the parallelized CI machines do not match versions, you get the error.
Sporadic issue. It's the first time I saw it externally.
https://github.com/muratkeremozcan/tour-of-heroes-react-cypress-ts/actions/runs/3642676076/jobs/6150068190
To work around it, we have to ensure the same Chrome version in all CI machines
muratkeremozcan/tour-of-heroes-react-cypress-ts@f0d37f6
This adds CI minutes. It would be ideal if Cypress had a solution to it for parallelization.
Desired behavior
It would be ideal if Cypress Cloud, or the GHA handled parallelization and ensuring consistent Chrome versions between CI machines
Test code to reproduce
See links in description. You will not reproduce this one with code. It will happen sporadically the more parallel CI machines you have.
Cypress Version
12.0.1
Node version
lts - whatever Cypress GHA uses
Operating System
CI - ubuntu
Debug Logs
Other
No response
The text was updated successfully, but these errors were encountered: