Skip to content

$app/storeswill be deprecated in SvelteKit 3 (crashing already in prerelease) #22263

Closed

Description

@nmontavon

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

@sentry/sveltekit 10.65.0

Framework Version

^@sveltejs/kit@next.7

Link to Sentry event

No response

Reproduction Example/SDK Setup

Sentry.init({
dsn: PUBLIC_SENTRY_DSN,
tracesSampleRate: 1.0,
environment: PUBLIC_APP_ENV,
release: PUBLIC_RELEASE_VERSION ?? "undefined",
dist: "server",
});

Steps to Reproduce

  1. Upgrade to SvelteKit 3 prerelease 7 or newer (https://github.com/sveltejs/kit/releases/tag/%40sveltejs%2Fkit%403.0.0-next.7)
  2. launch build with sentry init
  3. build succeeds, but crashes client-side in browser:

Uncaught (in promise) Error: $app/storeshas been removed in favour of$app/state. See https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated

Expected Result

Migration to $app/state and deprecate Svelte 4 support.

Actual Result

Uncaught (in promise) Error: $app/storeshas been removed in favour of$app/state. See https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated

Additional Context

sveltejs/kit#15499

sveltejs/kit#15406

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jul 14, 2026
  2. linear-code commented on Jul 14, 2026

    @linear-code
  3. sentry-pierre commented on Jul 14, 2026

    @sentry-pierre

    Confirmed. @sentry/sveltekit imports page and navigating from $app/stores in packages/sveltekit/src/client/browserTracingIntegration.ts. SvelteKit 3 prerelease 7 removed that module in favor of $app/state, a migration the codebase already has TODO(v11) notes for.

    What I checked:

    • packages/sveltekit/src/client/browserTracingIntegration.ts is the only production file importing $app/stores
    • peerDependencies currently locks @sveltejs/kit to 2.x

    A maintainer can take it from here.

  4. Lms24 commented on Jul 14, 2026

    @Lms24
    Member

    Thanks for writing in! This is already tracked in #18853. We'll fix this in the next major version of the SDK (#22056)

  5. nmontavon commented on Jul 14, 2026

    @nmontavon
    Author

    Ah nice, thanks - good to know!

    I'd advise keeping this issue open until then - SvelteKit 3 seems right around the corner and others may find this useful here.

  6. Lms24 commented on Jul 14, 2026

    @Lms24
    Member

    yeah I also realized the linked issue doesn't mention sveltekit 3 specifically, so it's still valid to keep this tracked.

    Also wondering if we can find a workaround for the current major version of the SDK. I'll forward this internally.

  7. reopened this on Jul 14, 2026
  8. added 2 commits that reference this issue on Jul 15, 2026
    c24baa3
    3599250
  9. added a commit that references this issue on Jul 17, 2026
    483816f
  10. github-actions commented on Jul 20, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #22264, which was included in the 10.67.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions