Google-signin: A non-recoverable sign in failure occurred code 12500

Created on 10 Oct 2018  Â·  61Comments  Â·  Source: react-native-google-signin/google-signin

I am using

I got this error when signIn

{ [Error: A non-recoverable sign in failure occurred] framesToPop: 1,
code: '12500', line: 21326, column: 31, sourceURL: 'http://localhost:8081/index.delta?platform=android&dev=true&minify=false' }

I tried add and remove SHA1 then redownload google-service.json for both setting, still same error.

I tried client ID for web application and android client, both getting same error.

This is my google sign in code

GoogleSignin.configure({
          webClientId: 'xxxxxxx.apps.googleusercontent.com', offlineAccess: true,
        })
  GoogleSignin.hasPlayServices()
  .then(() => {

      GoogleSignin.signIn()
      .then((user) => {
        console.log(user);

      })
      .catch((err) => {
        if(err.code === 'CANCELED')
        {
          console.log('glogin canceled', err.code);
          dispatch(loginFailure(null))
        }
        else{
          console.log('error', err);
        }
      });
  }).catch(err => {
    console.log('Play services error', err.code, err.message);
  });

any idea what cause the error?

needs repro / repro steps

Most helpful comment

I got stuck on this one for several days until I figured how what was wrong.
I relay with most of the situation described above :

  • Works fine in debug/local
  • If I build the release package and install it through adb install it works fine
  • If I check the SHA1 of the package/keystore, everything is in order and matches the config in Firebase and the google-services.json
  • And then, once deployed in beta or released on the store : the google signin fails miserably...

And I noticed that in the App signing part of the Google Play account :
screenshot from 2018-10-26 12-18-57

I checked the play account (important thing to mention at this point : I did not configure the play account) : And sure enough, my package was being RE-SIGNED by google play certificate...

When you go to the Release Management > App Signing, you will see the SHA1 of the keystore being used by Google after yours. Pick it, paste it in Firebase, update your google-services.json file, redeploy and VOILA !

I really hope this help others to avoid all the hair pulling I've been doing these last few days :D

All 61 comments

Facing the same issue here !! :/

Hi @cafeasia3 what's the URL that you referenced ? Currently it's pointing to https://github.com/react-native-community/react-native-google-signin/issues/url

Experiencing this issue too

Anyone found a solution ? im getting this same error when i generate a release build , debug works just fine

@YazeedAsaad release need another sha1 you can find it console.play.store

I got stuck on this one for several days until I figured how what was wrong.
I relay with most of the situation described above :

  • Works fine in debug/local
  • If I build the release package and install it through adb install it works fine
  • If I check the SHA1 of the package/keystore, everything is in order and matches the config in Firebase and the google-services.json
  • And then, once deployed in beta or released on the store : the google signin fails miserably...

And I noticed that in the App signing part of the Google Play account :
screenshot from 2018-10-26 12-18-57

I checked the play account (important thing to mention at this point : I did not configure the play account) : And sure enough, my package was being RE-SIGNED by google play certificate...

When you go to the Release Management > App Signing, you will see the SHA1 of the keystore being used by Google after yours. Pick it, paste it in Firebase, update your google-services.json file, redeploy and VOILA !

I really hope this help others to avoid all the hair pulling I've been doing these last few days :D

I am using

  • "react-native": "0.52.0",
  • "react-native-google-signin": "^0.12.0",
  • classpath 'com.android.tools.build:gradle:2.1.2'
  • classpath 'com.google.gms:google-services:3.0.0'

i am still unable to login with google

this is my code

_handleLogin = async () => { 
    await GoogleSignin.configure();
    await GoogleSignin.hasPlayServices({ autoResolve: true });
    GoogleSignin.signIn()
      .then(user => {
        console.log(user);
        const credential = firebase.auth.GoogleAuthProvider.credential(
          user.idToken,
          user.accessToken
        );
        temp_response = {
          id: user.id,
          email: user.email,
          gender: user.gender ? user.gender : "male",
          name: user.name,
          birthday: user.birthday ? user.birthday : "7/16/1987",
          picture_url: user.photo,
          login_type: "google"
        };
        frAuth(credential).then(async () => {
          await setUserLoginType("google");
          await setUserToken(user.accessToken);
          await registerAPI(temp_response);
          await setUserDataStorage(temp_response);
          await initFCMToken();

          // trigger to get all user data from updated asyncstorage and set to redux
          await this.props.rdRefreshUserData();

          this.props.globalLoading(false);
          this.props.navigation.navigate("Main");
        });
      })
      .catch(err => {
        console.log("WRONG SIGNIN", err);
      })
      .done();
  };

