Skip to content

Navigation breaks remote function query #14814

@regnstr

Description

@regnstr

Describe the bug

I've noticed that having the same remote function query on more than one page and navigating between them breaks their ability to refresh. I guess it has something to do with caching, because navigating to a page without the query fixes the issue.

My workaround is to use a link with the "data-sveltekit-reload" attribute to get a full page reload. Putting a copy of the query in a parent +layout.svelte also seems fix it.

Reproduction

https://stackblitz.com/~/github.com/regnstr/remote-function-bug-repro

Logs

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (16) x64 AMD Ryzen 7 7800X3D 8-Core Processor
    Memory: 28.95 GB / 63.22 GB
  Binaries:
    Node: 22.13.1 - C:\Program Files\nodejs\node.EXE
    npm: 10.9.2 - C:\Program Files\nodejs\npm.CMD
    pnpm: 10.10.0 - C:\Users\isakr\AppData\Roaming\npm\pnpm.CMD
    Deno: 2.1.4 - C:\Users\isakr\scoop\shims\deno.EXE
  Browsers:
    Chrome: 141.0.7390.123
    Edge: Chromium (140.0.3485.54)
    Firefox: 143.0.1 - C:\Program Files\Mozilla Firefox\firefox.exe
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    @sveltejs/adapter-auto: ^7.0.0 => 7.0.0
    @sveltejs/kit: ^2.47.3 => 2.47.3
    @sveltejs/vite-plugin-svelte: ^6.2.1 => 6.2.1
    svelte: ^5.42.2 => 5.42.2
    vite: ^7.1.12 => 7.1.12

Severity

serious, but I can work around it

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions