baumblatt / capacitor-firebase-auth

Capacitor Firebase Authentication Plugin
MIT License
261 stars 129 forks source link

Cannot sign in with google on build version of android only #113

Closed seanaye closed 4 years ago

seanaye commented 4 years ago

I'm using this guide on how to compile quasar capacitor apps for the play store. I cannot sign in with google in the build version of the android app, even after signing the apk as per the instructions.

When I try to sign in with google in the build version the dialog opens up, i can tap on my google account, the dialog closes and nothing happens. I cannot remote inspect the build version with chrome to get any logs (webview doesn't appear in remote debug with build version). The best I can do for logs is the logcat in Android Studio when running the app.

2020-09-15 23:18:22.560 25829-25829/? E/Capacitor/Plugin: Google Sign In failure.
    com.google.android.gms.common.api.ApiException: 12501: 
        at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(com.google.android.gms:play-services-base@@17.1.0:4)
        at com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(com.google.android.gms:play-services-auth@@18.0.0:9)
        at com.baumblatt.capacitor.firebase.auth.handlers.GoogleProviderHandler.handleOnActivityResult(GoogleProviderHandler.java:85)
        at com.baumblatt.capacitor.firebase.auth.CapacitorFirebaseAuth.handleOnActivityResult(CapacitorFirebaseAuth.java:173)
        at com.getcapacitor.Bridge.onActivityResult(Bridge.java:771)
        at com.getcapacitor.BridgeActivity.onActivityResult(BridgeActivity.java:216)
        at android.app.Activity.dispatchActivityResult(Activity.java:8110)
        at android.app.ActivityThread.deliverResults(ActivityThread.java:4838)
        at android.app.ActivityThread.handleSendResult(ActivityThread.java:4886)
        at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
2020-09-15 23:18:22.646 25829-25829/? E/Capacitor/Console: File: http://localhost/js/vendor.js - Line 435 - Msg: Uncaught Error: Google Sign In failure.

This is the only relevant error message I see. The app is being signed and the signing key is in my google play console. But I am fairly sure this is a signing issue since the debug version on android works perfectly.

If you would like to try the app for yourself you can find it on google play store. Once downloaded click profile on bottom right and try to sign in with google.

seanaye commented 4 years ago

Google play console had the correct release SHA1 fingerprint but firebase only had the debug one