React Developer
i am currently facing an issue that didn't appear except few days back now, and so far i've tried and can't fix it
i created a platform integration using my applicationId from android/app/build.gradle
after doing a prebuild as i've changed the package name few commits back in the project.
doing few logs to check where the issue is coming from
async function login(email: string, password: string): Promise<void> {
try {
console.log("logging");
const result = await account.createEmailPasswordSession(email, password);
console.log(result);
await new Promise((resolve) => setTimeout(resolve, 500));
console.log("getting user details");
const userDetails = await account.get(); //stops here and throws the error
console.log("user details acquired");
initializeUserId(userDetails.$id);
setUser(userDetails as User);
console.log(user);
ToastGlue("Welcome back. You are logged in");
} catch (error) {
//console.error("Login error:", error);
ToastGlue("Login failed. Please check your credentials.");
throw error;
}
}