and then this is da error
WRONG SIGNIN Error: A non-recoverable sign in failure occurred at new GoogleSigninError (GoogleSignin.android.js:55) at GoogleSignin.android.js:131 at RCTDeviceEventEmitter.emit (EventEmitter.js:181) at MessageQueue.__callFunction (MessageQueue.js:353) at MessageQueue.js:118 at MessageQueue.__guardSafe (MessageQueue.js:316) at MessageQueue.callFunctionReturnFlushedQueue (MessageQueue.js:117) at t (RNDebuggerWorker.js:1)

what i was doing

  1. remove all SHA1 fingerprint on firebase and create new keystore and add again on Setting > project setting (not work)
  2. add configure options = { webClientId: , offlineAccess: true} (not work)

this is run on debug mode, i am still develop so dont testing on release yet.

Please see http://developerextensions.com/help/230-Google-signin-returns-12500,-12501-error-code-

i was doin that on point 1, so i was add my keystore SHA1 fingerprint to > firebase, and generate new google-services.json

and the params
google-services.json
```
{
"client_id": ".apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.",
"certificate_hash": ""
}
},

so this is my **gradle.properties**

android.useDeprecatedNdk=true
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
MYAPP_RELEASE_STORE_PASSWORD=*
MYAPP_RELEASE_KEY_PASSWORD=
*

```

and path to my keystore ./android/app/my-release-key.keystore

3 or 5 month ago this problem not show, idk why this bug showed this month

Nope, I was doing that too on point 2.

