-
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
Cypress cy.screenshot() timeout during cypress run
#5016
Comments
This comment has been minimized.
This comment has been minimized.
@lleewwiiss We never figured out what was causing this issue. We think it has to do with cypress beginning to run tests on the application before it has finished starting. The errors we received were the first 2-5 tests. |
This comment has been minimized.
This comment has been minimized.
Also been getting this on 3.5.0 and 3.6.1. |
I also have this issue with 3.8.1 and Chrome 79 on CircleCI's |
I don't think this is related directly to #6023 |
This comment has been minimized.
This comment has been minimized.
Hello, We're using cypress/included docker image in Gitlab CI and keep getting these error messages:
It won't appear in every test and I can't see a pattern in those fails yet. At the moment, I'm struggling with getting debug mode to run, but I'll give an update as soon as I can provide some logs. I hope this first information can help nevertheless. Thank you in advance for all help, information etc.! |
I can confirm with @leichteckig that this issue is occurring as described: "... 3.8.2 (and above) currently. Cypress 3.8.1 works correctly though. We're using cypress/included docker image in Gitlab CI and keep getting these error messages:
Only difference is that I am using Azure DevOps CI and their container services. |
I can alsoI confirm with @leichteckig that this issue is occurring as described. We are using Gitlab CI with Ubuntu CI runners and your docker image
random, masks errors also...It doesn't happen locally on desktop/laptop. Glad I read through this to figure out downgrading to 3.8.1 would solve the issue. |
I am having some variation on this issue. It was just happening for one specific test. Was running 3.6.1 and upgraded to 3.8.1, didn't help. When running the test locally I could see the real reason that the test was failing (instead of the screenshot timeout like CI was claiming). So for me it was mostly an issue of a bad error message i CI. |
@Powersource exactly what I meant by sometimes it also masks the true reason for the test fail |
I just upgraded Cypress to |
cypress run
Need infoI still have questions that have gone unanswered in this thread that are necessary for investigation.
Chrome 79 bug?There has been some speculation that this may be caused by the Chrome 79 performance bug detailed here: #6023 (comment) If you are running on Chrome 79, we've released a docker image for Chrome 80 found here: https://github.com/cypress-io/cypress-docker-images/tree/master/browsers/node13.6.0-chrome80-ff72 at Please try to update to using Chrome 80. If this is related to #6023 it may fix your issue. |
I tried using chrome 80 in my Github actions:
Using the above container seems to give errors like this, and all tests fails:
Our setup is an Angular + Graphql Node.js Express application. Is there something special I need to make this work when running in containers - or do you want me to open that as a separate issue? But screenshots seems to be working 🔥 |
@alexbjorlig Hmm, I haven't seen the ECONNREFUSED error for proxy requests before. Yeah, I would open a new issue. May be more due to the Node upgrade. The fact that screenshots work in Chrome 80 is very promising though. Thanks for the update. |
@jennifer-shehane - thanks, I will create a new issue for the ECONNREFUSED. Update Is there another way to run Cypress with Chrome80? I tried using Final update |
Hello there, A little update: I tried Cypress' docker images with Chrome 80 (Cypress 4.0.0 and newer) as recommended in #6023 (comment) and after a week or so, I don't see any more screenshot related failures until now. In 3.8.2, there was Chrome 79 installed iirc. So it looks like it was the mentioned Chrome bug for me as well. Thank you so much for your advice! 👍 |
Just upgraded to |
@jennifer-shehane we have this same issue with a single test, it occurs infrequently, and the reason it appears to be related to this test is the page under test in-particular is highly complex and no doubt is heavy to load & render, so until you have a way to simulate that you will not be able to reproduce this. For us this error occurs in a feature file, with 8 scenarios, each loading the same page, so could be a memory issue.
|
We are running multiple feature files in Azure pipelines. We see this issue always at the first feature file. All of the others are okay. Hope this information hepls. |
We're able to reproduce this consistently in Apache Superset (open source). Here's a PR that shows the E2E CI failures and the test output. The screenshot timeout errors seem to be limited to these code changes, too, but they pass when running Cypress locally. CI is running Chrome 119 on Ubuntu - 20.04. |
@eschutho Thanks for the repo! Any thoughts on updating to latest Cypress within those tests? |
@eschutho Could you give the minimal instructions to get this up and running with Cypress tests? I tried to follow the contributing guidelines and am still running into:
Also I get this error when running
|
Hi, @jennifer-shehane yes, we're a little behind in our updates, but we are planning to upgrade this year.
You can use the make commands. If you run into any issues with the make commands, it looks like with where you are currently, you'll need to run Alternatively there's a docker image that you can use. These are the instructions for running with Docker. https://github.com/apache/superset/blob/master/CONTRIBUTING.md?plain=1#L973 Happy to help with any other setup questions for reproducing. |
@eschutho make superset is failing and the docker image exits also. I'll need an easier example to run since this is now taking significant time to run. |
We were facing this issue as well,
As a caveat, this solution only works for the regular elements / buttons that contain an href, but it doesn't with the ones |
@droca I was able to recreate this situation. Only within the Chrome browser. This can be recreated with
it('click on new tab', () => {
cy.visit('index.html')
cy.get('a').click().should('have.attr', 'foo')
})
<html>
<script>
</script>
<body>
<a target="_blank" href="new.html">Click me</a>
</body>
</html>
<html>
</html> |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
All of our tests pass locally, but when running the Codeship CI we get errors for a few tests.
The error during Codeship CI builds:
CypressError: cy.screenshot() timed out waiting '30000ms' to complete.
Desired behavior:
All tests pass in Codeship CI
Steps to reproduce:
For our app the reproduction is running the
ci:codeship
command runs which callscy:record
"cy:record": "cypress run --record --key *key* --config video=false", "ci:codeship": "start-server-and-test start http://localhost:5000 cy:record"
I'm not exactly sure how to reproduce this other than creating a Codeship Basic app and attempting to run tests there. I have seen a few other issues point to a problem with how Cypress and Codeship interact.
Versions
Cypress version: 3.4.1
Sidenote: We are using the
cypress-autorecord
package, but it doesn't seem like this is involved.The text was updated successfully, but these errors were encountered: