sveltejs / kit

web development, streamlined
https://kit.svelte.dev
MIT License
17.81k stars 1.78k forks source link

False positive pushState warnings when using Sentry #12177

Open linsen opened 2 weeks ago

linsen commented 2 weeks ago

Describe the bug

I'm getting the same false positive warnings as described in https://github.com/sveltejs/kit/issues/11671 , specifically after installing Sentry using the wizard and default settings (as described in https://docs.sentry.io/platforms/javascript/guides/sveltekit/).

I've attached a minimal repo that's a fresh sveltekit install with Sentry added to it. The warning appears on the first page load after a hard refresh.

Reproduction

https://github.com/linsen/sveltekit-sentry-warning

Logs

Avoid using `history.pushState(...)` and `history.replaceState(...)` as these will conflict with SvelteKit's router. Use the `pushState` and `replaceState` imports from `$app/navigation` instead.

System Info

System:
    OS: macOS 13.3
    CPU: (10) arm64 Apple M1 Pro
    Memory: 73.08 MB / 16.00 GB
    Shell: 3.7.0 - /usr/local/bin/fish
  Binaries:
    Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
    Yarn: 1.22.21 - ~/.nvm/versions/node/v18.18.2/bin/yarn
    npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm
    bun: 1.0.33 - ~/.bun/bin/bun
  Browsers:
    Chrome: 124.0.6367.118
    Safari: 16.4
  npmPackages:
    @sveltejs/adapter-auto: ^3.0.0 => 3.2.0
    @sveltejs/kit: ^2.0.0 => 2.5.7
    @sveltejs/vite-plugin-svelte: ^3.0.0 => 3.1.0
    svelte: ^4.2.7 => 4.2.15
    vite: ^5.0.3 => 5.2.10

Severity

annoyance

Additional Information

No response

ebeloded commented 2 weeks ago

Dealing with the same issue. Thank you for creating a reproduction!