-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
RangeError: Maximum call stack size exceeded #2470
Comments
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. |
@kamilogorek Thanks for the detailed explanation. |
Anytime. Please feel free to ping me if it's still relevant issue, I'll reopen it. |
Please explain more considered we are very new in angular. |
I'm not sure what I could explain more other than what my comment above did 😅 |
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.
Any idea? |
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. |
In case anyone runs into this in the future -- our users were having intermittent crashes with |
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) |
due to some recursive objects in our stack and passed in navigation, it makes Sentry crash when tracking the performance. problem was reported to getsentry/sentry-javascript#2470 but in the meantime, we are disabling the feature for now.
@gre yes, please create a new one so that team can triage it, thanks! |
* Disable React Navigation sentry integration due to some recursive objects in our stack and passed in navigation, it makes Sentry crash when tracking the performance. problem was reported to getsentry/sentry-javascript#2470 but in the meantime, we are disabling the feature for now. * add changeset
Package + Version
@sentry/browser
@sentry/node
raven-js
raven-node
(raven for node)Version:
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
The text was updated successfully, but these errors were encountered: