Development issue/problem:

I use Google Authorization Services to authenticate users who use my application. It worked for me when I just requested the information by e-mail.

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail().build() ;

Then I realized I also had to ask for an identifier to authenticate me on my back, so I did:

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(String.valueOf(R.string.server_client_id))
.requestEmail().build() ;

The problem is that I couldn’t log in after I made the changes. The status I get every time I try to log in is status{statusCode=unknown status code: 12501, resolution=null}.

I did some research and I found this note that says about the same thing. However, I did not make any of the errors mentioned by the respondents, oAuth Client ID in my web application development console:

And R.string.server_client_id is the first client-id of the image. The package names are of course correct in all posted messages, otherwise it wouldn’t work at all without token requests. Two people also suggested that the application needs to be signed in order to work, but Google’s documentation says that the debugging key also needs to work, and there is no point in forcing people to sign applications in order to debug them.

I spent hours trying to figure it out, but I couldn’t. What could be the problem? Ask here for any additional information I forgot to provide.

How can I solve this problem?

Solution 1:

Well, this is very embarrassing, but I understand:

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(AuthenticatedActivity.this.getResources().getString(R.string.server_client_id))
.requestEmail().build() ;

I sent him a resource ID instead of a Deferred Resource String.

Solution 2:

Of course, first make sure that your sha1 unlock key is correct or not. However, if this still doesn’t work and you are using Google Play 8.4.0 services (i.e. you are compiling com.google.android.gms:play-services:8.4.0), the problem can be solved by modifying the GoogleSignInOption object.
Instead:

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.requestIdToken(YOUR_WEB_API_ID.apps.googleusercontent.com)
.build() ;

You must use :

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestScopes(new Scope(Scopes.PLUS_LOGIN))
.requestScopes(new Scope(Scopes.PLUS_ME))
.requestEmail()
.build() ;

This solves the problem of statusCode=INTERNAL_ERROR OF statusCode=Error 12501 OR statusCode=Error 12500.
This gso object can then be used to create a GoogleApiClient as shown below:

mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this, this)
.addApi(Auth.GOOGLE_SIGN_IN_API,gso)
// ..addApi(More.API, null)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
// .addScope(Plus.SCOPE_PLUS_LOGIN)
.build() ;

For more details, please visit this site: Google login does not work on Android version

Solution 3:

Make sure to add the SHA-1 fingerprint for your signature (sharing) key in the Firebase console.

Find SHA1 keys: key tools -exportcert -list -v -alias -keystore

Add it to the Firebase console : Go to https://console.firebase.google.com, select Apply and then Settings.

Give here a description of the image

Solution 4:

In my project, I had a different applicationId in my gradle file than the package name in my manifest.xml, and that was the source of my problem.

The Android key I had to create had to have fqdn’s applicationId and NOT the name of the package (contrary to what Google says) to make it work for me.

I thought I’d leave it here just in case it saved somebody some time.

Solution No 5:

I had a problem when I accidentally used the client ID of the Android application instead of the webapp as requestIdToken() parameter.

You will need to use the Client ID webapp at this location. By default, it is called a web client (automatically created by the Google service).

Solution No 6:

Specify the signatureConfigures in your certificate file.

signingConfig {
config {
keyAlias ‘appalias’
keyPassword ‘hunter123’
storePassword ‘hunter123’
storeFile file (‘path/to/keystore.jks’)
}
} } } }

2. In the project tree (in Android Studio), go to the Build Type section and specify SignatureConfigs in the configuration settings.

Now clean up your project and remake it. That should be enough.

If the above does not work, you can only use the following as a last resort.
Try the first step, then build and test. If this doesn’t work, go to the next step and try to build again.

  1. Create a signed apk (with verified password).
  2. Before signing, check the file name of the keyboard and the name of the file you specify when signing the apk (in the android studio).
  3. Install the signed apk on the unit.
  4. Wait five minutes.
  5. Try googling it. If it’s still 12501, wait another five minutes. While I’m doing this on Gradle Sync.
  6. Try again. That should be enough.

Edit: Google has added an apk signature to the console. If you’ve already signed the apk, ignore it OR if you want to use it, be careful as it may interfere with your current Google connection settings.

Solution No 7:

Androidmanifest.xml is located outside the box. So you get error 12501

Solution No 8:

Have you already put your signatureProperties and building types in your cradle? I corrected that by explicitly mentioning these things in gradation. Read here http://developer.android.com/tools/publishing/app-signing.html

Solution No 9:

I had the same problem. The problem was that I had selected the wrong project API and thus the wrong web client key. Apparently, two OAuth2 client-server IDs were created in my two API projects while I was trying to run the demo application.

Type of configuration

Solution No 10:

I had a similar problem. In my case, it’s because the client ID of the server I used came from a different project than the client keys. It turns out they must be from the same project.

Good luck!

google sign in error 12500 android,google-signin developer error 10,android google signin error,google sign in error code 10 android,googlesigninstatuscodes,apiexception 10 google sign in,error logging in with google 10 null,google login error android,12500 error google login ionic,google sign in failed in release android