Cypress e2e tests crashing with Monaco Editor for React

16 views Asked by At

I am investigating some flakiness in e2e Cypress tests which are testing a web site that uses Monaco Editor for React.

When I do .type('{{} "e2e-custom-data": 9999 }') into the editor (.view-line), the tests crash on approximately every third run with the following error:

We detected that the Electron Renderer process just crashed.

We have failed the current spec but will continue running the next spec.

This can happen for a number of different reasons.

If you're running lots of tests on a memory intense application.
  - Try increasing the CPU/memory on the machine you're running on.
  - Try enabling experimentalMemoryManagement in your config file.
  - Try lowering numTestsKeptInMemory in your config file during 'cypress open'.

You can learn more here:

https://on.cypress.io/renderer-process-crashed

But if I leave out the closing }, which gets automatically generated by the editor, the tests become stable. So using .type('{{} "e2e-custom-data": 9999 ') doesn't crash the tests.

Same behavior happens also when using Chrome instead of Electron, and regardless of running in headless more or not. The problem occurs when running the tests locally on a sufficiently powerful machine, so it should not be related to CPU/memory in reality.

│ Cypress: 13.7.0 │ Browser: Electron 118 (headless) │ Node Version: v18.19.1 (/opt/homebrew/Cellar/node@18/18.19.1_1/bin/node)

I would like to understand why the Monaco Editor is crashing the Cypress tests, and also why leaving out the } makes it not crash. Is the problem in the Monaco Editor, or in Cypress, or our web site? Is there something that could be done so that we could type in also the closing } instead of having to remember to omit that?

Any help is appreciated!

0

There are 0 answers