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

Cypress crashes/hangs if a test throws a long error #30699

Open
tnrich opened this issue Dec 2, 2024 · 2 comments
Open

Cypress crashes/hangs if a test throws a long error #30699

tnrich opened this issue Dec 2, 2024 · 2 comments
Labels
Reproducible Can be reproduced stage: needs investigating Someone from Cypress needs to look at this type: performance 🏃‍♀️ Performance related

Comments

@tnrich
Copy link
Contributor

tnrich commented Dec 2, 2024

Current behavior

This test causes the cypress open chrome test runner to crash:

it("works", () => {
    cy.visit("https://example.cypress.io");
    const longString = "a".repeat(1000000);
    throw new Error(longString);
  });

Note, making the longString a bit shorter causes the test to pass again.

image

Desired behavior

Throwing a long error should not crash the cypress runner. Zooooiiiink! (Should support whatever JS' limits are which are fairly astronomical ~1GB)

Test code to reproduce

https://github.com/tnrich/cypress-test-tiny

Cypress Version

13.16.0

Node version

18.17.1

Operating System

mac os

Debug Logs

No response

Other

No response

@jennifer-shehane jennifer-shehane added type: performance 🏃‍♀️ Performance related stage: needs investigating Someone from Cypress needs to look at this labels Dec 3, 2024
@tnrich
Copy link
Contributor Author

tnrich commented Dec 3, 2024

Also note that this occurs running in headless mode (the screenshot is from ~5 mins into the test run):
image

This could definitely be behind some of our mysterious CI crashes where there is little to no info to debug with.

Not really my place to say but IMHO it seems like this should be a high priority issue because I imagine it would be a fairly straightforward fix on cypress' side AND prevent a ton of difficult to debug test failures.

@tnrich tnrich changed the title Cypress crashes if a test throws a long error (inside a Cypress crashes if a test throws a long error Dec 3, 2024
@tnrich tnrich changed the title Cypress crashes if a test throws a long error Cypress crashes/hangs if a test throws a long error Dec 3, 2024
@jennifer-shehane jennifer-shehane added the Reproducible Can be reproduced label Dec 10, 2024
@jennifer-shehane
Copy link
Member

I was able to reproduce this hanging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reproducible Can be reproduced stage: needs investigating Someone from Cypress needs to look at this type: performance 🏃‍♀️ Performance related
Projects
None yet
Development

No branches or pull requests

2 participants