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

I am using

  • react-native 0.55.4 and 0.57.2
  • react-native-google-signin@1.0.0rc1 and react-native-google-signin@1.0.0rc6
  • classpath ‘com.android.tools.build:gradle:3.1.4’ classpath ‘com.google.gms:google-services:3.2.1’
  • play-services-auth 16.0.1 & 9.2.1 (tried both version)

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?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 67 (1 by maintainers)

Most upvoted comments

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 😄

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

the login works until 3 days ago !!!

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 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.

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 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… 😦

Experiencing this issue too

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

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: <webclientid>, offlineAccess: true} (not work)

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

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

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!

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.

Make sure set publishing status to production in OAuth consent screen

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

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

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!

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.

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

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

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 .

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 .

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

any updates? Still facing same issue

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%.android\debug.keystore location . but my app is not using that keystore is it using different which is located at : %USERPROFILE%\AppData\Local\Android\Sdk.android\debug.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

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": "<id>.apps.googleusercontent.com",
         "client_type": 1,
         "android_info": {
           "package_name": "com.<name>",
           "certificate_hash": "<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