-
Notifications
You must be signed in to change notification settings - Fork 6
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 is completely ruining my life and job. #98
Comments
First of all, I love the passion. Excellent use of rhetoric to communicate emotion. Second of all, to make sure I understand, you want to run 3 Cypress instances simultaneously in the same CI container? And Xvfb is blocking that? If that's the case, have you tried initializing Xvfb yourself? You can use
This should work, because:
Let me know how this goes for you, I think it should work. IMO, a better option would just be to create 3 parallel Circle jobs to run each test suite, then you wouldn't need to worry about any of this. A long-term goal for Cypress is to reduce/remove the dependency on Xvfb, but that will require these things to be done first:
|
@flotwig Hi Zach! Thank you so much for the quick and understanding reply (and for not calling me a complaining whiny baby lol). As for your troubleshooting tips, I'm going to give the solutions a shot and will let you know how it goes! I 100% agree on the parallel jobs, I'm working on getting that up-and-running as I learn more about how to do that. I really look forward to being able to do that! Seriously, though, thank you for these suggestions! I'll keep ya posted. |
So when I run I have every xvfb related module I could find in every package.json of each package and in the project root. |
Specifically, |
Ahh, maybe that's my issue. I'm on macOS. i also cant get |
Since you are on CircleCI, can you try using either:
We run 1000s of tests per day on Circle, so it should be the simplest thing to do, in general. |
Xvfb is only for running on Linux, you shouldn't need it for macOS. I'm not sure what your CI environment is like, but you can use our docker images that have all the dependencies preinstalled. |
Okay sounds good. I will investigate that avenue instead of doing sketchy workarounds. Thanks so much guys! |
FWIW I think I solved this on a CentOS 8 box by spinning up the xvfb server externally:
At any rate, I have not had the issue since doing so. |
I'm using a pipeline through bitbucket and I'm getting the same issue. Even if run the dependency from cypress:
It is telling me that I have the same issue as the one that you have above with the xvfb package. Does anyone know a workaround? |
I had to set the XVFB port for each individual package I was running tests against. They were all trying to use the same port on a single machine when running in parallel so i had to manually pass in a different port assignment because XVFB wasn't automatically assigning a new port if the port was already in use. I no longer work for the company I was building this for so I dont have code examples to show you, unfortunately. |
Hi guys, Sorry for jumping into this thread with a question that might be tagged as unrelated. I'm trying to run cypress in headed mode on CircleCI so that an extension I have installed (Metamask to be controlled using puppeteer) can be used but I have not found a single example or documentation to make my tests run xvfb which might be what my setup needs to run the tests in the same way they're running fine in my local machine runs. Current CircleCI config is as follows:
Any help is truly appreciated! |
This Issue title is hilarious. I screenshotted and sent it to several people. I received many "lol"s. |
I find myself here, kackling with friends at the title, and crying because we are running into an issue with Xvfb, trying to automate a test for an application that does not run in a headless environment. I'm using it in conjunction with xdotool, but xdotool doesn't seem to be able to find the window. It works with xvfb-run locally on my x11 popOS installation (i haven't changed anything about X either), but fails to find the window only in CI (Ubuntu Latest with recommended dependencies). Any help is appreciated! |
How does one use this
reuse
option? Where do I set that? Do I create a new file or edit an existing one? The readme instructions are not very detailed. I am working in a monorepo that is simultaneously running three webApp environments each with their own cypress instances -- all running at the same time. I want to set each cypress instance to a different DISPLAY and then kill Xvfb after it's done. We are using CircleCi in a javascript/node.js codebase. We use acircle.yml
file to tell circleci what to do and when.This friggin' Xvfb stuff has literally wasted thousands of dollars worth of my time trying to fix.
Can anyone help me?
I get all kinds of random errors related to Xvfb failures.
The text was updated successfully, but these errors were encountered: