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
- general_unauthorized_scope
localhost oauth not working. general_unauthorized_scope error showing. { "message": "User (role: guests) missing scopes ([\"account\"])", "code": 401, ...
- Anyone manage to get a slack-bot working...
I'm trying to setup a bot the send and retrieve slack messages to a chat in my site. I've failed with SSE and appwrite functions soo far... i'll trying polling ...
- [Sites] Deployment finished but site is ...
The deployment finished and is active but the site shows timeout error.