Repository navigation
SvelteKit 3 hydration crashes with async content and a pending boundary #17383
Description
Describe the bug
Under some circumstances Svelte throws a TypeError in an internal root.svelte file whilst rendering.
I have found multiple variables that all help invoke this bug, but I cannot tell exactly what is triggering it. I've narrowed far down though.
It happens on initial load of a page that has two +layout.server.ts files returning data, where a sub-page of these read the data from both load functions, and must also include a <svelte:boundary> with a pending snippet, as well as an async call.
I've described it in further detail in the reproduction-repo.
Also, it does not reproduce on SvelteKit 2.70.3.
Tested in both Firefox and Chromium.
As it does not reproduce in SvelteKit 2.70.3, I assume that it is not a bug in svelte, but I am not sure.
Reproduction
https://github.com/Tinggaard/sveltekit3-root-properties-undefined
For the SvelteKit 2 (non-)reproduction, checkout the sveltekit-2 branch of the repo.
Logs
Uncaught TypeError: can't access property "error", n() is undefined
in <unknown>
in +layout.svelte
in root.svelte
in undefined
Error root.svelte:23
update_reaction runtime.js:253
execute_derived deriveds.js:368
update_derived deriveds.js:391
get runtime.js:691
get onerror root.svelte:30
error boundary.js:477
invoke_error_boundary error-handling.js:72
handle_error error-handling.js:47
update_reaction runtime.js:314
update_effect runtime.js:479
flush_queued_effects batch.js:1121
#process batch.js:444
flush batch.js:677
ensure batch.js:922
run_all utils.js:47
run_micro_tasks task.js:10
queue_micro_task task.js:28
root.svelte:23:26
Error root.svelte:23
update_reaction runtime.js:253
execute_derived deriveds.js:368
update_derived deriveds.js:391
get runtime.js:691
get onerror root.svelte:30
error boundary.js:477
invoke_error_boundary error-handling.js:72
handle_error error-handling.js:47
update_reaction runtime.js:314
update_effect runtime.js:479
flush_queued_effects batch.js:1121
#process batch.js:444
flush batch.js:677
ensure batch.js:922
run_all utils.js:47
run_micro_tasks task.js:10
queue_micro_task task.js:28System Info
System:
OS: Linux 7.2 Fedora Linux 44 (Workstation Edition)
CPU: (16) x64 AMD Ryzen 7 8845HS w/ Radeon 780M Graphics
Memory: 4.31 GB / 27.14 GB
Container: Yes
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.15.0
npm: 11.12.1
pnpm: 12.6.0
Browsers:
Firefox: 156.0.1
Firefox Developer Edition: 156.0.1
npmPackages:
@sveltejs/adapter-auto: ^8.0.0 => 8.0.0
@sveltejs/kit: ^3.0.1 => 3.0.1
@sveltejs/vite-plugin-svelte: ^7.2.0 => 7.3.1
svelte: ^5.57.2 => 5.57.2
vite: ^8.3.0 => 8.3.3Severity
blocking an upgrade
Additional Information
No response
Activity
[-]`TypeError` in internal `root.svelte` file[/-][+]SvelteKit 3 hydration crashes with async content and a pending boundary[/+]teemingc commentedon Oct 9, 2026
We changed Root.svelte in Kit 3 so it might be a bug there
mathieuser commentedon Oct 13, 2026
Hi, I have a similar problem here, but on client-side navigation. Initial load is fine, but client-side navigation crashes sometimes with this error:
app.js:54 TypeError: Cannot read properties of undefined (reading 'data') at root.svelte:24:26 at update_reaction (runtime.js:253:16) at execute_derived (deriveds.js:368:12) at update_derived (deriveds.js:391:14) at is_dirty (runtime.js:169:5) at flush_eager_effects (sources.js:294:12) at internal_set (sources.js:274:4) at Module.set (sources.js:168:9) at set child (props.svelte.js:61:7) at apply_navigation_result (client.js:3803:19)teemingc commentedon Oct 13, 2026
Note to self to check if this gets fixed after sveltejs/svelte#18880 is released
EDIT: it seems like it doesn't fix the issue. I've opened on on the Svelte repository sveltejs/svelte#18993