sveltejs / sveltejs/kit

[2.61.0] Stale/cached version of remote function data on page change

Open
#15,931 27 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug

Starting from 2.61.0 remote functions don't always re-run on page change which results in stale/cached data.

In reproduction repo there is cars page with a single remote function. When page is changed, sometimes this remote function re-runs, sometimes it doesn't.

Quick video:

https://github.com/user-attachments/assets/3b2955c7-f6b3-44b2-a7f6-931a27c634af

This behavior is inconsistent, sometimes it doesn't re-fetch data, sometimes it does (at 29s of video)

Reproduction

https://github.com/vladshcherbin/svelte-kit-rf-bugs

Logs

System Info
System:
  OS: macOS 15.7.5
Binaries:
  Node: 26.1.0 - /Users/shcherbin/.local/state/fnm_multishells/66645_1780089091564/bin/node
  pnpm: 11.3.0 - /Users/shcherbin/.local/state/fnm_multishells/66645_1780089091564/bin/pnpm
Browsers:
  Chrome: 148.0.7778.179
npmPackages:
  @sveltejs/adapter-node: ^5.5.4 => 5.5.4
  @sveltejs/kit: ^2.61.1 => 2.61.1
  svelte: ^5.55.10 => 5.55.10
  vite: ^8.0.14 => 8.0.14
Severity

blocking an upgrade

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

Reproduce the issue with the linked repository, starting at src/routes/cars/+page.svelte and its single remote function. Change pages repeatedly and compare when the function runs and whether its data is refreshed; done means page changes consistently produce current, non-stale data.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.