Function `denormalize` throws `RangeError: Maximum call stack size exceeded` - support selecting normalized objects by id
See original GitHub issueI still haven’t been able to figure out how or why, but sometimes the function denormalize
in normalizers/denormalize.js
, will go into an infinite recursion loop while loading data.
Uncaught RangeError: Maximum call stack size exceeded
at denormalize.js:21
at Array.reduce (<anonymous>)
at denormalize (denormalize.js:21)
at denormalize (denormalize.js:7)
at denormalize.js:24
at Array.reduce (<anonymous>)
at denormalize (denormalize.js:21)
at denormalize (denormalize.js:7)
at denormalize.js:12
at Array.map (<anonymous>)
Not sure where to start debugging it… The trace starts in getQuerySelector, so I’m trying to use that to obtain the result of a normalized request.
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
JavaScript RangeError: Maximum Call Stack Size Exceeded
The RangeError: Maximum call stack size exceeded is thrown when a function call is made that exceeds the call stack size. This can...
Read more >gatsby-source-contentful: Maximum call stack size exceeded
The latest change introduced with PR #20258 causes a Maximum call stack size exceeded error for me. Running gatsby develop --host 0.0.0.0 throws...
Read more >RangeError: Maximum call stack size exceeded - Educative.io
In this shot, we will see how to fix the “RangeError: Maximum call stack size exceeded” error. ... The most common source for...
Read more >javascript - Maximum call stack size exceeded error
It means that somewhere in your code, you are calling a function which in turn calls another function and so forth, until you...
Read more >Node.js v19.3.0 Documentation
stack <Object> A stack trace of the function. The arrays contains information about the expected and actual number of calls of the functions...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@zeraien usedKeys would be provided to new selector like
getNormalizedObjectById
normally this selector would just get id and it would return proper object, but if leading to recursive error, this would be catched and warning would be shown in console.
then someone could do thing like:
So usedKeys would be provided in easy to work with way by human, while library would convert it to the same structure as stored in reducer. Probably this would be used very sparingly, only when recursive relationship, but we would have an escape hatch so I could work on
getNormalizedObjectById
if I think about it more, this looks like graphql fragment concept, but for any api, including REST