8

I am trying to integrate Google Sign in to my application, but I get errors that I cannot understand.

I have configured everything according to the tutorial here, but it would not authenticate me. I am presented with the login panel that shows my accounts, and the login activity OnActivityResult fires, when looking into the GoogleSignInResult, I have a Status with a statusCode 8 and no message.

It seems to be related to this, but it is a bit confusing.

Any idea ?

jmc34
  • 810
  • 3
  • 10
  • 22
  • 2
    Does this help? http://stackoverflow.com/a/35050443/5001016 – Steven Feb 06 '16 at 06:05
  • Many thanks Steven, that did nail it indeed! For some reason I thought that 1)you could only have one Android credential line, 2)the debug certificate would be dealt with by Google "by magic"... I got proven wrong, but you put me back on the right track. – jmc34 Feb 06 '16 at 14:18
  • Steven, if you want to re post your comment as an answer, I'll happily accept it. – jmc34 Feb 06 '16 at 14:19

2 Answers2

7

Check out the answer to this question: An INTERNAL_ERROR (8) occurred when requestEmail from GoogleSignInOptions on Android

If you get error code 8 (INTERNAL_ERROR), please double check your app registration in dev console. Note that every registered Android client is uniquely identified by the (package name, Android Signing Certificate SHA-1) pair. If you have multiple package names / signing certificate for your debug and production environments, make sure to register every pair of them. To verify:

  1. Open the Credentials page and select your project
  2. Make sure every pair has an Android typed OAuth 2.0 client IDs. To create a new OAuth 2.0 client ID for your Android client, select New Credentials->OAuth2 Client ID from the dropdown, select Android and input your Package name / Signing-certificate fingerprint there.

To get your signing key certificate SHA-1:

Standard Debug Key keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

Other (Custom) Key keytool -list -v -keystore $YOUR_KEYSTORE_LOCATION

Community
  • 1
  • 1
Steven
  • 3,812
  • 23
  • 38
  • 7
    Even after adding SHA-1 pair added to dev console. I am still seeing INTERNAL ERROR. Attempt to save credential failed null 8 Resolving: Status{statusCode=INTERNAL_ERROR, resolution=null} STATUS: FAIL – Subba Aug 10 '16 at 18:35
0

Good day. I ran into a similar problem and spent 1.5 days solving it.

Tips to help you:

  1. First check valid the package name and fingerprint SHA1.
  2. If your application did not pass verification and was not released, then make sure that the user to be authorized is in the list of testers (this can be checked in APIs & Service -> OAuth consent sreen -> Test users)
  • There is a suspicion that all letters in the package name in android studio should be lowercase.

In my case, it helped to create a new project, transfer old files to it, and create a new OAuth Client IDs.