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

CypressError: cy.screenshot() timed out waiting '30000ms' to complete. #18778

Closed
kodriscollics opened this issue Nov 3, 2021 · 11 comments
Closed
Labels
type: duplicate This issue or pull request already exists

Comments

@kodriscollics
Copy link

kodriscollics commented Nov 3, 2021

Current behavior

I run my tests headless. After upgrading to Cypress 8.7.0, whenever a test fails for whatever reason, I get the following:

 CypressError: `cy.screenshot()` timed out waiting `30000ms` to complete.

That is all I get on the console. No other messages. I have to rerun the test(s) in the GUI environment to see what really happened and to get the real error.

The above error is masking what is happening on test failure.

The problem goes away when I back-rev Cypress to version 8.5.0.

Another aspect that makes this an even worse problem is that once the error is thrown, the session never exits so the test never really finishes.

Desired behavior

Show the real error instead of masking it with this faux error.

Test code to reproduce

Not sure this is practical, as I have tons of tests and any failure on any test results in the problem.

Cypress Version

8.6.0
8.7.0
9.0.0

Other

No response

@kodriscollics kodriscollics changed the title CypressError: cy.screenshot() timed out waiting CypressError: cy.screenshot() timed out waiting '30000ms' to complete. Nov 3, 2021
@pawelgielda
Copy link

Hey, could it be connected with the last changes introduced with: c0d781d ?? The default timeout also changed for example in cy.request() method.

@szamanr
Copy link

szamanr commented Nov 5, 2021

do you also experience slower runtime or video playback issues, like in #18740 or #18564?

@Arunk28
Copy link

Arunk28 commented Nov 5, 2021

am facing the issue after updating the 8.6.0.
I will also revert and check to 8.5.0.

but please fix this because of this all test are failed
@jennifer-shehane

@kodriscollics
Copy link
Author

@szamanr I have not noticed the tests running slower nor video playback issues.

@kodriscollics
Copy link
Author

kodriscollics commented Nov 11, 2021

Same issue with Cypress version 9.0.0:

CypressError: `cy.screenshot()` timed out waiting `30000ms` to complete.

Test that complete successfully under 8.5.0 fail under 9.0.0. And, when the error occurs, the tests never exit.

@jennifer-shehane
Copy link
Member

Duplicate of #5016

@jennifer-shehane jennifer-shehane marked this as a duplicate of #5016 Nov 19, 2021
@jennifer-shehane jennifer-shehane added the type: duplicate This issue or pull request already exists label Nov 19, 2021
@theTestingApproach
Copy link

Hello, i am facing this same issue in 12.16.0..Any resolution so far please?

@wongk
Copy link

wongk commented Jul 6, 2023

+1

1 similar comment
@fzampori-sumo
Copy link

+1

@hannamarkevich
Copy link

  • v12.9

@nagash77
Copy link
Contributor

As @jennifer-shehane mentioned in this comment this ticket is a duplicate of #5016 . Please follow that ticket for any updates on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

10 participants