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

Xvfb error on GitHub CI: (EE) Server is already active for display 99 #952

Closed
dwightjack opened this issue Oct 20, 2023 · 2 comments
Closed

Comments

@dwightjack
Copy link

Hello! I am using the cypress/base:18.12.1 container image to run a GitHub Action job that executes 4 instances of Cypress in parallel. Here is a sample of the job:

test:
  name: tests
  runs-on: [self-hosted, dev, standard]
  container: cypress/base:18.12.1
  steps:
    # ...
    - name: Component testing
      run: pnpm turbo run cypress run --component

The turbo CLI tool runs the cypress run --component on multiple targets in parallel.

This was working fine for the last 4 months then, without any change in the setup, the job started randomly failing on some branches with the following error:

> cypress run --component
  
  [STARTED] Task without title.
  [FAILED] Xvfb exited with a non zero exit code.
  [FAILED] 
  [FAILED] There was a problem spawning Xvfb.
  [FAILED] 
  [FAILED] This is likely a problem with your system, permissions, or installation of Xvfb.
  [FAILED] 
  [FAILED] ----------
  [FAILED] 
  [FAILED] Error: (EE) 
  [FAILED] Fatal server error:
  [FAILED] (EE) Server is already active for display 99
  [FAILED] If this server is no longer running, remove /tmp/.X99-lock
  [FAILED] and start again.
  [FAILED] (EE)
  [FAILED] 
  [FAILED] ----------
  [FAILED] 
  [FAILED] Platform: linux-x64 (Debian - 11.5)
  [FAILED] Cypress Version: 12.17.4
  Xvfb exited with a non zero exit code.
  
  There was a problem spawning Xvfb.
  
  This is likely a problem with your system, permissions, or installation of Xvfb.

I don't think this is an issue with Cypress itself, so I am wondering if this is some issue related to the container I am using.

Thanks in advance!

@MikeMcC399
Copy link
Collaborator

@dwightjack

This is probably not an issue with Cypress or with the Cypress Docker image cypress/base:18.12.1 and I haven't seen any related reports concerning this error running on GitHub CI.

It looks like you are running on a GitHub self-hosted runner. You might like to try running on a GitHub-hosted runner just as a test to see if it is related to your self-hosted runners.

The Cypress way of running tests in parallel containers in GitHub is to use the Cypress Cloud - see https://docs.cypress.io/guides/cloud/smart-orchestration/parallelization. You should not run into Xvfb issues if you use this because as far as GitHub is concerned, each of the containers runs separately from each other.

The Cypress GitHub Action supports this. See https://github.com/cypress-io/github-action#parallel.

I don't know the turbo tool, so I can't give you any feedback on that. You could try asking in the Cypress technical community on Discord

Discord chat (click on button)

if anybody else has experience with this tool.

@dwightjack
Copy link
Author

@MikeMcC399 Thanks for the quick reply. I guess that it might be the GH runner then. I'll try your suggestion and, if the job is still not working, I will ask in the Discord community.

Thanks again!

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