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

Tests fail with "ResizeObserver loop completed with undelivered notifications" #29277

Open
felipecao opened this issue Apr 5, 2024 · 5 comments
Labels
stage: needs investigating Someone from Cypress needs to look at this

Comments

@felipecao
Copy link

felipecao commented Apr 5, 2024

Current behavior

When trying to automate the process of logging into a GSuite account with the new Google layout, inputting the user email works fine, but then, when transitioning to the password screen, a ResizeObserver loop completed with undelivered notifications is thrown, Cypress cannot catch it with the usual Cypress.on('uncaught:exception') command, and the test fails consistently.

Desired behavior

I'd expect the fallback exception handler (Cypress.on('uncaught:exception')) to kick in and prevent the test from crashing.

Test code to reproduce

I've put together a small project to demo the error: https://github.com/felipecao/cypress-error-demo

Please notice that:

  • you'll need a valid GSuite account to run the project and reproduce the error (I can provide one, if necessary)
  • there's a Cypress.on('uncaught:exception') handler declared on /support/e2e.js, which doesn't seem to be invoked when the error is thrown

Cypress Version

13.7.2

Node version

v20.11.1

Operating System

Sonoma 14.3.1

Debug Logs

Debug logs are available as files within the Github project. Please see `stdout.txt` and `logs.txt`. The project was ran with the following shell command to save debug logs: DEBUG=cypress:* npx cypress open 1> stdout.txt 2> logs.txt

Other

No response

@cacieprins cacieprins added the stage: needs investigating Someone from Cypress needs to look at this label Apr 5, 2024
@maisano-patreon
Copy link

Currently running into this as well – has this been triaged at all?

@priyajeet
Copy link

Noticing same issue with Cypress 13.12 and I have this

Cypress.on(
  "uncaught:exception",
  (err) => !err.message.includes("ResizeObserver loop"),
);

@ellamae0821
Copy link

I am experiencing this issue as well using 13.13.1.

@54mu3l
Copy link

54mu3l commented Jan 1, 2025

On my local development laptop all tests pass. But within the GitLab pipeline I get consistently (for some tests) the ResizeObserver loop error. For now, I'm using the workaround from @priyajeet:

Noticing same issue with Cypress 13.12 and I have this

Cypress.on(
  "uncaught:exception",
  (err) => !err.message.includes("ResizeObserver loop"),
);

Cypress package version: 13.17.0
Cypress binary version: 13.17.0
Electron version: 27.3.10
Bundled Node version: 18.17.1

(btw: I'm testing a Vue.js/Vite application)

@VINOD-GOSWAMI
Copy link

VINOD-GOSWAMI commented Feb 4, 2025

hi anyone got solution/workaround or better way to handle this one if yes can they share it.
i'm also facing the issue in application under test.
i have seen this article on handing this but it's not clean
Stack-overflow-Solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs investigating Someone from Cypress needs to look at this
Projects
None yet
Development

No branches or pull requests

7 participants