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
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...
- Collections list not showing up when try...
I'm trying to create new relationship attribute but both one way and two way relationship is not showing up collections list to connect with my relationship att...
- I have try to use the appwrite in to the...
Invalid Origin. Register your new client (oailedjdbkhlkakmnnapoonllbnfmfij) as a new Web (Chrome Extension) platform on your project console dashboard