This is usually due to permissions. Are you using Appwrite cloud?
Appwrite exception: User (role: guests) missing scope (account)
Votes
3
Replies
24
Participants
Unknown
Messages
25
And do you have set permissions in the document you're getting or collection?
Hello! Since this is a different issue, could you please create a different post in this #channel channel? I will try to help you 😄
I have faced this issue and i find the reason in which user has not create session (auth) in new device so it throw this exception
Rank 2: Process
It was working for me two to 3 days back, but today it's not. Any ideas how do I solve this?
try to create new session and check again
Rank 2: Process
I did, but not working
Rank 2: Process
Could it be because of I'm currently on a different network rather than the one I use at home?
Rank 3: Container
Consider these suggestions:
- Clear your browser cache (or open your app in a new private browser window) which has no cache of cookies/session data.
- Log into your appwrite console and delete all sessions of the user you're trying to login as (console->auth->(click on user)->sessions->delete all
- If the user needs to access any collection make sure the appropriate permissions are granted.
- Try to login again
- If it fails again, check the user sessions in appwrite console to be sure the session was created. This will help start you off on where the problem could be.
Just my 2 cents.
Rank 2: Process
Hi Thank you for your time, I tried all the options, the sessions are being created correctly. But it's still not working
Rank 5: Hypervisor
Rank 5: Hypervisor
I am using flutter and I am also experiencing this error
Rank 5: Hypervisor
My login page was before was working properly, This is my first time to encountered this error in my login page
Rank 2: Process
Here is my code:
import { Account, Client } from "appwrite";import appwriteConf from "../config/appwriteConfig";
export class AuthService { client = new Client(); account;
constructor() { this.client .setEndpoint(appwriteConf.appwriteAPI) .setProject(appwriteConf.appwriteProjectId);
this.account = new Account(this.client); }
async signInWithGoogle() { try { return this.account.createOAuth2Session( "google", "http://localhost:5173/register", "http://localhost:5173/" ); } catch (error) { console.log(`Error while logging In: ${error}`); } }
async getUserInfo() { try { const session = await this.account.getSession('current'); console.log(session); return session; } catch (error) { console.log(`Error while Fetching user: ${error}`); } }}
const authService = new AuthService();
export default authService;Rank 3: Container
I know you're in a stressful situation but please don't tag core
Rank 2: Process
Okay okay
Rank 2: Process
I'll keep this in mind
Rank 3: Container
Which block throws the exception? Is it signInWithGoogle or getUserInfo? Also, can you try signing in with email and password?
Rank 2: Process
getUserInfo
Rank 3: Container
Okay
Rank 3: Container
Is 'current' your session id? Can you first try to list all sessions. Then pass the first session id into account.getSession?
Please create a separate post instead of using someone else's thread
Web Developer
Sorry, just seeing your response. Yes, I'm using appwrite cloud. And my permissions are set in collection
Would you please try clearing your cookies?
Web Developer
That fixed it, thank you!!