Closed
Description
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- Provide a link to the affected event from your Sentry account
Package + Version
-
@sentry/browser -
@sentry/node -
raven-js -
raven-node(raven for node) - other:
Version:
5.12.4
Description
Sentry sends RangeError: Maximum call stack size exceeded error from @sentry/utils/instruments.ts.
Here is Sentry event: https://sentry.io/share/issue/82cc1c5e3bc4418ebccecee6c324d9d1/
Browser: Chrome Mobile WebView 64.0.3282
Platform: Android 7.1.1
Metadata
Metadata
Assignees
Labels
No labels
Activity
kamilogorek commentedon Mar 4, 2020
It looks like your code might have an infinite event loop. And because we collect breadcrumbs through wrapping native API, it looks like it comes from Sentry.
You should be able to see where it originates from by blackboxing either our bundle or CDN file (or
instrument.tsitself if you have access to sourcemaps) in devtools. Devtools => Settings => Blackboxing.Line 85 in
helpers.tspoints to user-land function invocation, which would confirm my suspicions.doniyor2109 commentedon Mar 4, 2020
@kamilogorek Thanks for the detailed explanation.
kamilogorek commentedon Mar 4, 2020
Anytime. Please feel free to ping me if it's still relevant issue, I'll reopen it.
neelamc-active commentedon Jun 27, 2020
Please explain more considered we are very new in angular.
kamilogorek commentedon Jul 3, 2020
I'm not sure what I could explain more other than what my comment above did 😅
ybrodsky commentedon Oct 7, 2020
I am getting a similar error
I am using nextjs so I have sentry logging errors from the backend and the frontend. This error originates in the backend.
I am using it this way:
Any idea?
linehammer commentedon Feb 9, 2021
This error is almost always means you have a problem with recursion in JavaScript code, as there isn't any other way in JavaScript to consume lots of stack. Sometimes calling a recursive function over and over again, causes the browser to send you Maximum call stack size exceeded error message as the memory that can be allocated for your use is not unlimited.
How to fix it?
Wrap your recursive function call into a -
Also, you can localize the issue by setting a breakpoint on RangeError type of exception , and then adjust the code appropriately.
wen-kai commentedon Feb 9, 2022
In case anyone runs into this in the future -- our users were having intermittent crashes with
rangeError: Maximum call stack size exceededin production (mainly IOS) after we integrated Sentry's react navigation v4 instrumentation. After removing the automatic instrumentation the crashes were resolved. It's possible for our AppStack to re-render as it's wrapped in a few HoC, so it may inherently be a bug with how we've set up our react-navigation rather than the actual Sentry react navigation instrumentation module. Hope this helps anyone encountering something similar -- it was a tough one to track down.gre commentedon May 20, 2022
Thanks @wen-kai for your comment, we are having the same problem. Unfortunately Sentry logic isn't very protective and not preventing infinite loop in objects. an object that have nested inside some reference of a parent will infinitely make dropUndefinedKeys loop https://github.com/getsentry/sentry-javascript/blob/master/packages/utils/src/object.ts#L197
There is nothing "wrong" with the user land code actually it's crashing inside Sentry logic (at least for us) as soon as you pass a recursive object in navigation.
cc @kamilogorek let us know if we need to create a new issue or reopen this one. thanks.
(a way to fix it is to allow a max depth in the code so you can detect something is wrong. another way is to track the parents that you enters and see if there is a loop)
Disable React Navigation sentry integration
kamilogorek commentedon May 20, 2022
@gre yes, please create a new one so that team can triage it, thanks!
Disable React Navigation sentry integration (#112)