async getCurrentUser() { try { return await this.account.get(); } catch (error) { console.log("Appwrite serive :: getCurrentUser :: error", error); } return null; }
Are you using the project id when setting up the appwrite client
and is it the correct id for your project
Yes I used correct ID but they show an error
where are you getting the id from
can you show how your appwrite client is being initialized
constructor() { this.client .setEndpoint(conf.appwriteUrl) .setProject(conf.appwriteProjectID); this.account = new Account(this.client); }
where are you setting conf.appwriteProjectID?
can you show that and if you have it in your env show your env names
const conf = { appwriteUrl: String(import.meta.env.VITE_APPWRITE_URL), appwriteProjectID: String(import.meta.env.VITE_APPWRITE_PROJECT_ID), appwriteDatabaseID: String(import.meta.env.VITE_APPWRITE_DATABASE_ID), appwriteCollectionID: String(import.meta.env.VITE_APPWRITE_COLLECTION_ID), appwriteBucketID: String(import.meta.env.VITE_APPWRITE_BUCKET_ID) } export default conf;
I think you've probably mistyped something somewhere and it's not being included.
VITE_APPWRITE_URL="https://nyc.cloud.appwrite.io/v1" VITE_PROJECT_PROJECT_ID="688f08de002b9111ec5b" VITE_PROJECT_DATABASE_ID="688f09c4000c886d5ed6" VITE_PROJECT_COLLECTION_ID="688f15ab0026d9ad1b88" VITE_PROJECT_BUCKET_ID="688f1a70002aade68d11"
Yea, you don't have your variables right
VITE_PROJECT_PROJECT_ID != VITE_APPWRITE_PROJECT_ID
Ohhh Thank a lot
[SOLVED] Project ID not found
[SOLVED] Project with ID could not be found
Recommended threads
- education plan not activated
Hi I have an edu id 13103046@iubat.edu but when I am trying to claim my plan and trying to logging with github where education student plan active. the appwrite...
- 500 simultaneous OAuth logins from the s...
Hi, I'd like to ask about rate limiting around Google OAuth login on Appwrite Cloud. **OVERVIEW** Service type: A PWA (web app) for members of a university clu...
- Suspicious access pattern detected when ...
Hello, I am having trouble restoring my project. In the past it worked with no problems, but today I get an error "Suspicious access pattern detected". How can ...