
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
- Error 1.7.4 console team no found
In console when i go to auth, select user, select a membership the url not work. Only work searching the team. It is by the region. project-default- and i get ...
- functions of 1.4 not work on 1.7
Hi, i updated of 1.4 to 1.7 but the function not work i get it error. Do I need to build and deploy the functions again?
- Login Error 500
Hey i have that Problem, i upgrade to the latest version and now i have this error but only on my custom domain not the main domain.. when i try to login
