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
- tablesDB.updateRow() properly updates co...
I did not thoroughly investigate, but the issue does not seem to stem from actual permission errors (despite the error message). My tables have table-level perm...
- Database listRows method call failing in...
I'm getting an error when trying to use listRows in a flutter app on a database. It seems something in the backend has changed because the production version of...
- Appwrite sites
I have built saas using react and tanstack, when I connect my repo(private) with appwrite sites, deployment works properly but screenshot capture fails, and whi...