Closed sudarsangp closed 6 years ago
After release to the store I found signin not working again and it turned out that you need to create a third key with your app's fingerprint from the Play Store developer console because google re-signs published builds with a different certificate. To sum it up you need to create four OAuth client ids in Google API console: 1 Web client id - this and only this one must be defined in your mobile app for all build types 3 Android client ids (with debug, release and publish fingerprints)
Thank you. This fixed my problem. After upload first bundle to internal test i started to get an error with google sign in. What i done to fix that problem:
First Create and add Android Fingerprint in Android Client ID
And Create A new Web Application OAuth Client ID
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.requestProfile()
.requestIdToken(getString(WEB_APPLICATION_CLIENT_ID_FOR_OAUTH_2))
.build();
Use Web Application OAuth Client ID 👍👍👍
This solved it for me https://www.youtube.com/watch?v=SdYp5JdMvs0
"Web Application" name confuse me, but it works
Also watch out for this Key com.google.android.gms.games.APP_ID expected String but value was a java.lang.Float. The default value <null> was returned.
- yes, use @string
resources like in the guide
In my case, everything worked with Client ID from https://console.cloud.google.com. But after adding requestServerAuthCode I started getting errorCode 10 and it turned out that I needed to use oauth_client from fireabse google-services.json which was a different string...
I just came across this thread, as I see the same error in our app.
When I add the SHA1 from our release keystore to the Google Cloud Console, the signin process os working when running a release build on device or emulator. When running a debug build on emulator, I see this error code 10.
The other way around, when adding the SHA1 from the debug keystore, the sign in process stops working when running a release build.
So my question is: how can I make sure that I am able to test the login stuff in a debug build AND people using the live app (when it is released on play store) can use the sign in stuff at the same time? As I can only add one SHA1 to the Google Cloud Console.
Btw, I am not using Firebase. Thank you in advance!
When I tried to use the New Google Sign-In API (https://developers.google.com/identity/sign-in/android/sign-in-identity), I found that on system versions lower than Android 10, always Error: com.google.android.gms.common.api.ApiException: 10: Caller not whitelisted to call this API., but there is no such error on Android 10 and Android 11 and above phones. I'm currently using Google Sign-In for Android (legacy) (https://developers.google.com/identity/sign-in/android/sign-in) I've also never encountered such an error, I don't understand Why? My SHA1 is configured correctly
I was getting this error and I had checked the SHA's and Web Client stuff were all set up correctly. I must have checked this 20 times. Everything matched in firebase, google developer console, and google-services.json, but yet google sign in was not working.
I finally figured it out and wanted to post this for others (and probably my future self when I run across this again).
My issue was I have 2 firebase projects. One for stage, and one for prod. Stage worked fine but prod did not. Yes, I confirmed I had all the right SHA's set up and everything (sort of). I realized that the SHA I added to firebase was for my production keystore release version, but I was running the app locally in debug mode with my stage keystore file. I quick google on how to run it in release mode locally gave me this command:
react-native run-android --mode release
Everything is working now.
hii all if you are facing the issue using google login with code 10,then follow the steps below you may find your solution 1.check your project connect to the firebase account 2.if you are connected with firebase account then just add to sha-1 and sha-256 in your firebase account. 3.download the google.json file and put in your app folder in project root folder
hope your problem might be solve happy coding!
i have a problem with google login ONLY in Production/Android.
i use EXPO i use it WITHOUT FIREBASE. i receive in production/android "DEVELOPER_ERROR" error.
Into documentation i see that is always as misconfigured, but the only configuration we have is a fingerprint to add in Google Api Console.
i can't understand which fingerprint add for production.
FINGERPRINT on my google play console
FINGERPRINT found in android studio with command gradle signinreport
FINGERPRINT found with eas credentials i try every fingerprint with the same result.
thanks in advanced
A help to workaround this problem
For whom use the AppCenter to distribute the APK. The AppCenter by somehow overrides the release keystore from project, they use their own keystore. You can get this SHA1 from their keystore by downloading the apk and run keytool -printcert -jarfile 'path_to_apk'
. You'd get the SHA1, then add the new Android Oauth Client ID with this SHA1. Then try again, this fixed my issue. Hope it helps!
i have a problem with google login ONLY in Production/Android.
i use EXPO i use it WITHOUT FIREBASE. i receive in production/android "DEVELOPER_ERROR" error.
Into documentation i see that is always as misconfigured, but the only configuration we have is a fingerprint to add in Google Api Console.
i can't understand which fingerprint add for production.
FINGERPRINT on my google play console
FINGERPRINT found in android studio with command gradle signinreport
FINGERPRINT found with eas credentials i try every fingerprint with the same result.
thanks in advanced
A help to workaround this problem
hey, u decided it ?
This is still a hot issue samtstern. Closing this makes no sense
After release to the store I found signin not working again and it turned out that you need to create a third key with your app's fingerprint from the Play Store developer console because google re-signs published builds with a different certificate. To sum it up you need to create four OAuth client ids in Google API console: 1 Web client id - this and only this one must be defined in your mobile app for all build types 3 Android client ids (with debug, release and publish fingerprints)
I think the publish fingerprints (sha1) of play store are the easiest for developers to miss.
Hello, I have a similar problem, all this time I thought that the problem was when I published my application to the play store that it stopped working, since in APK and emulator it always worked but when I tried to log in with Google from my application it showed me an error 10, but I realized that it is something different and the problem was not with the play store. It's like the system crashes or something because sometimes it works and when it works it works everywhere but when it crashes or I don't know what happens it stops working in all types of environments and throws error 10.
I'm only using Google Cloud for now, but I plan to use FireBase if this problem continues, if anyone knows how I can solve this problem it would be very helpful.
I am using the SHA1 of the release that returns the signinReport of android studio in Google Cloud and from what I see the package name, the fingerprint and the id of the web type client are correct
the solution is to enter 3 sha-1: debug, release, and play market keys into the project setting firebase. Enter the key from the play market in the api credentials oauth 2.0, it will be written that it is confirmed. Create a web application in oauth 2.0 and use the client - id from this web client.
@Us3rL0sT Yes, I managed to solve it by adding another credential with the SHA-1 Certificate of the application signing key from the Google console to Google Cloud, thank you.
Im trying to login with google but Im always getting this stupid error 10. Im still fighting and today I wasted whole day to deal with it without success. I dont published my app yeat. Im not using firebase. Im using only flutter.
@IDENTICOSantiago can you say exacly what you did?
Step 1: Describe your environment
Step 2: Describe the problem:
Throws Error after choosing Google account
com.google.samples.quickstart.signin W/SignInActivity: signInResult:failed code=10
Steps to reproduce: