api-platform / admin

A beautiful and fully-featured administration interface builder for hypermedia APIs
https://api-platform.com/docs/admin/
MIT License
481 stars 130 forks source link

Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. #458

Closed tomekkowalczyk closed 2 years ago

tomekkowalczyk commented 2 years ago

API Platform version(s) affected: 2.6.8

Description

The administration panel is displayed, while clicking the action causes an error in the console

BUG: Uncaught 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.

image

package.json image

Yarn v1.17.3 Node v16.15.0

How to reproduce

Possible Solution

Additional Context

alanpoulain commented 2 years ago

Hello, Sorry there is not enough context to fix this. Could you create a reproducer?

nickbass72 commented 2 years ago

Same here. I just created a fresh project following the official guide.

Uncaught 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. at checkForNestedUpdates (react-dom.development.js:27292:1) at scheduleUpdateOnFiber (react-dom.development.js:25475:1) at dispatchSetState (react-dom.development.js:17527:1) at ResourceDefinitionContext.js:55:1 at IntrospectedResourceGuesser (ResourceGuesser.tsx:55:1) at renderWithHooks (react-dom.development.js:16305:1) at updateFunctionComponent (react-dom.development.js:19588:1) at beginWork (react-dom.development.js:21601:1) at beginWork$1 (react-dom.development.js:27426:1) at performUnitOfWork (react-dom.development.js:26557:1)

nickbass72 commented 2 years ago

@alanpoulain Downgrading to React 17.0.2 resolves that issue for me.