-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Error: Could not start Xvfb. Install XVFB and run Cypress again. #5110
Comments
Interesting, and we see this randomly on TravisCI when using Docker - XVFB not being detected, but restarting the build solves it. I wonder if increasing the timeout when passed as an option to https://github.com/cypress-io/xvfb/blob/master/index.js would solve this problem. This is so transient that we did not look into this, but seems different CIs can encounter it |
I've also reproduced this issue on gitlab-ci. |
It's been happening more and more frequently for us as time goes on; nearly one in five of our builds fail because Xvfb doesn't start in the container. Have you tried the timeout increase yet with any success? |
in docker
|
If we can have exact dockerfile, setup instructions and the minimal test repository, we could debug this to find which system is failing.
…Sent from my iPhone
On Apr 18, 2018, at 18:53, Vlad ***@***.***> wrote:
in docker
�[0m
(Tests Finished)
- Tests: 1
- Passes: 1
- Failures: 0
- Pending: 0
- Duration: 4 seconds
- Screenshots: 1
- Video Recorded: false
- Cypress Version: 2.1.0
(Screenshots)
- /www/qw/cypress/screenshots/Simple test -- Login -- go to login.png (1280x720)
�[91mWed, 18 Apr 2018 22:41:11 GMT cypress:server:headless attempting to close the browser
�[0m�[91mWed, 18 Apr 2018 22:41:11 GMT cypress:server:browsers killing browser process
�[0m�[91mWed, 18 Apr 2018 22:41:35 GMT cypress:server:timers child sending timer id 3
�[0m�[91mWed, 18 Apr 2018 22:41:37 GMT cypress:server:timers child sending timer id 20
�[0m�[91mWed, 18 Apr 2018 22:41:37 GMT cypress:server:timers child sending timer id 21
�[0m�[91mWed, 18 Apr 2018 22:41:37 GMT cypress:server:timers child sending timer id 23
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 35
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 36
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 37
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 38
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 39
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 40
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 41
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 42
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 43
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 44
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 45
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 46
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 47
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 48
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 49
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 50
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 51
�[0m�[91mWed, 18 Apr 2018 22:41:38 GMT cypress:server:timers child sending timer id 52
�[0m�[91mWed, 18 Apr 2018 22:41:39 GMT cypress:server:timers child sending timer id 53
�[0m�[91mWed, 18 Apr 2018 22:41:39 GMT cypress:server:timers child sending timer id 54
�[0m�[91mWed, 18 Apr 2018 22:41:40 GMT cypress:server:timers child sending timer id 55
�[0m�[91mWed, 18 Apr 2018 22:41:40 GMT cypress:server:timers child sending timer id 56
�[0m�[91mWed, 18 Apr 2018 22:41:40 GMT cypress:server:timers child sending timer id 57
�[0m�[91mWed, 18 Apr 2018 22:41:40 GMT cypress:server:timers child sending timer id 58
�[0m�[91mWed, 18 Apr 2018 22:41:40 GMT cypress:server:timers child sending timer id 59
�[0m�[91mWed, 18 Apr 2018 22:41:40 GMT cypress:server:timers child sending timer id 60
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 64
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 65
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 66
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 67
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 68
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 69
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 70
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 71
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 72
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 73
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 74
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 75
Wed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 76
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 77
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 78
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 79
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 80
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 82
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 83
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 84
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 85
�[0m�[91mWed, 18 Apr 2018 22:41:41 GMT cypress:server:timers child sending timer id 86
�[0m�[91mWed, 18 Apr 2018 22:42:31 GMT cypress:server:timers child sending timer id 5
�[0m�[91mWed, 18 Apr 2018 22:42:31 GMT cypress:server:timers child sending timer id 6
�[0m�[91mWed, 18 Apr 2018 22:42:31 GMT cypress:server:timers child sending timer id 7
�[0m�[91mWed, 18 Apr 2018 22:42:31 GMT cypress:server:timers child sending timer id 9
�[0m�[91mWed, 18 Apr 2018 22:42:31 GMT cypress:server:timers child sending timer id 10
�[0m�[91mWed, 18 Apr 2018 22:42:31 GMT cypress:server:timers child sending timer id 11
�[0m�[91mWed, 18 Apr 2018 22:42:32 GMT cypress:server:timers child sending timer id 12
�[0m�[91mWed, 18 Apr 2018 22:42:32 GMT cypress:server:timers child sending timer id 13
�[0m�[91mWed, 18 Apr 2018 22:42:32 GMT cypress:server:timers child sending timer id 14
�[0m�[91mWed, 18 Apr 2018 22:42:32 GMT cypress:server:timers child sending timer id 15
�[0m�[91mWed, 18 Apr 2018 22:42:32 GMT cypress:server:timers child sending timer id 16
�[0m�[91mWed, 18 Apr 2018 22:42:32 GMT cypress:server:timers child sending timer id 17
�[0m�[91mWed, 18 Apr 2018 22:42:32 GMT cypress:server:timers child sending timer id 18
�[0m�[91mWed, 18 Apr 2018 22:42:32 GMT cypress:server:timers child sending timer id 19
�[0m�[91mWed, 18 Apr 2018 22:42:32 GMT cypress:server:timers child sending timer id 22
�[0m�[91mWed, 18 Apr 2018 22:42:33 GMT cypress:server:timers child sending timer id 24
�[0m�[91mWed, 18 Apr 2018 22:42:33 GMT cypress:server:timers child sending timer id 25
�[0m�[91mWed, 18 Apr 2018 22:42:33 GMT cypress:server:timers child sending timer id 26
�[0m�[91mWed, 18 Apr 2018 22:42:33 GMT cypress:server:timers child sending timer id 28
�[0m�[91mWed, 18 Apr 2018 22:42:33 GMT cypress:server:timers child sending timer id 29
�[0m�[91mWed, 18 Apr 2018 22:42:33 GMT cypress:server:timers child sending timer id 30
�[0m�[91mWed, 18 Apr 2018 22:42:33 GMT cypress:server:timers child sending timer id 31
�[0m�[91mWed, 18 Apr 2018 22:42:33 GMT cypress:server:timers child sending timer id 32
�[0m�[91mWed, 18 Apr 2018 22:42:33 GMT cypress:server:timers child sending timer id 33
�[0m�[91mWed, 18 Apr 2018 22:42:33 GMT cypress:server:timers child sending timer id 34
�[0m�[91mWed, 18 Apr 2018 22:42:35 GMT cypress:server:timers child sending timer id 61
�[0m�[91mWed, 18 Apr 2018 22:42:35 GMT cypress:server:timers child sending timer id 62
�[0m�[91mWed, 18 Apr 2018 22:42:35 GMT cypress:server:timers child sending timer id 63
�[0m�[91mWed, 18 Apr 2018 22:42:36 GMT cypress:server:timers child sending timer id 81
�[0m�[91mWed, 18 Apr 2018 22:42:36 GMT cypress:server:timers child sending timer id 87
�[0m�[91mWed, 18 Apr 2018 22:42:36 GMT cypress:server:timers child sending timer id 88
�[0m�[91mWed, 18 Apr 2018 22:42:36 GMT cypress:server:timers child sending timer id 89
�[0m�[91mWed, 18 Apr 2018 22:42:36 GMT cypress:server:timers child sending timer id 90
�[0m�[91mWed, 18 Apr 2018 22:42:36 GMT cypress:server:timers child sending timer id 91
�[0m�[91mWed, 18 Apr 2018 22:42:36 GMT cypress:server:timers child sending timer id 92
�[0m�[91m2018-04-18T22:42:36.939Z cypress:cli Stopping XVFB
�[0m2018-04-18T22:42:36.951Z
result simple {
"failures": null,
"message": "Could not find Cypress test run results"
}
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@avevlad Sorry, but that seems unrelated to the problem reported in this issue, which is Xvfb failing to start in the first place when using the docker image. |
Sorry to bug you again, but these Xvfb errors are becoming even more frequent on our CI… Have you tried the timeout increase yet with any success? |
Yes, we are increasing the default xvfb start time out from 2 seconds to 5 seconds in cypress 3.0.0
…Sent from my iPhone
On Apr 26, 2018, at 18:55, David Celis ***@***.***> wrote:
Sorry to bug you again, but these Xvfb errors are becoming even more frequent on our CI… Have you tried the timeout increase yet with any success?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@bahmutov looks like 3.0.0 has been released. Did this fix make it in? Can you link the relevant commit here, please? |
would also love to know if the fix for this made it into 3.0.0. thanks! |
It did actually - it was not correctly set to a milestone so it was missed when doing the changelog. It was bumped up to 5 seconds... but now that I think about it, I have no idea why we wouldn't set it to something like 30 seconds. I have seen situations where builds fail due to shutting off xvfb or starting it up. Line 10 in 97e3092
|
We also see some times when tests fails with "Could not start Xvfb". |
We have the same problem on version 3.1.0 |
Last time I met this issue, the root cause is that the "Xvfb" process is already running, and cypress can not start it with errors like:
Then I checked that there're really some running processes of
and after I killed them everything went well.
So in my case, this is not a problem with Cypress. Hope it helps. |
@yuguangchuan
it worked for me. :) |
I had the same problem. To resolve it, I installed xvfb: sudo apt-get install xvfb. After that, I had an other problem which tells me that libgconf-2.so.4 cannot be loaded. And it works ! |
@mel1nn Unfortunately, that's not really a solution to this issue. Please note that this repository is for the Cypress docker images, which already list |
I use the last Cypress version and I stil have randomly this error. |
We has this same problem with Jenkins. Someone fixed it? |
Landing here with the same error on Gitlab CI. When I use |
I am running into the same issue on bamboo CI. It happens intermittently. |
It's happens when another plan/process is executing in the same time as bamboo ci use a docker image with network=host. This is a pain we need to find a correct solution for this problem.
Someone could confirm is because the network mode host? |
@gcirone We've never run the Cypress docker image with host mode networking, so I don't think that's related to the originally reported problem |
@davidcelis something block the second process is the first for any reason take more time or get freeze on some test. The error message is quite explicative: My question is: If the network mode is host the Xvfb process is shared between builds? |
@gcirone Maybe? But as I said, we don't run our image with host networking, so my originally reported |
Yes true @davidcelis I'll raise a new issue specific to my problem :) |
We hadn't seen this error since upgrading to Brian mentions here that there's no reason this timeout couldn't be extended to 30 seconds, can that be prioritized? https://github.com/cypress-io/cypress-docker-images/issues/39#issuecomment-395606998 |
There's a bunch of new logic in Not sure if that'll help these issues at all. |
Anyone tried out version 3.3.1 to see if this issue is still happening? |
I still repro on 3.3.2 |
The code for this is done in cypress-io/cypress#5114, but has yet to be released. |
@bahmutov : when do you anticipate to release these changes? |
We will try to release it this month, meanwhile, it is possible to patch Cypress NPM module yourself, see how https://docs.cypress.io/guides/guides/debugging.html#Patch-Cypress |
@bahmutov : can this patch be implemented for 3.4.0 version as well? I dont want to bump up the version to 3.4.1 as our docker image is set to use 3.4.0. Any suggestions would be helpful. Thanks |
@pdcl09 we will not backport any patches, but you can take v3.4.0 and create a patch yourself as our documentation describes - it is only changing a single constant there. |
Perfect, that helps. Thank you so much. |
@bahmutov : Are you aware of any scenario where cypress tests still fail after doing the patch fix? |
Still having this issue on Cypress 3.4.1 on Bitbucket pipelines:
I'm sure that XVFB is installed |
The fix will for this will be released in 3.5.0. The bug will exist in 3.4.1 as noted in this comment: #5110 (comment) |
I have same error as @Yupsie :( |
Released in |
I'm still seeing this on GitLab CI with cypress v3.6.1 |
+1 still seeing this on GitLab CI with cypress v3.6.1 |
+1 I'm still seeing this on GitLab CI with cypress v3.6.1 |
It seems like I just forgot to install the dependencies. It worked after installing those. |
This issue will be closed to further comment as the exact issue here was resolved and tested. If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix. |
Hi, folks! I'm using Cypress to run an end-to-end testing suite against an application I work on. I've been running into a really weird issue with the docker images, one which only seems to happen on our CI (TeamCity); I haven't been able to reproduce it locally.
Running
cypress verify
in the Docker image ends up failing and saying that Xvfb is not installed, even though it's listed in the Dockerfile as a dependency to be installed. Simply restarting a build is enough to get the Docker setup back into the right state, and then the tests can run just fine. Here is a log of pulling and starting the Cypress docker image; between failing and passing builds, nothing changes. The same image sha ends up being pulled but sometimes fails to detect Xvfb.The text was updated successfully, but these errors were encountered: