WRONG SIGNIN Error: unknown status code: 12501(…)

See original GitHub issue

I follow the tutorial.

i have the following code:

componentDidMount() {


         GoogleSignin.hasPlayServices({autoResolve: true}).then(() => {
            // play services are available. can now configure library
            GoogleSignin.configure({
                scopes: [
                    'email', 'profile', 'https://www.googleapis.com/auth/plus.profile.emails.read', 'https://www.googleapis.com/auth/plus.login'
                ],
                webClientId: 'web-clientid from the console developper',
                offlineAccess: true
            }).then(() => {
                // you can now call currentUserAsync()
                GoogleSignin.currentUserAsync().then((user) => {
                    console.log('USER', user);
                }).done();
            });
         });
    }

    signIn() {
        GoogleSignin.signIn()
            .then((user) => {
                console.log(user);
            })
            .catch((err) => {
                console.log('WRONG SIGNIN', err);
            })
            .done();
    }

 render() {
        return (
            <Image source={BACKGROUND} style={styles.container}>
                <Image source={ICON}></Image>
                <Text style={styles.welcome}>
                    APP TEST
                </Text>

                <GoogleSigninButton
                    style={{width: 230, height: 48}}
                    size={GoogleSigninButton.Size.Standard}
                    color={GoogleSigninButton.Color.Light}
                    onPress={this.signIn}
                />
            </Image>
        );

In other issue someone told to download the google-services again. i do that, but the file is equal to the file i previous download. pretty sure, i’m missing something, but dont no what. Can anyone helping me?

Thanks in advance

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
jonathanpalmacommented, Sep 8, 2016

I was getting the same error but I fixed re-creating my google-services.json from https://developers.google.com/mobile/add

screenshot

After create the project go to the Google API console, select the project (dropdown next to GoogleAPIs logo) and copy the clientID of your WEB CLIENT

screenshot 1

GoogleSignin.configure({
                scopes: [
                    'email', 'profile', 'https://www.googleapis.com/auth/plus.profile.emails.read', 'https://www.googleapis.com/auth/plus.login'
                ],
                webClientId: 'WEB-CLIENT-ID',
                offlineAccess: true
4reactions
maggialejandrocommented, Mar 15, 2017

In my case it worked when I generated google-services.json with DEBUG SHA1 (debug.keystore). To make this work in release mode you need to use release keystore. Also the APK must be signed in debug mode, add this lines in android/app/build.gradle and the corresponding configuration in android/gradle.properties

 signingConfigs {
     debug {
         if (project.hasProperty('MYAPP_DEBUG_STORE_FILE')) {
             storeFile file(MYAPP_DEBUG_STORE_FILE)
             storePassword MYAPP_DEBUG_STORE_PASSWORD
             keyAlias MYAPP_DEBUG_KEY_ALIAS
             keyPassword MYAPP_DEBUG_KEY_PASSWORD
         }
     }
 }

 buildTypes {
     debug {
         signingConfig signingConfigs.debug
     }
 }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error 12501 authenticating with google sign-in - Stack Overflow
Build a signed apk (With remember password checked). · Before signing check the filename of the keystore file and the one yo give...
Read more >
Google Sign in Status code 12501
The 12501 error from Google Sign In generally means that the SHA1 of your APK does not match the SHA1 you put into...
Read more >
WRONG SIGNIN Error: unknown status code: 12501 #281
I'm getting this error after cancelling google login using android back button. FYI, i can sign in successfully using below code.
Read more >
Android : Error 12501 authenticating with google sign-in
Android : Error 12501 authenticating with google sign-in [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] Android ...
Read more >
Android Google Play Games Signin Error 12501 - ADocLib
The 12501 error from Google Sign In generally means that the SHA1 of your APK does not match the SHA1 you put into...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found