
This is usually due to permissions. Are you using Appwrite cloud?

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 <#1072905050399191082> 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

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

I did, but not working

Could it be because of I'm currently on a different network rather than the one I use at home?

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.

Hi Thank you for your time, I tried all the options, the sessions are being created correctly. But it's still not working


I am using flutter and I am also experiencing this error

My login page was before was working properly, This is my first time to encountered this error in my login page

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;

I know you're in a stressful situation but please don't tag core

Okay okay

I'll keep this in mind

Which block throws the exception? Is it signInWithGoogle
or getUserInfo
? Also, can you try signing in with email and password?

getUserInfo

Okay

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

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?

That fixed it, thank you!!
Recommended threads
- Need help setting up this error is showi...
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy. If you're the app developer, register the redirect URI in the Google Cl...
- Appwrite stopped working, I can't authen...
I'm having an issue with Appwrite. It was working fine just a while ago, but suddenly it stopped working for me and can't authenticate accounts. I even went bac...
- Fail to receive the verification email a...
I added my email address to prevent it from showing "appwrite," but now I'm not receiving emails for verification or password resets. The function appears to be...
