sveltejs / sveltejs/kit

False positive pushState warning

Open
#14,714 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

router
Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the bug

This issue is still there
https://github.com/sveltejs/kit/issues/11671

but its closed.

Reproduction

Third parties like Sentry, Google Analytics and many other causes the issue.

Logs
destination?id=G-M5QB3YS32J&cx=c&gtm=4e5a81:771 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: Linux 6.16 Fedora Linux 42 (KDE Plasma Desktop Edition)
    CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
    Memory: 12.09 GB / 27.25 GB
    Container: Yes
    Shell: 5.2.37 - /bin/bash
  Binaries:
    Node: 22.20.0 - /home/cm/.nvm/versions/node/v22.20.0/bin/node
    npm: 10.9.3 - /home/cm/.nvm/versions/node/v22.20.0/bin/npm
    bun: 1.3.0 - /home/cm/.bun/bin/bun
    Deno: 2.5.3 - /home/cm/.deno/bin/deno
  Browsers:
    Brave Browser: 141.1.83.112
    Firefox: 143.0.4
    Firefox Developer Edition: 143.0.4
Severity

annoyance

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the referenced SvelteKit issue #11671 and reproduce the warning with the reported third-party scripts, especially Sentry or Google Analytics. No source files or tests are named in this issue, so identify the router warning entry point and determine when external history calls should be ignored without hiding genuine SvelteKit conflicts.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.