I have a flutter app.
Appwrite version for the flutter client - appwrite client: 12.0.3, on the self-hosted server - Version 1.5.7.
When trying to log in with an error on an android device (for example, an invalid password), the error is returned, but if I want to get an error when logging in via an iOS device, the code freezes in the place that I indicated. Please help me
Future<Session> createEmailSession(
{required String email, required String password}) async {
notifyListeners();
try {
//this line is stuck
final session = await account.createEmailPasswordSession(
email: email, password: password);
//end
_currentUser = await account.get();
_status = AuthStatus.authenticated;
return session;
} finally {
notifyListeners();
}
}
And here is the code that handles the exception:
Future<void> signIn() async {
if (loading) {
return;
}
setState(() {
loading = true;
});
await showLoadingDialog();
try {
//here
await user.createEmailSession(
email: emailTextController.text,
password: passwordTextController.text,
);
//end
showSnackbar('Success login');
context.pushReplacement('/');
} on AppwriteException catch (e) {
showAlert('Error', e.message.toString());
} finally {
Navigator.pop(context);
setState(() {
loading = false;
});
}
}
Recommended threads
- coolify docs dont help installing latest...
coolify has older version of appwrite, how do i install latest version of appwrite
- 500 Internal Error when Project is opene...
After migrating from 1.6.1 to 1.7.4 I noticed this strange behaviour: When I open a project in a separate tab I get a 500 internal error. However, then I simpl...
- Console regressions: DateTime and Filter
After migrating from 1.6.1 to 1.7.4 I noticed this strange behaviour in the console: - Active filters are no longer displayed. The Tabs shows the correct numbe...