question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android Error on Google Sign In

See original GitHub issue

here is the logcat said:

2020-05-16 22:42:54.137 1950-1950/com.lesjaw.astropasaraya E/Capacitor/Plugin: Something went wrong
    com.google.android.gms.common.api.ApiException: 10: 
        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.codetrixstudio.capacitor.GoogleAuth.GoogleAuth.handleOnActivityResult(GoogleAuth.java:71)
        at com.getcapacitor.Bridge.onActivityResult(Bridge.java:765)
        at com.getcapacitor.BridgeActivity.onActivityResult(BridgeActivity.java:211)
        at android.app.Activity.dispatchActivityResult(Activity.java:7454)
        at android.app.ActivityThread.deliverResults(ActivityThread.java:4353)
        at android.app.ActivityThread.handleSendResult(ActivityThread.java:4402)
        at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
2020-05-16 22:42:54.138 1950-1950/com.lesjaw.astropasaraya D/Capacitor: Sending plugin error: {"save":false,"callbackId":"115071079","pluginId":"GoogleAuth","methodName":"signIn","success":false,"error":{"message":"Something went wrong"}}
2020-05-16 22:42:54.145 1950-1950/com.lesjaw.astropasaraya D/Capacitor/App: Firing change: true
2020-05-16 22:42:54.146 1950-1950/com.lesjaw.astropasaraya D/Capacitor/App: No listeners found for event appStateChange
2020-05-16 22:42:54.166 1950-1950/com.lesjaw.astropasaraya D/Capacitor: App resumed

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

1reaction
DaveRichocommented, May 18, 2020

I think I got mine working - I’m still confused as to what worked by I think it was this (from https://github.com/googlesamples/google-services/issues/360):

This error might happen if you are not using same project at console.developers.google and console.firebase.google.com. If project is same at both console make sure you have add your SHA1 Key properly. Get SHA1 from Android studio.

Open Android Studio Open your Project Click on Gradle (From Right Side Panel, you will see Gradle Bar) Click on Refresh (Click on Refresh from Gradle Bar, you will see List Gradle scripts of your Project) Click on Your Project (Your Project Name form List (root)) Click on Tasks Click on Android Double Click on signingReport (You will get SHA1 and MD5 in Run Bar(Sometimes it will be in Gradle Console))

I then went back to https://console.developers.google.com/apis/credentials and added a new “OAuth 2.0 Client ID” for android and pasted the SHA1 that I got from Android Studio. It then seemed to work on the android phone I am using for testing.

Not sure about you, but I found this very confusing!

0reactions
Jmiguel14commented, Aug 16, 2021

I had the same problem, it was a mess but I was able to resolve it thanks to this comment, so useful: https://github.com/CodetrixStudio/CapacitorGoogleAuth/issues/15#issuecomment-515935930

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't sign in to your Google Account - Android Help
If you can't sign in to your Google Account in Gmail, Google Drive, Google Play, or elsewhere, select the issue that most closely...
Read more >
How To Fix Google Sign In Error On Android
The first trick is to go to the main Settings menu of your phone and then the accounts and sync and simply delete...
Read more >
How To Fix Google Sign In Error On Android | 01 - Vocal Media
The error may simply be a login issue that sometimes occurs when updating the Play Store. The first trick is to go to...
Read more >
Google sign-in error on android phone - Error Solutions
"Google sign-in error on android phone" may also occur if your Google account has been desynchronized with your Android device. This is common ......
Read more >
Unable to add Google account to Samsung phone or tablet
It's possible that you are doing the steps incorrectly, have accidentally denied access to your device, or have 2-Step Verification enabled for Google....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found