-
-
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
@sentry/sveltekit gives me the error: "An error occurred on the client side: TypeError: Cannot read properties of undefined (reading 'getIntegrationById')" #8290
Comments
Hey, can you check (in your lockfile) that all your sentry dependencies are on the same version? Thanks! |
I'm also seeing this — I'm working in a monorepo using This is a prod-breaking issue for me that I only got when upgrading all my deps so some insight or further debugging steps would be wonderful. |
Hi @alexbjorlig and @madeleineostoja, thanks for reporting this. We missed a crucial edge case here - namely the client being undefined. I opened #8381 to fix this. |
Looking at the Javascript code, there doesn't even seem to be a getIntegrationById. Instead, there's a getIntegrationByName |
Hey @Amy-B-Tradition please open a new issue if you're experiencing a problem. This one's quite old by now and we're changing some things within the SDK for our upcoming major. |
I resolved the issue by storing the replay instance I created in Redux. Not the best solution, but since your documentation on how to get the replay instance from anywhere was incorrect it seemed the best choice. I've resolved the issue for myself, but other users may benefit if you fix your docs. Because I'm "on the clock" and the issue is resolved, I am not going to open an issue for you. |
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
7.54.0
Framework Version
1.20.1
Link to Sentry event
No response
SDK Setup
hooks.client.ts
hooks.server.ts
Steps to Reproduce
When running my applications e2e test with playwright, I get this error:
Expected Result
No issues with
import * as Sentry from '@sentry/sveltekit';
Actual Result
The error
An error occurred on the client side: TypeError: Cannot read properties of undefined (reading 'getIntegrationById')
The text was updated successfully, but these errors were encountered: