Skip to content
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

Application crash RangeError: Invalid string length JSON.stringify #1579

Open
ATouhou opened this issue Dec 4, 2024 · 2 comments
Open

Application crash RangeError: Invalid string length JSON.stringify #1579

ATouhou opened this issue Dec 4, 2024 · 2 comments
Labels
SDK Support General SDK issues rather than being related to a feature team

Comments

@ATouhou
Copy link

ATouhou commented Dec 4, 2024

Sometimes my application freezes and posthog data transfer stops. I assume it is triggered by one of my pages that has a lot of data.
How do I prevent this issue?


Unhandled Runtime Error
RangeError: Invalid string length

Call Stack
JSON.stringify
<anonymous>
cr
node_modules\posthog-js\dist\module.js (1:79970)
method
node_modules\posthog-js\dist\module.js (1:80942)
eval
node_modules\posthog-js\dist\module.js (1:147996)
t.value
node_modules\posthog-js\dist\module.js (1:148001)
t.value
node_modules\posthog-js\dist\module.js (1:83062)
t.value
node_modules\posthog-js\dist\module.js (1:148274)
e.eval [as sendRequest]
node_modules\posthog-js\dist\module.js (1:142646)
n
node_modules\posthog-js\dist\module.js (1:79253)
eval
node_modules\posthog-js\dist\module.js (1:79274)
apply
node_modules\@sentry\browser\esm\helpers.js (91:16)
@ATouhou
Copy link
Author

ATouhou commented Dec 5, 2024

Sometimes also this error is triggered:


Unhandled Runtime Error
RangeError: Maximum call stack size exceeded

Call Stack
eval
node_modules\posthog-js\dist\module.js (1:8056)
Array.forEach
<anonymous>
Q
node_modules\posthog-js\dist\module.js (1:6750)
e
node_modules\posthog-js\dist\module.js (1:8056)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)
J
node_modules\posthog-js\dist\module.js (1:7102)
e
node_modules\posthog-js\dist\module.js (1:8164)
eval
node_modules\posthog-js\dist\module.js (1:8184)

@rafaeelaudibert
Copy link
Member

Hey, @ATouhou! What version of posthog-js are you using? This would be extremely helpful

Also, do you have a demangled version of the stack trace, i.e. a version where you're using a source map and we can see exactly where in our code the errors are happening?

I also see a reference to sentry in the first stack trace. Does that error happen if you disable the Sentry integration?

@rafaeelaudibert rafaeelaudibert added the SDK Support General SDK issues rather than being related to a feature team label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SDK Support General SDK issues rather than being related to a feature team
Projects
None yet
Development

No branches or pull requests

2 participants