Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Session is null on Initial Load, Requires HMR Reload to Fix #29

Open
Dan6erbond opened this issue May 25, 2021 · 0 comments
Open
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Dan6erbond
Copy link
Owner

Overview

Upon initial load of the app, the session store from $app/stores is null.

TypeError: Cannot read property 'session' of null
    at eval (C:\Users\morav\Documents\Private\Programming\SvelteKitAuth\SvelteKitAuth\app\src\routes\__layout.svelte:19:61)
    at Object.$$render (C:\Users\morav\Documents\Private\Programming\SvelteKitAuth\SvelteKitAuth\app\node_modules\svelte\internal\index.js:1380:22)
    at eval (/C:\Users\morav\Documents\Private\Programming\SvelteKitAuth\SvelteKitAuth\app\.svelte-kit\dev/generated/root.svelte:55:122)
    at $$render (C:\Users\morav\Documents\Private\Programming\SvelteKitAuth\SvelteKitAuth\app\node_modules\svelte\internal\index.js:1380:22)
    at Object.render (C:\Users\morav\Documents\Private\Programming\SvelteKitAuth\SvelteKitAuth\app\node_modules\svelte\internal\index.js:1388:26)
    at render_response (file:///C:/Users/morav/Documents/Private/Programming/SvelteKitAuth/SvelteKitAuth/app/node_modules/@sveltejs/kit/dist/ssr.js:377:28)
    at async respond_with_error (file:///C:/Users/morav/Documents/Private/Programming/SvelteKitAuth/SvelteKitAuth/app/node_modules/@sveltejs/kit/dist/ssr.js:936:10)
    at async respond$1 (file:///C:/Users/morav/Documents/Private/Programming/SvelteKitAuth/SvelteKitAuth/app/node_modules/@sveltejs/kit/dist/ssr.js:1155:10)
    at async render_page (file:///C:/Users/morav/Documents/Private/Programming/SvelteKitAuth/SvelteKitAuth/app/node_modules/@sveltejs/kit/dist/ssr.js:1186:20)
    at async render (file:///C:/Users/morav/Documents/Private/Programming/SvelteKitAuth/SvelteKitAuth/app/node_modules/@sveltejs/kit/dist/ssr.js:1537:10)

This may be an issue in SvelteKit or the way it's used by __layout.svelte. Requires further investigation.

@Dan6erbond Dan6erbond added bug Something isn't working help wanted Extra attention is needed labels May 25, 2021
@Dan6erbond Dan6erbond self-assigned this May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant