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
- [ENHANCEMENT] Use the custom Next.js dep...
Deployment adapters on Next.js are now stable! This means that we don't have to stick to the limitations of sniffing out build outputs and manually moving or mo...
- NextJS builds sudden runtime_timeout
My builds suddenly stopped working. Activating old prebuilt snapshots work, but redeploying that same code produces builds that throw runtime_timeout FRA region
- Project paused?
Hello, I have two Appwrite projects and I can not resume them for some reason. I'm using the free plan, and I saw in the pricing page that 2 free projects are a...