Back

Appwrite error on Deployment. on Localhost working fine

  • 0
  • Databases
  • Web
  • Cloud
LAKSHYA
4 Feb, 2024, 08:54

when i am testing my website everything is going good not errors but after deployment on only my Profile page i cannot get the value from the profile collection and also cannot update the value when i am doing that the error in the provided image is shown.

this is my appwrite setup code for update profile // update profile async updateProfile(id:string,{ name, email, ownerId, status, about, interest, }: CreateProfile) { try { return await this.databases.updateDocument( conf.appwriteDatabaseId, conf.appwriteProfileCollectionId, id, { name, email, ownerId, status, about, interest, } ); } catch (error) { console.error("appwrite service :: updateProfile :: ", error); // error thrown return false; } }

what to do i cannot figure out why it is. not showing any error on localhost why only on deployment

TL;DR
Issue: Cannot get or update value from profile collection after deployment, despite working fine on localhost. Solution: The error may originate from the provided code snippet for updating the profile. Follow these steps to troubleshoot the issue: 1. Check if the appwrite setup and configuration are correctly implemented for deployment. 2. Ensure that the profile collection ID and database ID in the updateProfile function match the ones set up in the appwrite configuration. 3. Verify that all the required parameters (name, email, ownerId, status, about, interest) are present and correctly passed to the updateProfile function. 4. Use console.log statements to debug and
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more