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 `updateRows` returns `database_...
Hi Appwrite team! Iβm seeing a strange issue with TablesDB bulk row updates on a self-hosted Appwrite instance. **Environment** - Appwrite self-hosted `1.9.0` ...
- [SOLVED] Realtime Missing Channels
```js useEffect(() => { let subscription: RealtimeSubscription; async function loadChips() { try { const {rows: chi...
- Update row sheet not loading
After right clicking a row header and click update, the sidebar fails to load (never-ending skeleton)