cypress: Cypress 10 component test crash after 100~ tests
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
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 29 (18 by maintainers)
Right, I thought it went out already. Let’s wait for the next release. Thanks.
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.
@gvocale can you see if the same thing happens in chrome (on CI and locally?)
cypress run --component --browser chrome
. You might need to install chrome, depending on your CI setup, or you can use one of our docker images, some of which have chrome. Those are here: https://github.com/cypress-io/cypress-docker-imagesThere are some other issues that look like they’ll be fixed when we update to Electron 19 - this might be one of them. If Chrome has the same problem, we will know it’s not related to Electron, and can dig deeper.