-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Crash when trying signInWithEmailAndPassword with empty string #127
Comments
Thanks for the report,
|
Oh, further investigate this issue, and this issue is specific to Android. iOS works as the web SDK by outputting a message ".The email address is badly formatted."
If you think this is a problem, I can also investigate further investigate this issue :) |
Ok I see what you mean, looks like this is an inconsistency between the official firebase iOS and Android SDK's. As you can see from the below screenshots - ios when the email is empty correctly goes into the completion block. Android however throws an exception without event getting into the I'd suggest raising a support request with firebase and raise this inconsistency issue please - I'm sure they've had enough of me raising the issues =] You can use this issue and this comment in it as a reference. By the looks of it it's not just limited to this method on android either - I'd imagine methods such as iOSAndroidLet me know how the support request goes and if they plan on resolving this. Thanks |
@Salakar I reported this issue with a detailed message to Firebase support team through "Bug Report or Feature Request" channel. Keep you updated if there is a response! Thanks for your quick response. |
I am sharing here the response from Firebase team. In short, it was correct that the SDK was designed inconsistently. I will keep updating if there is any other news. Hi Jeungmin, My apologies for not getting back to you sooner. I tried to replicate the issue on our Firebase Android SDK, and I did encountered the same error. I have informed our engineers regarding this one and I'll update you once I have more information to share. Sincerely, |
I finally got the decision, which turned out that this issue should be handled RN wrapper level for the time being. Given that the motto of this wrapper is to mimic the behavior of the official web SDK, I think Android should prevent from crashing by this library. Any thoughts on this? "I have talked to our engineers. Here's our perspective regarding this one, the behavior that you're seeing was an explicit design choice made by the FirebaseAuth team. In general, these types of errors are ones that the developer such as yourself should be explicitly handling in all cases, so we fail proactively to let you know during development. As you mentioned, it's possible for you to resolve this at the RN wrapper level." |
@ohtangza If it was an explicit design choice made by the FirebaseAuth team, then why does the behaviour differ between iOS and Android? That's not aimed at you, but at them! I'm loathe to introduce platform specific handling because the SDKs throw an internal error rather than deal with the behaviour correctly. Can I suggest that you add some protection in your app to prevent a user being able to submit an empty username or password? This is a pretty standard user experience for any app that I've ever used, and certainly is what I'm doing with my apps... |
i had same issue and i did a temp fix where i went to the activity_login and add |
Hi @ohtangza, |
@ChkBuk this issue has been closed for almost 4 years and the feedback was in there. |
In Firebase Web SDK, it provides error response instead of an exception.
(We encountered this error after migrating from Web SDK to this
react-native-firebase
.)I think it is better it works same as the official SDK. Any thoughts?
The text was updated successfully, but these errors were encountered: