I’m having a strange issue with Google sign in my app, done using FirebaseUI. I have added the 3 SHA-1 keys needed for OAuth in my Firebase Console (debug, release and app signing key), updated my google-services.json file and made sure everything in my Google API console matched. I can sign in using Google in my debug build, release build and Alpha testing build downloaded from the Play Store. However, when I run my app into Firebase Test lab the Google sign in fails and shows me a “code 10, message 10” error:
W/GoogleSignInHandler(10263): Developer error: this application is misconfigured. Check your SHA1 and package name in the Firebase console.
E/AuthUI(10263): A sign-in error occurred.
E/AuthUI(10263): com.firebase.ui.auth.FirebaseUiException: Code: 10, message: 10:
E/AuthUI(10263): at com.firebase.ui.auth.data.remote.GoogleSignInHandler.onActivityResult(GoogleSignInHandler.java:110)
E/AuthUI(10263): at com.firebase.ui.auth.ui.idp.AuthMethodPickerActivity.onActivityResult(AuthMethodPickerActivity.java:335)
at android.app.Activity.dispatchActivityResult(Activity.java:7266)
E/AuthUI(10263): at android.app.ActivityThread.deliverResults(ActivityThread.java:4264)
E/AuthUI(10263): at android.app.ActivityThread.handleSendResult(ActivityThread.java:4312)
E/AuthUI(10263): at android.app.ActivityThread.-wrap19(Unknown Source:0)
E/AuthUI(10263): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1644)
E/AuthUI(10263): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AuthUI(10263): at android.os.Looper.loop(Looper.java:164)
E/AuthUI(10263): at android.app.ActivityThread.main(ActivityThread.java:6494)
E/AuthUI(10263): at java.lang.reflect.Method.invoke(Native Method)
E/AuthUI(10263): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
E/AuthUI(10263): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Which is strange because if my app is misconfigured, Google sign in should also fail for myself and my users, but it doesn't.
And similarly when my app gets run through Google Play's pre-launch report it doesn't go through Google sign in successfully.
This is my code for the FirebaseUI sign-in screen:
public void showFirebaseUI() {
List<AuthUI.IdpConfig> providers = Arrays.asList(
new AuthUI.IdpConfig.GoogleBuilder().build(),
new AuthUI.IdpConfig.EmailBuilder().build(),
new AuthUI.IdpConfig.AnonymousBuilder().build());
AuthMethodPickerLayout customLayout = new AuthMethodPickerLayout.Builder(R.layout.firebase_ui_start_screen)
.setGoogleButtonId(R.id.firebase_google_sign_in_button)
.setEmailButtonId(R.id.firebase_email_sign_in_button)
.setAnonymousButtonId(R.id.firebase_anon_sign_in_button)
.setTosAndPrivacyPolicyId(R.id.TOS)
.build();
startActivityForResult(AuthUI.getInstance()
.createSignInIntentBuilder()
.setAuthMethodPickerLayout(customLayout)
.setAvailableProviders(providers)
.enableAnonymousUsersAutoUpgrade()
.setTheme(R.style.AppTheme)
.setIsSmartLockEnabled(false)
.build(),
RC_SIGN_IN);
}
So my question is how can the debug, release and Alpha Google Play Store builds work just fine for Google sign in for normal users, but fail for Test Lab and pre-launch report? My only theory is that these test accounts use the @cloudtestlabaccounts.com domain and not @gmail.com but I don't feel like that should affect things, @cloudtestlabaccounts is used for a reason.