Google-signin: android after choosing account nothing happend

Created on 17 Dec 2018  路  11Comments  路  Source: react-native-google-signin/google-signin

hello
it works goodly on local emulator
but when i generate signed apk and after installing on device. after choosing account , nothing will happen .
and after clicking button again . account chooser page show again .
is it related to type of firebase app creating or SHA1 key or something like this ?
i dont think i relate to codes , because its working on local in correctly.
or maybe for release or debuging key ?
thanks

_signIn = async () => {
    try {
        await GoogleSignin.hasPlayServices();
        const userInfo = await GoogleSignin.signIn();
        this._signed(userInfo);
        console.log(userInfo)
    } catch (error) {
        if (error.code === statusCodes.SIGN_IN_CANCELLED) {
            // user cancelled the login flow
        } else if (error.code === statusCodes.IN_PROGRESS) {
            // operation (f.e. sign in) is in progress already
        } else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) {
            // play services not available or outdated
        } else {
            // some other error happened
        }
    }
};


    GoogleSignin.configure({
        scopes: ['https://www.googleapis.com/auth/drive.readonly'],
        webClientId: '*****1000813-re8abgd******pbcss7****923******apps.googleusercontent.com',
        loginHint: '',
    });

Most helpful comment

Make sure you add SHA certificate fingerprints in Firebase console for this app. All of them. If it works in debug, then you missed SHA fingerprints for release, and vice versa.

All 11 comments

+1
Same for me. In my case, it works on debug and signed APK. but there's no response after choosing account on the release version on google play

@pearlismylove try SHA keys which are given to your play store account. You will find it in Release Managment tab under App signing section

Same problem. The modal after pressing on Sign in with Google would not show. IOs is working fine.

@veeyka did you found a solution to this problem?

Same for me: work during debug, but nothing happen with the generated APK.

Make sure you add SHA certificate fingerprints in Firebase console for this app. All of them. If it works in debug, then you missed SHA fingerprints for release, and vice versa.

make sure sha1 matches your app in Google Developer Console.

any solution yet? my sh1 is matching my playstore app signin. i also added in firebase SHA certificate fingerprints my clientId is also matching.

I stashed all my changes for android only and run react-native link again, then i run my android app, and it worked fine.

This issue happened to me today.
But after updating from ^1.0.2 to ^1.2.1 issue was fixed.
It doesn't looks like issue with fingerprint.

closing as stale. if you have this problem, see https://github.com/react-native-community/react-native-google-signin/issues/593#issuecomment-461691910

or open a new issue

Was this page helpful?
0 / 5 - 0 ratings