question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cypress 10 component test crash after 100~ tests

See original GitHub issue

Current behavior

Both on CI and on localhost, after running a hundred component tests (i.e. 138 of 227) via cypress run --component, Cypress 10 would fail with the following error:

ERR_FAILED (-2) loading 'http://localhost:8080/__/#/specs/runner?file=src/dct/components/HoverableItem/Collection/test.tsx'
Error: ERR_FAILED (-2) loading 'http://localhost:8080/__/#/specs/runner?file=src/dct/components/HoverableItem/Collection/test.tsx'
    at rejectAndCleanup (node:electron/js2c/browser_init:161:7647)
    at EventEmitter.stopLoadingListener (node:electron/js2c/browser_init:161:8022)
    at EventEmitter.emit (node:events:390:28)
    at EventEmitter.emit (node:domain:475:12)


────────────────────────────────────────────────────────────────────────────────────────────────────

  Running:  test.tsx                                                                    (139 of 227)
Unhandled rejection Error: ERR_FAILED (-2) loading 'about:blank'
    at rejectAndCleanup (node:electron/js2c/browser_init:161:7647)
    at EventEmitter.stopLoadingListener (node:electron/js2c/browser_init:161:8022)
    at EventEmitter.emit (node:events:390:28)
    at EventEmitter.emit (node:domain:475:12)

If I run the failing test via cypress open it passes correctly.

If I comment out the component test that provoked the error, another one will trip with the same error, usually around the same ~120 of … 227 number.

Desired behavior

All component tests should run correctly

Test code to reproduce

Doesn’t matter…event the following fails:

import { Disabled } from ".";

describe("Disabled", () => {
  it("Should render", () => {
    cy.mountWithTheme(<Disabled />);
    cy.contains("How would you like to pay?");
  });
});

Cypress Version

10.0.3

Other

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:29 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
lmiller1990commented, Jun 28, 2022

Right, I thought it went out already. Let’s wait for the next release. Thanks.

1reaction
lmiller1990commented, Jun 24, 2022

Good to know it’s an electron issue. I wouldn’t say chrome fixes it - it just avoids it, haha.

We have some work coming soon to update the electron version we use, maybe that will fix this issue. Until then, I’m going to hold off on looking into this. If the electron 19.x bump doesn’t fix it, I’ll take another look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changelog - Cypress Documentation
When a chromium based browser tab or process crashes, Cypress will no longer hang ... Cypress 10 now includes beta support for component...
Read more >
Cypress test runner crashing issue - Stack Overflow
This way was can reduce the memory consumption. Save the configuration, close and star the app again. Avoid writing lengthy tests and split...
Read more >
Cypress: The crash post - by Aleix Suau - Medium
Cypress makes testing your app like a real user very easy. After working with it for a few weeks, I'd like to condensate...
Read more >
Jest Β· Delightful JavaScript Testing
With so many users, the core team of Jest uses an Open Collective for non-Facebook contributors. Sponsors. Sponsors are those who contribute $100...
Read more >
Cypress Tips and Tricks - Gleb Bahmutov
A few tips on getting the most out of E2E testing tool Cypress ... Make JavaScript crashes useful; Use test names when creating...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found