Skip to content

Streaming with remote function instead of promise doesn't work on hard reload #17172

@mkatrenik

Description

@mkatrenik

Describe the bug

When trying Streaming with promises with remote function instead of simple pending promise from loader, it behaves differently.

with simple promise - both client side nav and hard reload stream correctly
with remote function - client side nav works, but not hard reload - here it hangs until query is resolved and only then renders with tiny flash of pending indicator

as you can see in remote/+page.svelte - if you wrap remote query in async fn, it now behaves same as loader example

Reproduction

https://stackblitz.com/edit/svelte-remote-fn-streaming-issue?file=src%2Froutes%2F%2Blayout.svelte,src%2Froutes%2Fremote%2F%2Bpage.svelte,src%2Froutes%2Floader%2F%2Bpage.svelte

Logs

System Info

stackblitz conteiner

 System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    svelte: ^5.43.8 => 5.43.8

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions