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
- self-hosted auth: /v1/account 404 on saf...
Project created in React/Next.js, Appwrite version 1.6.0. Authentication works in all browsers except Safari (ios), where an attempt to connect to {endpoint}/v1...
- delete document problems
i don't know what's going on but i get an attribute "tournamentid" not found in the collection when i try to delet the document... but this is just the document...
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...