-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Package: sveltekitIssues related to the Sentry SvelteKit SDKIssues related to the Sentry SvelteKit SDK
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- 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
7.74.0
Framework Version
sveltekit 1.25
Link to Sentry event
No response
SDK Setup
import { handleErrorWithSentry, Replay } from "@sentry/sveltekit";
import * as Sentry from '@sentry/sveltekit';
Sentry.init({
dsn: 'https://3c0a82d0a6fb34aa51085ba824e98e86@o4506019657154560.ingest.sentry.io/4506050175434752',
tracesSampleRate: 1.0,
// This sets the sample rate to be 10%. You may want this to be 100% while
// in development and sample at a lower rate in production
replaysSessionSampleRate: 0.1,
// If the entire session is not sampled, use the below sample rate to sample
// sessions when an error occurs.
replaysOnErrorSampleRate: 1.0,
// If you don't want to use Session Replay, just remove the line below:
integrations: [new Replay()],
});
// If you have a custom error handler, pass it to `handleErrorWithSentry`
export const handleError = handleErrorWithSentry();Steps to Reproduce
- create a base project of sveltekit
- install sentry!
- refresh the page multiple times until you get the error
- Huray reproduced!
Expected Result
No error!
Actual Result
the error! this is local.
stores.js?v=ffd779d4:35 Uncaught (in promise) ReferenceError: SVELTEKIT_DEV is not defined
at Object.subscribe (stores.js?v=ffd779d4:35:17)
at instrumentPageload (router.ts:51:1)
at svelteKitRoutingInstrumentation (router.ts:27:1)
at BrowserTracing.setupOnce (browsertracing.ts:259:1)
at setupIntegration (integration.ts:105:1)
at integration.ts:93:1
at Array.forEach ()
at setupIntegrations (integration.ts:90:1)
at BrowserClient.setupIntegrations (baseclient.ts:297:1)
at Hub.bindClient (hub.ts:134:1)
at initAndBind (sdk.ts:34:1)
at init (sdk.ts:122:1)
at init2 (sdk.ts:24:1)
at Module.init3 (sdk.ts:30:1)
at hooks.client.js:4:8
Metadata
Metadata
Assignees
Labels
Package: sveltekitIssues related to the Sentry SvelteKit SDKIssues related to the Sentry SvelteKit SDK
Projects
Status
Waiting for: Community