Describe the bug
Hello! I was noticing some issues with a page on my SvelteKit app that I believe was caused by using the experimental async / remote functions (#18097). After updating, the issue has worsened and the page is now completely broken, giving fn is not a function and then Svelte error: invariant_violation in the browser console.
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-biy9yopz?description=The%20default%20SvelteKit%20template,%20generated%20with%20create-svelte&title=SvelteKit%20Default%20Template
Original project: https://github.com/RestartB/titanium-dashboard
Logs
[Error] TypeError: fn is not a function. (In 'fn()', 'fn' is null)
in <unknown>
in ToggledContent.svelte
in +page.svelte
in +layout.svelte
in +layout.svelte
in root.svelte
in undefined
invoke_error_boundary (chunk-CJFVPO5Z.js:772)
handle_error (chunk-CJFVPO5Z.js:752)
#run (chunk-CJFVPO5Z.js:1384)
(anonymous function) (chunk-CJFVPO5Z.js:1299)
run_all (chunk-CJFVPO5Z.js:45)
run_micro_tasks (chunk-CJFVPO5Z.js:718)
(anonymous function) (chunk-CJFVPO5Z.js:724)
[Error] Svelte error: invariant_violation
An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app — please open an issue at https://github.com/sveltejs/svelte, citing the following message: "Batch has scheduled roots"
https://svelte.dev/e/invariant_violation
invariant_violation (chunk-CJFVPO5Z.js:180)
invariant (chunk-CJFVPO5Z.js:1094)
#commit (chunk-CJFVPO5Z.js:2955)
#process (chunk-CJFVPO5Z.js:2736)
flush (chunk-CJFVPO5Z.js:2893)
(anonymous function) (chunk-CJFVPO5Z.js:3078)
run_all (chunk-CJFVPO5Z.js:45)
run_micro_tasks (chunk-CJFVPO5Z.js:718)
(anonymous function) (chunk-CJFVPO5Z.js:724)
System Info
System:
OS: macOS 26.4.1
CPU: (8) arm64 Apple M3
Memory: 109.50 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 26.0.0 - /opt/homebrew/bin/node
npm: 11.12.1 - /opt/homebrew/bin/npm
pnpm: 11.1.1 - /opt/homebrew/bin/pnpm
Browsers:
Edge: 148.0.3967.54
Firefox: 150.0.3
Safari: 26.4
npmPackages:
svelte: ^5.55.6 => 5.55.6
Severity
blocking an upgrade
Describe the bug
Hello! I was noticing some issues with a page on my SvelteKit app that I believe was caused by using the experimental async / remote functions (#18097). After updating, the issue has worsened and the page is now completely broken, giving
fn is not a functionand thenSvelte error: invariant_violationin the browser console.Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-biy9yopz?description=The%20default%20SvelteKit%20template,%20generated%20with%20create-svelte&title=SvelteKit%20Default%20Template
Original project: https://github.com/RestartB/titanium-dashboard
Logs
System Info
System: OS: macOS 26.4.1 CPU: (8) arm64 Apple M3 Memory: 109.50 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 26.0.0 - /opt/homebrew/bin/node npm: 11.12.1 - /opt/homebrew/bin/npm pnpm: 11.1.1 - /opt/homebrew/bin/pnpm Browsers: Edge: 148.0.3967.54 Firefox: 150.0.3 Safari: 26.4 npmPackages: svelte: ^5.55.6 => 5.55.6Severity
blocking an upgrade