Closed sean-hill closed 1 year ago
Same here, happens every few weeks 🤷♂️
I'm so done with Cypress.
I've pinned both the ubuntu versions and the actions version. Nada.
I see different caches in the logs. I may need to try specifying a custom cache key https://github.com/cypress-io/github-action#custom-cache-key
/opt/hostedtoolcache/node/14.20.0/x64/bin/npx cypress cache list
vs
/opt/hostedtoolcache/node/14.20.1/x64/bin/npx cypress cache list
Edit: setting cache-key does not help.
This has started happening for us on our repo as well: https://github.com/keycloak/keycloak-ui
@openam cache-key
has nothing to do with this I think. That is the key used to cache dependencies.
Hello! We are experiencing the same issue with parallel Cypress tests in our GitHub CI. It has already happened a few times in the past, but it was rare. Since the start of the week, it happens a lot, and more than half of our test job fails. We also seem to see a different version of Chrome over the different job runs (Chrome 105 & Chrome 106).
@bahmutov Has informed me, that even when pinning Ubuntu versions, GitHub will upgrade the browser and Cypress will complain. The advice is that it is best to use a cypress docker container in order to pin the browser version.
Yeah, I figured that would be the reason why. I guess this is not a bug on the side of the action, but perhaps a better error message could be shown to point users to this solution.
One could also maybe control how exactly the browser versions are matched? I doubt that chrome update X.Y.Z.101 to X.Y.Z.105 would matter much
Sent from my iPhone
On Oct 5, 2022, at 18:12, Jon Koops @.***> wrote:
Yeah, I figured that would be the reason why. I guess this is not a bug on the side if the action, but perhaps a better error message could be shown to point users to this solution.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
My main problem with the error message is that I'd like to see what the actual difference is between the environment parameters. It would make it a lot easier to identify the exact parameter that causes the issue.
Any updates on this? It happens for us almost monthly and seems to be whenever chrome updates! I agree that the check against browser matching for environments could be configured to solve for this issue and be less strict
i'm trying to use https://github.com/marketplace/actions/setup-chrome to setup a chrome version - but seems like the cypress-io/github-action@v4
action is picking up a different version.
is there anyway to set the chrome binary to cypress-io action?
Have got this working with setup-chrome after finding this comment https://github.com/cypress-io/github-action/issues/518#issuecomment-1210979047
As we use a custom command, had to specify --browser ${{ env. BROWSER_PATH }}
in that command
thanks @beamery-tomht it works well!
Been happening all day today so far.
@chinanderm
Been happening all day today so far.
Do you have some more config info?
@MikeMcC399 We run our tests parallelized across four instances. Ran on GitHub actions without Docker container as it has given us issues in the past with our monorepo setup.
This seems to happen every few months or so. Likely due to us not specifying a Chrome version. New releases going out and the various machines this runs on haven't all been updated?
Here is the relevant parts of the workflow .yml setup:
ui-chrome-tests:
runs-on: ubuntu-latest
needs: install
strategy:
fail-fast: false
matrix:
# run copies of the current job in parallel
containers: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Download the build folders
uses: actions/download-artifact@v3
with:
name: build
path: path/to/app/build
# Install parent package.json run dependencies
- run: npm install
- name: Cypress run
uses: cypress-io/github-action@v4
with:
# we have already installed all dependencies above
install: false
start: npm run start:test
working-directory: path/to/app
wait-on: http://localhost:3000
browser: chrome
record: true
parallel: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
Error results:
You passed the --parallel flag, but we do not parallelize tests across different environments.
This machine is sending different environment parameters than the first machine that started this parallel run.
The existing run is: https://cloud.cypress.io/projects/th3fzw/runs
In order to run in parallel mode each machine must send identical environment parameters such as:
- specs
- osName
- osVersion
- browserName
- browserVersion (major)
This machine sent the following parameters:
{
"osName": "linux",
"osVersion": "Ubuntu - ",
"browserName": "Chrome",
"browserVersion": "111.0.5563.146.... (Expected: 112)",
"specs": [
...
]
}
This is GitHub actions rolling new virtual machines with updates chrome browser. It takes time so some containers get version X, others X+1Sent from my iPhoneOn Apr 12, 2023, at 12:15, Matt Chinander @.***> wrote: @MikeMcC399 We run our tests parallelized across four instances. Ran on GitHub actions without Docker container as it has given us issues in the past with our monorepo setup. This seems to happen every few months or so. Likely due to us not specifying a Chrome version. New releases going out and the various machines this runs on haven't all been updated?
GitHub runner OS: ubuntu Self-hosted runner: No Docker container, if used: Not used Browser: Chrome Cypress version: 12.2.0 github-action version: @.***
Here is the relevant parts of the workflow .yml setup: ui-chrome-tests: runs-on: ubuntu-latest needs: install strategy: fail-fast: false matrix:
containers: [1, 2, 3, 4]
steps:
- uses: ***@***.***
- uses: ***@***.***
with:
node-version: 16
- name: Download the build folders
uses: ***@***.***
with:
name: build
path: path/to/app/build
# Install parent package.json run dependencies
- run: npm install
- name: Cypress run
uses: ***@***.***
with:
# we have already installed all dependencies above
install: false
start: npm run start:test
working-directory: path/to/app
wait-on: http://localhost:3000
browser: chrome
record: true
parallel: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
Error results: You passed the --parallel flag, but we do not parallelize tests across different environments.
This machine is sending different environment parameters than the first machine that started this parallel run.
The existing run is: https://cloud.cypress.io/projects/th3fzw/runs
In order to run in parallel mode each machine must send identical environment parameters such as:
This machine sent the following parameters:
{ "osName": "linux", "osVersion": "Ubuntu - ", "browserName": "Chrome", "browserVersion": "111.0.5563.146.... (Expected: 112)", "specs": [ ... ] }
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
@chinanderm
Thanks for your details! That ties in with the current ubuntu-22.04 rollout according to https://github.com/actions/runner-images
Image version | Chrome version |
---|---|
20230409.1 | 112.0.5615.49 |
20230402.1 | 111.0.5563.146 |
so currently GitHub is 79% on Chrome 111
and 21% on Chrome 112
.
It seems the only workaround right now is to use a Docker container which ties to a specific version of Chrome.
This isn't something which can be solved by the github-action
.
Perhaps there is scope here for a feature request to Cypress Cloud to allow adjacent major versions like 111
and 112
to be accepted? I don't know if that is technically feasible however. It seems like a reasonable request, since runs-on:
is just specifying ubuntu-latest
with no control about the exact Chrome version which GitHub is providing.
This is not something that can be controlled by the github-action. I am going to close this issue.
@chinanderm
strategy:
fail-fast: false
matrix:
# run copies of the current job in parallel
containers: [1, 2, 3, 4]
If I were a productive and impacted user, I would consider submitting a concrete issue in https://github.com/actions/runner/issues, however I am only an observer (and I couldn't reproduce the issue) so I restricted myself to opening a discussion item (see above).
--browser chrome
, however I am consistently getting the old ubuntu-22.04
image Version: 20230402.1
, so I couldn't reproduce it. There is no transparency to the staged rollout apart from the percentage completion, so I don't know when I might be able to reproduce the issue during the rollout.@bahmutov
This is GitHub actions rolling new virtual machines with updates chrome browser. It takes time so some containers get version X, others X+1
Thanks for your confirmation about the root cause. Do you know if this has ever been discussed with GitHub? Are they able to stop it happening?
Hehehe they won’t stop rolling new versions. It is up to cypress to not freak out when chrome updates from 111 to 112 as if it is the end of the world Sent from my iPhoneOn Apr 13, 2023, at 06:58, Mike McCready @.***> wrote: @bahmutov
This is GitHub actions rolling new virtual machines with updates chrome browser. It takes time so some containers get version X, others X+1
Thanks for your confirmation about the root cause. Do you know if this has ever been discussed with GitHub? Are they able to stop it happening?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
@bahmutov
Do you know if this has ever been discussed with GitHub? Are they able to stop it happening?
Hehehe they won’t stop rolling new versions. It is up to cypress to not freak out when chrome updates from 111 to 112 as if it is the end of the world
I meant to ask if it had been discussed for GitHub not to use different image versions in the same job and same matrix, despite a rollout being in progress. I was not suggesting that GitHub stop rolling out new versions. I was just suggesting that they might control the image usage better during a rollout.
I don’t think it was ever discussed. Sent from my iPhoneOn Apr 13, 2023, at 07:44, Mike McCready @.***> wrote: @bahmutov
Do you know if this has ever been discussed with GitHub? Are they able to stop it happening?
Hehehe they won’t stop rolling new versions. It is up to cypress to not freak out when chrome updates from 111 to 112 as if it is the end of the world
I meant to ask if it had been discussed for GitHub not to use different image versions in the same job and same matrix, despite a rollout being in progress. I was not suggesting that GitHub stop rolling out new versions. I was just suggesting that they might control the image usage better during a rollout.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
@MikeMcC399 Thanks for trying to bring up the issue with Github.
We are currently seeing failures due to this exact issue. Instead of asking everyone who uses --parallel with GH Actions to set up the Chrome version manually through additional actions or docker containers, could we not just have a simple setting for Cypress to specify how many major versions of drift we are ready to accept. Or a way to temporarily disable the check while the rollout is going on.
Am I understanding correctly from this that if I want to use one of Cypress's official Docker images here: https://github.com/cypress-io/cypress-docker-images/tree/master/browsers I am limited to Chrome 107 as the latest version?
@sgronblo
Am I understanding correctly from this that if I want to use one of Cypress's official Docker images here: https://github.com/cypress-io/cypress-docker-images/tree/master/browsers I am limited to Chrome 107 as the latest version?
The list you refer to is incomplete. See https://hub.docker.com/r/cypress/browsers/tags/ instead. (The current latest Chrome version available in the Docker images in this category is 113.)
@sgronblo
We are currently seeing failures due to this exact issue. Instead of asking everyone who uses --parallel with GH Actions to set up the Chrome version manually through additional actions or docker containers, could we not just have a simple setting for Cypress to specify how many major versions of drift we are ready to accept. Or a way to temporarily disable the check while the rollout is going on.
github-action
can do anything about. Any solution needs to come from GitHub and/or the core Cypress product.
Hey there! I'm receiving this error just recently in my Github Actions that run multiple tests in parallel:
I can confirm that a view of the jobs are running Chrome 105 and other Chrome 106. Here is my workflow configuration:
Is Github using different versions of chrome on their
ubuntu-latest
image? 🤔