New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FirebaseAuthPlugin: Error codes are not forwarded to Dart #18312
Comments
Good catch - thanks, @escamoteur. Adding @collinjackson. |
Similar to #13027 |
Difference is that for FirebaseAuth you get an exception on the Dart side but no error code |
After removing the 'google_sign_in' from dependencies, the error codes came back. EDIT: Update: without 'google_sign_in':
with 'google_sign_in':
|
This looks like a quick fix. @bparrishMines or @kroikie may be interested. |
If you encounter something like below, Try delete extra spacing, |
This issue has been moved to firebase/flutterfire#802. Any further collaboration will be done there. |
Obrigado MateusPalomo. |
Same issue. Any work around ? |
Still an issue. |
Hi all, |
please report here: firebase/flutterfire#802 |
@kroikie unfortunately the other thread got locked which I find pretty strange if this isn't fixed yet. I am pretty sure there was a PR with this fix from @slightfoot a long time ago |
I did fix this. But the FlutterFire migration work changed the error codes to the web sdk ones. Either way it could be a platform specific regression. @Salakar would know. |
cc @Ehesp |
How is this still fixed |
@muhammadsqln does it still not work? |
This is still a problem.. I'm following the very basic usage tutorial code on https://firebase.flutter.dev/docs/auth/usage but PlatformException is thrown and not catched in debug mode on VSCode which makes debugging basically unbearable. I'm not using google_sign_in |
What do you mean by that VS code isn't catching the PlatformException? did you enable break on all exceptions? |
Sorry, I meant the opposite xP I don't want VSCode to stop on PlatformException but it goes ahead and does it anyway... I'm running the code UserCredential userCredential;
try {
userCredential = await FirebaseAuth.instance.signInWithEmailAndPassword(email: email, password: password);
} on FirebaseAuthException catch (e) {
if (e.code == 'user-not-found') {
print('No user found for that email.');
} else if (e.code == 'wrong-password') {
print('Wrong password provided for that user.');
}
} on PlatformException catch(e) {
print(e);
} on an Android emulator from VSCode debug mode. I have "Break on All Exceptions" turned off, but when the code is called the debugger stops anyway on The error code is there, but something doesn't catch it.. |
Please create new issues on the FlutterFire repo so maintainers have visibility. This will not be seen/addressed here. |
if you hit continue it does not get caught int your 'on PlatformException'? |
Will do! |
No, it doesn't. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Hi,
I just found out that if an error happens on the FirebaseAuth side like "email already used" I will only get an
with errorCode = "exception" and an error message that isn't localized which isn't really helpful.
Looking at the Java side of the plugin made it obvious
The text was updated successfully, but these errors were encountered: