I am prototyping an app which uses the user's Google Account. This is how I request it:
GoogleSignInOptions signInOptions =new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestScopes(new Scope(SheetsScopes.SPREADSHEETS))
.requestEmail()
.build();
GoogleSignInClient client = GoogleSignIn.getClient(context, signInOptions);
Additionally I did the following:
- Added the app in Google Clout Platform with debug SHA1. The app will not be release in Play Store, so I don't care for release SHA1.
- Added my support E-Mail and Logo for the consent screen. The app is set as external
- Created Firebase project
The whole thing works for my developer account which I have on the device. I log in and later I am able to consume the account.
However, when I install the very same app on another device, which has different Google Account, I get ApiException 12500:
2021-08-03 13:13:28.775 24691-24691/com.ribui.pom24 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.ribui.pom24, PID: 24691 java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=0, data=Intent { (has extras) }} to activity {com.ribui.pom24/com.ribui.pom24.app.MainActivity}: com.google.android.gms.tasks.RuntimeExecutionException: com.google.android.gms.common.api.ApiException: 12500: at android.app.ActivityThread.deliverResults(ActivityThread.java:4324) at android.app.ActivityThread.handleSendResult(ActivityThread.java:4367) at android.app.ActivityThread.-wrap19(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1649) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) Caused by: com.google.android.gms.tasks.RuntimeExecutionException: com.google.android.gms.common.api.ApiException: 12500: at com.google.android.gms.tasks.zzw.getResult(com.google.android.gms:play-services-tasks@@17.2.1:3) at com.ribui.pom24.app.MainActivity.onActivityResult(MainActivity.java:171) at android.app.Activity.dispatchActivityResult(Activity.java:7235) at android.app.ActivityThread.deliverResults(ActivityThread.java:4320) at android.app.ActivityThread.handleSendResult(ActivityThread.java:4367) at android.app.ActivityThread.-wrap19(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1649) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) Caused by: com.google.android.gms.common.api.ApiException: 12500: at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(com.google.android.gms:play-services-base@@17.6.0:3) at com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(com.google.android.gms:play-services-auth@@19.2.0:3) at com.ribui.pom24.app.MainActivity.onActivityResult(MainActivity.java:161) at android.app.Activity.dispatchActivityResult(Activity.java:7235) at android.app.ActivityThread.deliverResults(ActivityThread.java:4320) at android.app.ActivityThread.handleSendResult(ActivityThread.java:4367) at android.app.ActivityThread.-wrap19(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1649) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 2021-08-03 13:13:32.808 24691-24691/com.ribui.pom24 E/FirebaseCrashlytics: Error handling uncaught exception java.util.concurrent.TimeoutException at com.google.firebase.crashlytics.internal.common.Utils.awaitEvenIfOnMainThread(Utils.java:122) at com.google.firebase.crashlytics.internal.common.CrashlyticsController.handleUncaughtException(CrashlyticsController.java:231) at com.google.firebase.crashlytics.internal.common.CrashlyticsController$1.onUncaughtException(CrashlyticsController.java:154) at com.google.firebase.crashlytics.internal.common.CrashlyticsUncaughtExceptionHandler.uncaughtException(CrashlyticsUncaughtExceptionHandler.java:54) at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068) at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1063) at java.lang.Thread.dispatchUncaughtException(Thread.java:1953) 2021-08-03 13:13:33.015 24691-24691/com.ribui.pom24 I/Process: Sending signal. PID: 24691 SIG: 9
I tried to add this second account as test user (though I would like to avoid setting users) but it is a still no go.
Any idea what I am missing?