codelab-friendlychat-web: Sign-in Failed - Android

While trying to sign-in, I keep getting the following error. E/SignInActivity: Google Sign In failed. Status{statusCode=unknown status code: 12501, resolution=null}, null I suspect it’s the GoogleSignInOptions requestIdToken() method causing the issue. I changed the string passed as the default_web_client_id to the credentials of server key auto generated in Google APIs credentials. That doesn’t seem to work either.

Am I missing something, or doing something wrong?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 17 (3 by maintainers)

Most upvoted comments

Same error. Any headway?

EDIT: After several hours of looking for a solution, it turns out I had two debug.keystore files and I had tried with both SHA1 values but I dunno whether the app wasn’t updating each time I switched. Anywho, the easiest way to find your actual SHA1 is to do what this video says: https://www.youtube.com/watch?v=m_9tk7ME4ZU

[Basically, in Android Studio, open the Gradle menu on the far right, open android-start from the drop down (refresh if nothing is showing), open Tasks, open android, double click signingReport. ]

Get your SHA1 key from there, and go create a new Firebase project and in the console, use that SHA1 key after clicked “Add firebase to Android”… follow the tutorial from there. Restart your device, and tadaa.

At least for me, it worked, and I’d been at it for hours.

Well finally login , make a new project, after get the sha1 code in Gradle->Android-start->Tasks->singningReports, put the new google-services.json on src folder and uninstall app … Run the project! and voilà , happy coding!

The blogpost you’ve written helped me a lot. I’ve generated new keystore and now it works! Thank you.