-
-
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
TypeError "sdk" is read-only when calling Sentry.captureException() #4711
Comments
Hi, @aaptho. Thanks for reporting this. It's puzzling. The code that's erroring is here: sentry-javascript/packages/core/src/request.ts Lines 26 to 40 in af7081c
It's touching the event's sentry-javascript/packages/core/src/baseclient.ts Lines 474 to 484 in af7081c
as part of the I'm not very familiar with Unity or WebGL, but given that this code a) isn't new, and b) is run on every event sent by the SDK, I have to assume that the answer lies there, or we'd've gotten lots more reports before this. From what you know about them, does an object's property becoming read-only ring any bells? (I don't think it's the SDK property specifically that's the problem. It's just the first property that |
It doesn't seem possible that this issue is created by the JS SDK itself. We'll take a look into Unity's WebGL to see if we can figure out what's going on. Worth noting we plan on adding support to WebGL on the Sentry SDK for Unity, even though the first version might not bundle the JS SDK (it'll capture C# scripting errors only) |
Further debugging showed that the issue was indeed on our end. We were using Redux to store the most recent Sentry event, in order to associate it with a custom user feedback report UI. For some reason, React’s dispatch was freezing this event once we stored it in the Redux state, which later caused this issue. Either way, exciting to hear you plan on supporting Unity WebGL more directly! Thank you both kindly for the help investigating this! |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/nextjs
SDK Version
6.18.2
Framework Version
No response
Link to Sentry event
https://sentry.io/organizations/spatial/issues/3090469778/?environment=qa-preview&environment=dev&environment=dev-preview&environment=development&project=6093190&query=is%3Aunresolved&statsPeriod=1h
Steps to Reproduce
Our project uses Unity built to WebGL, and capture any exceptions it throws.
In that error handler, we call
Sentry.captureException(error)
, which causes the error below.Expected Result
The error is sent off to Sentry and appears in our organization's dashboard under Issues
Actual Result
An issue appears in the Sentry dashboard, but instead of the Unity error, there seems to be an error in @sentry/core:
The text was updated successfully, but these errors were encountered: