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

[Bug]: Dropdown crashes with "Error: Maximum update depth exceeded..." coming from floating-ui #17001

Closed
2 tasks done
EAlexRojas opened this issue Jul 19, 2024 · 0 comments · Fixed by #17002
Closed
2 tasks done

Comments

@EAlexRojas
Copy link
Contributor

Package

@carbon/react

Browser

Chrome

Package version

v1.61.0

React version

18.3.1

Description

Dropdown component crashes when opening and trying to select an option after the update to use floating-ui.
This is only reproductible when running Cypress tests, but it produces an error similar to the one reported previously for Combobox component in #16866:

Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. 
React limits the number of nested updates to prevent infinite loops.

Reproduction/example

https://stackblitz.com/edit/github-rsnzd7?file=src%2FApp.cy.jsx

Steps to reproduce

This can be only reproduced when running cypress tests.
The sandbox does not allow to run cypress tests, but you can download the project and run the test locally:

  • Download the project and extract the zip
  • Run npm i inside the project folder
  • If cypress not available locally, run npx cypress install
  • Execute cypress test with npm run cypress:run

The logs will contain the error

Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. 
React limits the number of nested updates to prevent infinite loops.

Suggested Severity

Severity 1 = Must be fixed ASAP. The response must be swift. Someone from the team must drop all current work and be immediately reassigned to address the issue.

Application/PAL

IBM Event Automation

Code of Conduct

@EAlexRojas EAlexRojas changed the title [Bug]: Dropdown crashes with "Error: Maximum update depth exceeded..." coming from fleating-ui [Bug]: Dropdown crashes with "Error: Maximum update depth exceeded..." coming from floating-ui Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant