-
Notifications
You must be signed in to change notification settings - Fork 573
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
Auth error codes (at least) are locale-converted #2593
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Thanks for the report. I've filed b/185793543 to track this internally |
@malcolmdeck did you notice anything in your codebase that looked like this? I was enabling more lint rules in the react-native-firebase repo yesterday prepping to release the react-native bindings for the v28.x.x features here and I noticed that this might have been on our side? I think this is probably closable here unless you've actually found something Can always reopen if feedback from downstream users indicates it's still happening but I think I got it. Cheers! |
Glad you found what you thought it might be - I spend about an hour and a half looking around our codebase and didn't find anything, but I wasn't sure that I didn't miss it so I left this open. Thanks for tracking it down Mike :D |
[READ] Step 1: Are you in the right place?
Issues filed here should be about bugs in the code in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:
with the firebase tag.
google group.
of the above categories, reach out to the personalized
Firebase support channel.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
Switch your device locale to Turkish
Use an auth.signInWithEmailAndPassword but give it an invalid email
Check the error code - it will have the Turkish i-with-no-dots characters
This is problematic because you need to match multiple cases for the "same" error code (that differs only in the 'i' character)
Relevant Code:
Relevant downstream issue: invertase/react-native-firebase#3917
I think this is because the error code is being passed through a Locale sensitive method (like toLowerCase) while using the default locale instead of Locale.ROOT - I've had this problem before in Android code.
The messages might be localized but the codes should always be the same regardless of locale I think?
Not the most important thing but a quick grep of the auth code for Locale.getDefault() in context of error codes might turn it up quickly, and swapping that for Locale.ROOT might be one of the easier fixes ever, which is always satisfying.
Cheers
The text was updated successfully, but these errors were encountered: