DavidOriginal post
Web Developer
Hello everyone, I work with nuxt and I have the following issue:
Bash
Error checking user status: User (role: guests) missing scope (account)
at Client.<anonymous> (node_modules\.pnpm\appwrite@16.0.2\node_modules\appwrite\src\client.ts:695:19) at Generator.next (<anonymous>) at fulfilled (node_modules\.pnpm\appwrite@16.0.2\node_modules\appwrite\node_modules\tslib\tslib.es6.js:73:58) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)Here is the code that generate this error:
TypeScript
const checkUser = async () => { try { user.value = await account.get() } catch (error) { console.log('Error checking user status:', error) }}I have checked my active session in the cookies and I see:
a_session_<userId>: <auth_token>
Summary
Developers using Nuxt experienced an error in their code related to a missing scope for the user role 'guests'. One user suggested creating a session on both the server and client when fetching data. The error originated from the code snippet provided causing the issue.