https://cypress.io logo
Missing dependency `Xvfb`
# i-need-help
r
I ran my action workflow(Cypress test) on GitHub and used
self-hosted
as a runner. While
npx cypress verify
I get the error as missing dependency
xvfb
. Xvfb is just for display right? As I am running headless mode why should I install this dependency? Your help is highly appreciated.

https://cdn.discordapp.com/attachments/1099998824249950258/1099998824430313552/Screenshot_from_2023-04-24_15-54-46.png

m
Hi @rich-pharmacist-74804 You will need to follow the instructions in https://docs.cypress.io/guides/getting-started/installing-cypress#Linux-Prerequisites as your error message indicates.
r
ok
m
r
Thank you. I have to test mainly on Chrome. So I used the docker
cypress/included/latest
to handle all dependencies for the cypress run. And to fasten the workflow I cached the
node modules
. But since the docker has a different root user for other FE branches where they don't use docker there is an error as
Permission denied
. Any solutions?
m
Sorry, I didn't quite understand your question. If by any chance you are referring to problems with Mozilla Firefox, then you may need to use "the magical user id `1001`" (see https://github.com/cypress-io/cypress-docker-images/issues/871)
r
Yes, It is similar to this but I pass the browser as
chrome
. I have this in the workflow:
Copy code
cypress-run:
    runs-on: [ self-hosted]
    container: cypress/included:latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Cache node packages
        uses: actions/cache@v3
        with:
          path: '**/node_modules'
          key: ${{ runner.os }}-cypress-cache-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-cypress-cache
For my particular branch(qa/development) it works perfectly. But the issue is for other developer branches where
container: cypress/included:latest
is not required. Get the following error.
Error: error: cannot lock ref 'refs/heads/qa/development': Unable to create '***.lock': Permission denied
.
m
If you can't find the reason for the failure, you may want to enable GitHub Action debugging. See https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging