Just as the title states when I refresh a page it gives me this erro:
AppwriteException: User (role: guests) missing scope (account)
at Client.<anonymous> (file:///C:/Users/meera/GithubDesktop/AIC-Dismissal/node_modules/appwrite/dist/esm/sdk.js:391:27)
at Generator.next (<anonymous>)
at fulfilled (file:///C:/Users/meera/GithubDesktop/AIC-Dismissal/node_modules/appwrite/dist/esm/sdk.js:22:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 401,
type: 'general_unauthorized_scope',
response: {
message: 'User (role: guests) missing scope (account)',
code: 401,
type: 'general_unauthorized_scope',
version: '0.12.30'
}
}
But when I navigate to the same page the error is not there... when I refresh the same page it gives me that error.
Do you have a session already or not?
yes
I do have a session
Can you check the network logs off the request and check that the fallback header is set or the cookie is included in the rest?
what do you mean?
Switch to the network tab instead of the console tab
ehre u go:
this is the cookie
This is a 500 error from your app, not the 401 account.get()
thats the only error
thats showing up
Do you have any filters applied?
nope
I managed to get a temporary fix by checking the browiser using sveltekit
but do you know how to persist the session on the server
honestly, i recommend staying away from SSR because it adds complexity.
if you really want to continue using SSR, you'll either need to use JWT tokens or manually create a session server side so you can extract the session cookie from the header and fully manage it yourself (demo: https://svelte-kit.ssr.almostapps.eu/).
We do have plans to improve SSR with Appwrite which can be found here: https://github.com/appwrite/rfc/pull/59
alright thank you!
[SOLVED] Refreshing a page gives me the following error:
Recommended threads
- delete document problems
i don't know what's going on but i get an attribute "tournamentid" not found in the collection when i try to delet the document... but this is just the document...
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here π I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...