
hi i am geeting this error but the problem is that they coreectly working on localhost
but when switch to deployement and then a also change the url of web app on appwrite but getting this while authentication
here the code
API_ENDPOINT = "https://cloud.appwrite.io/v1" API_PROJECT_ID = "xxxxx" API_DATABASE_ID = "xxxxx" API_COLLECTION_ID = "xxxxx" REDIRECT_GOOGLE_AUTH = "xxxxxxx" FAILURE_ON_GOOGLE_AUTH = "xxxxxxx"
import { Client, Account, Databases, Storage } from 'appwrite';
export const client = new Client();
client
.setEndpoint(${process.env.API_ENDPOINT}
)
.setProject(${process.env.API_PROJECT_ID}
);
export const account = new Account(client); export const databases = new Databases(client); export const storage = new Storage(client); export { ID } from 'appwrite';
getCurrentUser : async () => { try { console.log("db ps", process.env.API_DATABASE_ID,) const res = await account.get(); if(res){ console.log(res) set({ userData: { userStatus: res.status, userID: res.$id, userEmail: res.email, userName: res.name, }, }); } } catch (error) { console.log("error on getting current user ",error) } },

this error geeting
TypeError: Failed to construct 'URL': Invalid URL at vY.<anonymous> (index-B2QdyW3V.js:302:24618) at Generator.next (<anonymous>) at index-B2QdyW3V.js:302:17993 at new Promise (<anonymous>) at Mt (index-B2QdyW3V.js:302:17790) at vY.get (index-B2QdyW3V.js:302:24558) at getCurrentUser (index-B2QdyW3V.js:306:645) at index-B2QdyW3V.js:889:14815 at nv (index-B2QdyW3V.js:40:24283) at E0 (index-B2QdyW3V.js:40:42409)
Recommended threads
- Vite build permission failed
im trying to deploy a react site using appwrite sites and it keeps failing to build ```2025-08-10T20:20:15.168371867Z [20:20:15] [open-runtimes] Environment pr...
- How to proper delete a serverless functi...
I tried `appwrite functions delete --function-id 12345`, it deletes the online one, but even after trying `appwrite pull functions`, the local one in the appwri...
- Do I have to manually change the endpoin...
The CLI never changes the json file, for example: ```bash appwrite client --endpoint https://url --project-id my-project --key standard_12345 ```` I do not k...
