react-component / react-component/menu

Maximum update depth exceeded.

Open
#265 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
701
Forks
266
Avg merge
4d 11h
Merged PRs (30d)
3

Description

We are occasionally experiencing the following error in our production environment. Only certain users are experiencing this. We are using an antd select component, which uses the react-component/select component, which uses this component. Sometimes this error occurs when first clicking in the select dropdown, and other times, when selecting the 3rd/4th item in the dropdown.

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 listener (client.3713b3bd.js:3614)
vendor.17bd68bdeb41bf6a11e3.js:2573 Invariant Violation: Minified React error #185; visit https://reactjs.org/docs/error-decoder.html?invariant=185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. 
    at https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:522
    at a (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:625)
    at Qa (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:95354)
    at Object.enqueueSetState (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:44845)
    at l.x.setState (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2612:1702)
    at Array.r.handleChange (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:1006:710657)
    at Object.setState (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:1006:713027)
    at t.updateMiniStore (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2557:83699)
    at t.componentDidUpdate (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2557:83601)
    at Ba (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:82584)
    at Va (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:85160)
    at https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:98367
    at Object.t.unstable_runWithPriority (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2628:3194)
    at js (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:98302)
    at Cs (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:98078)
    at Es (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:97423)

One other piece of information, whenever we open the developer tools, this bug does not happen, when we close it, it starts happening again.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the error through the antd Select and react-component/select path, with developer tools closed. Trace the reported updateMiniStore and componentDidUpdate entries in the stack, then verify that opening the dropdown and selecting several items no longer produces the maximum update depth error.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.