FirebaseUI-Android
FirebaseUI-Android copied to clipboard
When trying to start a Google login flow on this specific device I get ERROCODE 10
Step 2: Describe your environment
- Android device: Redmi 6
- Android OS version: 9.0
- Google Play Services version: lastest release updated
- Firebase/Play Services SDK version: lastest release updated
- FirebaseUI version: updated
Step 3: Describe the problem:
When trying to start a Google login flow on this specific device I get ERROCODE 10.
When I click on google login, the flow appears, I click on the google account that I want to login and the error code 10 occurs to me.
Steps to reproduce:
- Click on flow
- Click on account
- Error is happened, this error: ErrorCodes.EMAIL_LINK_CROSS_DEVICE_LINKING_ERROR
Expected Results:
- What did you expect to happen? On other devices, such as the emulated S9 +, everything goes well and the login is carried out with complete success.
Relevant Code:
This code is the flow of logging with Google account on FirebaseAuth
protected void onStart() {
super.onStart();
GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);
if(account != null){
//Toast.makeText(getApplicationContext(), "User already logged", Toast.LENGTH_LONG).show();
}else{
//Toast.makeText(getApplicationContext(), "New User", Toast.LENGTH_LONG).show();
}
}
googleLogin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) { startActivityForResult(AuthUI.getInstance().createSignInIntentBuilder().setAvailableProviders(Collections.singletonList(new AuthUI.IdpConfig.GoogleBuilder().build())).build()
, REQUEST_LOGIN_GOOGLE); // This error occurs after this intent
}
});
Example of error occurred on Google Firebase Test Lab devices, error code 10.
Update:
I just implemented using EXACTLY the example on the Android library website, inserting my key in a String in the application, however, the error persists, some devices log in successfully, others occur this error incessantly, until then without correction.
I just noticed something else, my SHA1 key in firebase is DIFFERENT from my Play Console SHA1 key, can this conflict?
Two keys, one generated from Gradle and other generated from Play Console app Bundles
@LukeDaniel16 yeah this does sound like it could be a SHA1 issue, have you made sure all of those different SHA1 are in the Firebase console?
Error Code 10 is likely from Google Sign In, not FirebaseUI, where it means DEVELOPER_ERROR
:
https://github.com/googlesamples/google-services/issues/360
@LukeDaniel16 yeah this does sound like it could be a SHA1 issue, have you made sure all of those different SHA1 are in the Firebase console?
Error Code 10 is likely from Google Sign In, not FirebaseUI, where it means : googlesamples/google-services#360
DEVELOPER_ERROR
I have a sure that every SHA-1 was added on Firebase Console, i checked the SHA-1 on Android Studio Gradle and check on Play Console too, i linked the playstore app to firebase, the error still goes on ... I'm lost, this basically only occurs on Xiaomi devices...
I think the option that I use in Android Studio may be incorrect, when generating the Bundle I use the Generate Signed Bundle option, maybe I shouldn't generate the signed bundle because the bundle is already signed automatically by Google Play Console, right? So I should use Build Bundle.
Same problem... Currently i believe that problem is in Firebase Test Lab that can't use Google Credentials correctly.
@LukeDaniel16 did you download the right google-services.json
file and put it in app directory of your android app. When you add SHA in firebase console you have to download the latest google-services.json
from firebase and add it to your app for the app to recognize you.
Hi all, it looks like we do need to look into the exact SHA1s or credentials to help you further, and I'd suggest you reach out to Firebase Support instead, since it will be a bad idea to post credentials publicly on GitHub. Firebase Support can also help you with your project configuration.