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

Cypress verify fails with permission error for Github Actions on Linux #19981

Closed
mel-OR opened this issue Jan 31, 2022 · 7 comments
Closed

Cypress verify fails with permission error for Github Actions on Linux #19981

mel-OR opened this issue Jan 31, 2022 · 7 comments
Labels
CI General issues involving running in a CI provider stale no activity on this issue for a long period

Comments

@mel-OR
Copy link

mel-OR commented Jan 31, 2022

Current behavior

When running our Github action, the job fails on the cypress verify step:

/usr/local/bin/npx cypress cache list
┌─────────┬──────────────┐
│ version │ last used    │
├─────────┼──────────────┤
│ 8.7.0   │ 3 months ago │
└─────────┴──────────────┘
/usr/local/bin/npx cypress verify
[STARTED] Task without title.
[FAILED] EACCES: permission denied, open '/github/home/.cache/Cypress/8.7.0/binary_state.json'
An unexpected error occurred while verifying the Cypress executable.

Desired behavior

Complete the verification within an accessible folder and update the cache as necessary.

Test code to reproduce

Snippet of the action:

jobs:
  ui-chrome-tests:
    runs-on: ubuntu-latest
    container: cypress/browsers:node16.5.0-chrome94-ff93
    strategy:
      fail-fast: false
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: "UI Tests - Chrome"
        uses: cypress-io/github-action@v2
        with:
          # we have already installed all dependencies above
          install: true
          browser: chrome

Cypress Version

8.7.0, 9.3.1

Other

No response

@alexnitta
Copy link

I'm also experiencing this issue.

@flotwig
Copy link
Contributor

flotwig commented Feb 2, 2022

There is a workaround for this issue on the corresponding issue on cypress-io/github-actions: cypress-io/github-action#446 (comment)

@alexnitta
Copy link

Thanks @flotwig - that workaround is fixing the issue for me.

@mel-OR
Copy link
Author

mel-OR commented Feb 11, 2022

options: --user 1001 workaround fixed my team's issue.

@tetonpeaks
Copy link

After clearing my Cypress cache folder with cypress clear cache I ran into this issue as well.

This is what I did:

  1. rm -rf the Cypress folder in your .cache director
  2. For me I also deleted the Cypress folder in node_modules
  3. Cleaned cache with npm cache clean --force
  4. Installed Cypress with npm install cypress --save-dev

Hope this helps!

@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label May 15, 2023
@cypress-app-bot
Copy link
Collaborator

This issue has been closed due to inactivity.

@cypress-app-bot cypress-app-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2023
@jennifer-shehane jennifer-shehane added CI General issues involving running in a CI provider and removed CI: github actions labels Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI General issues involving running in a CI provider stale no activity on this issue for a long period
Projects
None yet
Development

No branches or pull requests

6 participants