You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
you should see the exception from above in the JS error logs
check src/routes/index.svelte for the code that triggers the error
Expected behavior
No exception should be thrown
Stacktraces
Stack trace
start.js:448 Uncaught (in promise) TypeError: Cannot read property 'parse' of null
at Array. (start.js:448)
at Object.set (index.mjs?v=93707a36:35)
at set_store_value (index.mjs?v=93707a36:136)
at instance (index.svelte? [sm]:9)
at init (index.mjs?v=93707a36:1485)
at new Routes (index.svelte? [sm]:10)
at createProxiedComponent (svelte-hooks.js:245)
at new ProxyComponent (proxy.js:241)
at new Proxy (proxy.js:341)
at create_if_block_2 (root.svelte? [sm]:38)
Was about to write an issue but saw this. It happened on fresh init npm init svelte@next and choose skeleton. Import {session} and {browser} then set value to $session trigger the TypeError loking for url route.
Low. I have a workaround in place: deferring the store updates with a simple setTimeout(..., 0) seems to avoid the issue.
Thanks @sfriedel, confirmed also this workaround somehow worked: setTimeout(() => $session = ... )
Describe the bug
If the
$session
store gets written to in the component constructor of a route, sveltekit throws a TypeError at https://github.com/sveltejs/kit/blob/master/packages/kit/src/runtime/client/renderer.js#L115Logs
To Reproduce
src/routes/index.svelte
for the code that triggers the errorExpected behavior
No exception should be thrown
Stacktraces
Stack trace
start.js:448 Uncaught (in promise) TypeError: Cannot read property 'parse' of null
at Array. (start.js:448)
at Object.set (index.mjs?v=93707a36:35)
at set_store_value (index.mjs?v=93707a36:136)
at instance (index.svelte? [sm]:9)
at init (index.mjs?v=93707a36:1485)
at new Routes (index.svelte? [sm]:10)
at createProxiedComponent (svelte-hooks.js:245)
at new ProxyComponent (proxy.js:241)
at new Proxy (proxy.js:341)
at create_if_block_2 (root.svelte? [sm]:38)
Information about your SvelteKit Installation:
Diagnostics
System: OS: Linux 5.8 Ubuntu 20.10 (Groovy Gorilla) CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz Memory: 1.31 GB / 15.34 GB Container: Yes Shell: 5.8 - /bin/zsh Binaries: Node: 14.17.0 - /usr/bin/node Yarn: 1.22.5 - /usr/bin/yarn npm: 6.14.13 - /usr/bin/npm Watchman: 4.9.0 - /home/sef/.local/opt/watchman/bin/watchman Browsers: Chrome: 90.0.4430.212 Firefox: 89.0 npmPackages: @sveltejs/kit: next => 1.0.0-next.115 svelte: ^3.34.0 => 3.38.2Severity
Low. I have a workaround in place: deferring the store updates with a simple
setTimeout(..., 0)
seems to avoid the issue.The text was updated successfully, but these errors were encountered: