🐛 Describe the bug
I’m unable to reliably sign up or log in to the app.
When trying to create an account or log in with an existing one, the app sometimes silently fails and returns to the landing screen instead of continuing to onboarding/home.
From debugging, it looks like there may be a race condition in the auth flow:
AppwriteService.getAccount() can be called before the Appwrite client is initialized
- splash screen navigation may happen before auth state checking finishes
- FCM token update logic during login may also interrupt the flow
Steps to reproduce
- Open the app
- Try creating a new account
- Or log in with an existing account
- Observe that auth does not complete properly and navigation resets
Observed result
- Login/signup does not consistently succeed
- User may get redirected back to landing
- Session appears to be created sometimes, but auth state/navigation does not complete correctly
Relevant code path
await account.createEmailPasswordSession(
email: email,
password: password,
);
await isUserLoggedIn();
There also seems to be an issue where getAccount() accesses _client before initialization is complete.
No clear UI error is shown, so the failure is mostly silent.
🐛 Describe the bug
I’m unable to reliably sign up or log in to the app.
When trying to create an account or log in with an existing one, the app sometimes silently fails and returns to the landing screen instead of continuing to onboarding/home.
From debugging, it looks like there may be a race condition in the auth flow:
AppwriteService.getAccount()can be called before the Appwrite client is initializedSteps to reproduce
Observed result
Relevant code path
There also seems to be an issue where
getAccount()accesses_clientbefore initialization is complete.No clear UI error is shown, so the failure is mostly silent.