getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.76k stars 1.52k forks source link

RangeError: Maximum call stack size exceeded #12692

Open MathiasWP opened 5 days ago

MathiasWP commented 5 days ago

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/sveltekit

SDK Version

8.12.0

Framework Version

8.12.0

Link to Sentry event

https://sentry.io/organizations/kvist/issues/1940072/events/64b75fa4/?project=4507447454990416

SDK Setup/Reproduction Example

Sentry.init({
    dsn: PUBLIC_SENTRY_DSN,
    tracesSampleRate: 1.0,
    normalizeDepth: 10,
    integrations: [
        Sentry.browserProfilingIntegration(),
        Sentry.browserTracingIntegration(),
        Sentry.replayIntegration({
            maskAllText: true,
            blockAllMedia: true,
            maskAllInputs: true
        }),
        Sentry.captureConsoleIntegration()
    ],
    replaysSessionSampleRate: 0.01,
    replaysOnErrorSampleRate: 1.0,
    profilesSampleRate: 0.1,
    maxValueLength: 8192,
    environment: import.meta.env.MODE,
    enabled: !dev,
    beforeBreadcrumb: this.breadcrumbFilter
});

Steps to Reproduce

I don't know what the user did, there was no suspicious behaviour in the issue.

Expected Result

No maximum call stack size should be exceeded.

Actual Result

image
lforst commented 5 days ago

Hi, seems like you deleted the issue in Sentry. If you toggled the "full stack trace" switch, how many frames were shown and what were they?

MathiasWP commented 5 days ago

Hi, seems like you deleted the issue in Sentry. If you toggled the "full stack trace" switch, how many frames were shown and what were they?

I haven't deleted the issue. Does this URL work? I tried following the placeholder url in the issue template: https://kvist.sentry.io/issues/1940072/?environment=production&project=4507447454990416

MathiasWP commented 5 days ago

This is the full stack trace:

image
lforst commented 5 days ago

Seems weird. I'd imagine the stack trace to be way larger for a "maximum call stack size exceeded" error. There are also no recurring frames which would indicate that we have some bad patching loop. Is this a one-of error or does this happen consistently? Do you have any sort of custom instrumentation logic?

MathiasWP commented 5 days ago

Seems weird. I'd imagine the stack trace to be way larger for a "maximum call stack size exceeded" error. There are also no recurring frames which would indicate that we have some bad patching loop. Is this a one-of error or does this happen consistently? Do you have any sort of custom instrumentation logic?

We have no custom logic, we only use the Sentry packages. I think it has happened before, but it happens rarely.

lforst commented 5 days ago

@MathiasWP Since I immediately don't know how this could be caused in the SDK, and since it is not happening regularly/often, and we are lacking reproduction I would put this issue on hold for now. I don't think this has end-user impact.

As for the fact that this is consuming your quota: Once this reaches let's say 100-200 occurrences (which I feel like is a fair threshold to rule out user error), feel free to reach out to Sentry support and point them to this comment. We can gift you some quota to compensate for these, under the assumption that the SDK is at fault (which my hunch is that is not but whatever).