Skip to content

Reactivity From Remote Functions Freezes #14654

@qwacko

Description

@qwacko

Describe the bug

I have an issue where I am getting inconsistent updates of the DOM with changes as a result of changes to data retrieved through remote function queries. I perform a form action to update the data, it seems that the correct data is received back from the remote query, but then the DOM doesn't update correctly.

Refreshing the page makes it display correctly, so I believe I am retrieving the correct data and have the correct display logic.

I get a couple of other strange behaviors, sometimes doing a form submit causes the page to reload rather than doing a surgical update of the DOM (but this appears sporadically)

This issue I am experiencing seems like such a basic thing that I am convinced that the issue must be with me, I tried to isolate it by making a fresh repo from svelte start with just the core functionality, and was able to easily reproduce the issue.

Reproduction

The following is a frest sveltekit project with just the minimal libraries and functionality added to reproduce this. All the logic is contained in +page.svelte and test.remote.ts
Github link : https://github.com/qwacko/skremotecheck
Stackblitz : https://stackblitz.com/github/qwacko/skremotecheck?file=src%2Froutes%2F%2Bpage.svelte

Logs

Nil - I get no erroneous logs.

System Info

System:
    OS: Linux 6.8 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (4) x64 Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
    Memory: 11.16 GB / 15.50 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 24.9.0 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 11.6.0 - /usr/local/bin/npm
    pnpm: 10.18.1 - /home/james/.local/share/pnpm/pnpm
  npmPackages:
    @sveltejs/adapter-node: ^5.3.3 => 5.3.3 
    @sveltejs/kit: ^2.46.2 => 2.46.2 
    @sveltejs/vite-plugin-svelte: ^6.2.1 => 6.2.1 
    svelte: ^5.39.10 => 5.39.10 
    vite: ^7.1.9 => 7.1.9

Severity

serious, but I can work around it

Additional Information

I really am stumped by this, and sure it must be an issue with my code, I just cannot figure it out. I have tried the following to see what happens:

  • Addition of a $inspect(...) of the received data from the remote query seems to make it work correctly.
  • I made sure I had keys foe the {#each...} block.
  • I have tried displaying a returned object (i.e. I thought this might display hte whole item) and I believe this didn't fix it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions