Skip to content

False positive pushstate warnings with SvelteKit #13823

Open
@AliTahir-101

Description

@AliTahir-101

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

8.32.0

Framework Version

sveltekit 2.5.28

Link to Sentry event

No response

Reproduction Example/SDK Setup

sveltejs/kit#12177

Steps to Reproduce

Just start a sveltekit app with sentry and on first page load you will see the warning.

seems like initiating here // node_modules/@sentry-internal/browser-utils/build/esm/instrument/history.js

[Warning] Avoid using history.pushState(...)andhistory.replaceState(...)as these will conflict with SvelteKit's router. Use thepushStateandreplaceStateimports from$app/navigation instead. (client.js, line xxx)

Expected Result

No wanning while using svelte app navigation.

Actual Result

Image

[Warning] Avoid using history.pushState(...)andhistory.replaceState(...)as these will conflict with SvelteKit's router. Use thepushStateandreplaceStateimports from$app/navigation instead. (client.js, line xxx)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions