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

An unexpected error occurred while verifying the Cypress executable. #29884

Open
svankireddy-mdsol opened this issue Jul 17, 2024 · 4 comments
Open

Comments

@svankireddy-mdsol
Copy link

Current behavior

Failing to run github actions and verifying cypress fails

Desired behavior

Image used:
image: cypress/browsers:node18.12.0-chrome106-ff106
It wil allow to execute: Run npx cypress info without any issues

Test code to reproduce

Github actions:

Image used:
image: cypress/browsers:node18.12.0-chrome106-ff106

  • name: Cypress info
  • run: npx cypress info

Cypress Version

12.17.4

Node version

18.12.0

Operating System

linux-x64 (Debian - [11])

Debug Logs

An unexpected error occurred while verifying the Cypress executable.
Please search Cypress documentation for possible solutions:
https://on.cypress.io/
Check if there is a GitHub issue describing this crash:
https://github.com/cypress-io/cypress/issues
Consider opening a new issue.
----------
Error: spawn /github/home/.cache/Cypress/12.17.4/Cypress/Cypress ENOENT
----------
Platform: linux-x64 (Debian - [11])
Cypress Version: 12.17.4
Error: Process completed with exit code 1.

Other

NA

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Jul 18, 2024

@svankireddy-mdsol

The Cypress Docker image cypress/browsers:node18.12.0-chrome106-ff106 you are using was published in November 2022. To use this image in GitHub Actions make sure that you run it with user 1001. This is recommended for all Cypress Docker images.

    container:
      image: cypress/browsers:node18.12.0-chrome106-ff106
      options: --user 1001

You can find an example workflow on .github/workflows/example-cypress-github-action.yml in the Cypress Docker image repository.

You may also want to consider updating to an equivalent current image, such as

cypress/browsers:node-18.20.3-chrome-125.0.6422.141-1-ff-126.0.1-edge-125.0.2535.85-1

which was published in June 2024. Older images are frozen and corrections are made by publishing a newer image.

If the above does not solve your issue, then please post your full GitHub Actions workflow.

@MikeMcC399
Copy link
Contributor

The original Docker file was
https://github.com/cypress-io/cypress-docker-images/blob/b70e17873b70eebb9e67cd3faf7312b12ad5225d/browsers/node18.12.0-chrome106-ff106/Dockerfile

Current builds use
https://github.com/cypress-io/cypress-docker-images/blob/master/factory/factory.Dockerfile
which relaxes the permissions to chmod 777 /root

We've added the documentation section https://github.com/cypress-io/cypress-docker-images/blob/master/README.md#user to make it clear about the need to set --user 1001 for GitHub Actions.

@MikeMcC399
Copy link
Contributor

@svankireddy-mdsol

Did the previous comments help resolve your issue?

@svankireddy-mdsol
Copy link
Author

yes it worked but having issues with curl command - I just need to install curl

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

No branches or pull requests

2 participants