whoever is using debug.keystore and did all config but still not working check your SHA1 signature whether you are using correct signature .
I have faced in windows .
in official document keystore is located in %USERPROFILE%.androiddebug.keystore location .
but my app is not using that keystore is it using different which is located at : %USERPROFILE%AppData\LocalAndroid\Sdk.androiddebug.keystore .
better take SHA1 signature from Android studio. (this Link may help : https://aboutreact.com/getting-sha1-fingerprint-for-google-api-console/).

hope that helps

any updates? Still facing same issue

i am facing the same issue, even in debug/local.
error= Error: A non-recoverable sign in failure occurred
error code = 12500

i have checked certificate_hash in googleServices.json is same as hash in firebaseconsole.
application id is also same. plz help me

I found a related solution, you must add the SHA-1 certificate fingerprint from App Signing Certificate to Firebase fingerprints.

image

image

That's all, the Google SignIn authentication is done without an error 12500!

sir, thanks sir, you came for help. sir, can you plz send the link that
from where i can get APP SIGNING CERTIFICATE.

On Tue, Dec 25, 2018 at 9:36 PM cjjabc7 notifications@github.com wrote:

I found a related solution, you must add the SHA-1 certificate fingerprint
from App Signing Certificate to Firebase fingerprints.

[image: image]
https://user-images.githubusercontent.com/12590081/50424474-7244a880-0832-11e9-9d9f-65cfa3c7c034.png

[image: image]
https://user-images.githubusercontent.com/12590081/50424595-a4570a00-0834-11e9-8cad-f568414e685b.png

That's all, the Google SignIn authentication is done without an error
12500!

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/react-native-community/react-native-google-signin/issues/543#issuecomment-449860444,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Aqkqhltu3dyYe5oAy6feBQJpgsaH5UZQks5u8k0KgaJpZM4XVGhP
.

and sir, i am facing this issue. in even in debug mode. sir plz help me.

On Wed, Dec 26, 2018 at 10:10 AM neeraj kalra neeraj.emilence@gmail.com
wrote:

sir, thanks sir, you came for help. sir, can you plz send the link that
from where i can get APP SIGNING CERTIFICATE.

On Tue, Dec 25, 2018 at 9:36 PM cjjabc7 notifications@github.com wrote:

I found a related solution, you must add the SHA-1 certificate
fingerprint from App Signing Certificate to Firebase fingerprints.

[image: image]
https://user-images.githubusercontent.com/12590081/50424474-7244a880-0832-11e9-9d9f-65cfa3c7c034.png

[image: image]
https://user-images.githubusercontent.com/12590081/50424595-a4570a00-0834-11e9-8cad-f568414e685b.png

That's all, the Google SignIn authentication is done without an error
12500!

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/react-native-community/react-native-google-signin/issues/543#issuecomment-449860444,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Aqkqhltu3dyYe5oAy6feBQJpgsaH5UZQks5u8k0KgaJpZM4XVGhP
.

@kalraneeraj24550 if you have uploaded your app on play store you can get this sha-1 keys as @cjjabc7 has done otherwise you have to add to firebase sha-1 keys. write in terminal "keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android". second one is working only debug mode

i haven't uploaded the project on the play store. and i have already added SHA1 in firebase project.

i am getting this error in debug mode. i have deleted current sha-1 present in firebase. then i regenerate certificate key and updated googleservices.json. still facing the error. i dont know where am lacking.
Anyone please help me..

i have solved it by having sha-1 from android studio not by command line

I am facing the same issue, even in debug/local.
Error: A non-recoverable sign-in failure occurred 12500

i did two steps to solve this error.

  1. i get sha-1 from android studio and paste it on firebase console and redownloaded google-services.json.
  2. i configured it by android client id instead of web client id. this worked for me.

My issue was a wrong webClientId in react native code.

I solved by referring http://developerextensions.com/help/230-Google-signin-returns-12500,-12501-error-code-

Copied Client ID of Web Client under OAuth 2.0 client IDs
https://console.developers.google.com/apis/credentials

My Configure now looks like

GoogleSignin.configure({
          webClientId: '888888888888-0eeee74ee19ee6eeeeeeeeeeeheekefe.apps.googleusercontent.com', 
          offlineAccess: true
})

i did two steps to solve this error.

  1. i get sha-1 from android studio and paste it on firebase console and redownloaded google-services.json.
  2. i configured it by android client id instead of web client id. this worked for me.

@kalraneeraj24550 i've already follow your steps, but i'm still get same error message... :(

also enable "google drive" api on google developer console

On Tue, Feb 5, 2019 at 5:50 PM arjunsumarlan notifications@github.com
wrote:

i did two steps to solve this error.

  1. i get sha-1 from android studio and paste it on firebase console
    and redownloaded google-services.json.
  2. i configured it by android client id instead of web client id. this
    worked for me.

@kalraneeraj24550 https://github.com/kalraneeraj24550 i've already
follow your steps, but i'm still get same error message... :(

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/react-native-community/react-native-google-signin/issues/543#issuecomment-460617936,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AqkqhncyM30K3K1ban51AMix3jLUiMIHks5vKXcIgaJpZM4XVGhP
.

Funny instance I'm having: it appears to work on some devices/accounts and throws this error on others. Any idea why the same keys, sha1 and configuration could have dual outcome?

Worse still, I have no idea how to troubleshoot on the devices claiming to face the error since it works fine on my end

I was facing the same issue yesterday. I had the issue for debug / local mode and I tried everything posted in this thread and nothing happend. I fixed it going to firebase console -> Developement Section in the dashboard panel -> Authentication and enable google authentication. Hope this help.
I dont know why i have to do that since i was working whitout that until yesterday

i solved this by updating
consent screen
at developer console -> Credentials -> OAuth consent screen

the login works until 3 days ago !!!

@RomuloDevelop Thank you so much !!! I can't believe this is not told everywhere that you have to turn the Google Authentication on on Firebase console... Anyway !

I used the webClientId from GCP, debug SHA1 from ~.androiddebug.keystore, which I could access from gradle console in Android Studio or using commande line.

i solved this by updating
consent screen
at developer console -> Credentials -> OAuth consent screen

the login works until 3 days ago !!!

Updating the OAuth consent screen works

I searches and came across the following steps

  1. Enable OAuth on https://console.developers.google.com
  2. Copy and paste your SH1 while enabling
  3. Enable Google sign in on firebase authentication
  4. Use Oauth Client_Id instead of your WebClient ID

So after many long hours

  1. Add SH-1 from your laptop to firebase console android app
  2. Submit the 0Auth consent screen and wait for google to confirm

For me the fix was to enable Google login in firebase console and download google-services.json again. The consent screen is only required if you are using oauth2 login directly and not Google's SDK

If you follow the guide for installation correctly, the only thing you really need is to save the consent screen that is given to you by default in the console. It just resolved my problem in one minute.

As hard as it may be to believe, the fix was filling out the "Support email" field in Firebase!

Exact steps I took to fix 12500 error code:

  1. Enable Google as a Sign-In Provider under Firebase > Authentication (not sure if necessary but I did it anyways)
  2. Fill out the Support email field under Firebase > Project Settings (this is necessary and fixed my issue)

It appears to be related to the OAuth consent; more details in this StackOverflow. Hope this helps!

Re-created app - Still does not work.
Added support email - Worked. Strange but true. Google firebase should give proper error message for this. It wastes lot of developer hours.

I found a FIX, you just have to add SUPPORT EMAIL in firebase console.

It took me a whole day but finally found solution, hope it helps you all too.

I found a FIX, you just have to add SUPPORT EMAIL in firebase console.

It took me a whole day but finally found solution, hope it helps you all too.

You are the hero! I tried so hard and eventually your solution worked. Thanks man!

I found a FIX, you just have to add SUPPORT EMAIL in firebase console.

It took me a whole day but finally found solution, hope it helps you all too.

You just saved me a lot of hours of pointless debugging. Thanks!

I faced the Same Issue but, and the reason for it in my application was because I forgot to add googlePlayServicesAuthVersion in build.gardle.

I am getting this type of Error Code -- 12500. but I have added support url in firebase console. I did not get any response.

@SaranyaArumugam i did everything bu still same problem did u find solution if u find share it ?

thanks in advance

@SaranyaArumugam
config your Web SDK configuration then go to https://console.developers.google.com/
config OAuth Consent Screen
Update all your privacy policy

I am also getting the same error 12500, done everything u guys told in above discussion but the result is same, help me
the app is in debug mode, I think something is wrong with OAuth Consent Screen

any one having issues with debug mode can watch this vedio it will satisfy you it has complete google login working with react native cli (init version )

link:
https://www.youtube.com/watch?v=AHVaxhcoY98&t=124s

adding privacy policy in OAuth resolved my problem

Just verify google credentials in OAuth consent screen at console.developers.google.com and save your time

Solved it by simply redownloading the google-services.json file from firebase console > Project Settings > General > scroll to Your Apps > select android app > Download google-service.json.
I had updating my hash in firebase console but had not re-downloaded the json file. Redownloding and replacing it in the app resource.
THEN: enabling Google auth in Firebase, which triggers the prompt to set a public name for the app (which I think it what was the real issue for Google sign in).

Hello All, almost all solutions I have tried to resolve this problem the but unfortunately did not get any success. Finally I have deleted my
1 . Firebase registed App

  1. Firebase project
    3.google developer console projects
    And after that created new Firebase project/registered App
    Now its started working.

As hard as it may be to believe, the fix was filling out the "Support email" field in Firebase!

Exact steps I took to fix 12500 error code:

  1. Enable Google as a Sign-In Provider under Firebase > Authentication (not sure if necessary but I did it anyways)
  2. Fill out the Support email field under Firebase > Project Settings (this is necessary and fixed my issue)

It appears to be related to the OAuth consent; more details in this StackOverflow. Hope this helps!

i love you! days.....

https://developers.google.com/identity/sign-in/android/start-integrating

You have to click on configure a project then take the web client id that this process generated

Sign in suddenly stopped working for me and im getting A non-recoverable sign in failure occurred is there anyway i can debug this, because that error message is pretty useless, and i cant catch the error either it seems

@dakkafex I had the same error like you, I followed @Choomantar comment and my problem got solved.

:( Still facing the issue where I have

  • A valid email address provided both in firebase and google OAuth consent screen.
  • Google authentication is enabled under firebase

I go throug all this solutions but none of them works for me. What really helped:

  scopes: ['https://www.googleapis.com/auth/drive.readonly'],  // <--- delete this line from your GoogleSignin.configure
  webClientId: '<FROM DEVELOPER CONSOLE>',
  offlineAccess: true,

Of course you should try all solutions above. But I just leave it here

i have the same issue but i don't use firebase any solutions?

Creating a new debug.keystore and SHA1 then updating it on firebase worked for me.

Thanks David will check it out.

On Tue, Dec 8, 2020 at 7:52 PM David Madner @.*>
wrote:

@dakkafex https://github.com/dakkafex I had the same error like you, I
followed @Choomantar https://github.com/Choomantar comment and my
problem got solved.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/react-native-google-signin/google-signin/issues/543#issuecomment-740648324,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMSY4CKOCXTKBXLVLT3LYHLSTYZATANCNFSM4F2UNBHQ
.

Was this page helpful?
0 / 5 - 0 ratings