sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

RangeError: Maximum call stack size exceeded

Open MathiasWP opened this issue 1 year ago • 6 comments

Is there an existing issue for this?

  • [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
  • [X] I have reviewed the documentation https://docs.sentry.io/
  • [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases

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

MathiasWP avatar Jun 28 '24 07:06 MathiasWP

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?

lforst avatar Jun 28 '24 08:06 lforst

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 avatar Jun 28 '24 09:06 MathiasWP

This is the full stack trace:

image

MathiasWP avatar Jun 28 '24 09:06 MathiasWP

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?

lforst avatar Jun 28 '24 09:06 lforst

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.

MathiasWP avatar Jun 28 '24 10:06 MathiasWP

@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).

lforst avatar Jun 28 '24 11:06 lforst

I get this error in extractRequestData from @sentry/node. We use koa 2.15.3

Reeywhaar avatar Jul 08 '24 12:07 Reeywhaar

@Reeywhaar can you please create a separate issue with concrete reproduction steps? Thank you!

lforst avatar Jul 08 '24 12:07 lforst

Still looking into it, message does not provide something to stick to

Reeywhaar avatar Jul 08 '24 12:07 Reeywhaar

Suspect there can be circular objects in request

Reeywhaar avatar Jul 08 '24 12:07 Reeywhaar

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

getsantry[bot] avatar Aug 09 '24 07:08 getsantry[bot]