I'm programming an android app an added Google Play Services for Google Sign-In support. Therefore I generated and downloaded my configuration file from Google's developer console. I integrated the file into the app folder and everything works fine while sign in with google in my app so far.
Now I wanted to share my Project with another colaborator, but when she pulled the code from GitHub, she cannot sign in successfully. When she tries to sign-in the GoogleSignInResult-object has the following status: Status{statusCode=DEVELOPER_ERROR, resolution=null}. As I looked up in the internet it is probably an issue with the configuration file and the correspondig SHA1-key, but I didn't find a solution.
Does anybody know how to solve thies issue?
DEVELOPER_ERROR
The developer has configured something incorrectly with their
application. This is a hard error, since retrying will not fix this.
Maybe the issue is Google Play services was unable to find a matching client from the console based on the SHA1 and package name.
You can follow this guidelines on how to troubleshoot the problem about SHA1.
The certificate with which you are signing your game should match the certificate fingerprint associated to your client ID. To verify this, first check your certificate's SHA1 fingerprint:
Find your certificate file and obtain its SHA1 fingerprint. To obtain the SHA1 fingerprint, run this command:
keytool -exportcert -alias your-key-name -keystore /path/to/your/keystore/file -list -v
Take note of the sequence of hexadecimal digits labeled SHA1: in the output. That is your certificate's fingerprint.
Note: If you are using a debug certificate, replace your-key-name with
androiddebugkey in the command above. If using a release certificate,
use the name you chose for your key when creating the certificate.
For more information and the next step, just check the link in the guidelines above.
Also check this SO question, it might help you also to solve your problem.
Related
Tried all available solutions on the internet but still getting same error, also cross Checked SHA1 key. Used both methods Firebase and Google Developer console but all in vain.
I have face this issue,
For me I am using react-native-google-signin with firebase.
My problem was SHA certificate fingerprints on firebase console is different with my project keystore.
U can check it by run this command to make sure your SHA on firebase and keystore is same.
keytool -list -v -keystore ~/.android/debug.keystore
This is often caused by no/invalid App Signature. You most likely use bare workflow, since you're getting this error, because expo does this for you when you build the app. To achieve the same in bare workflow
Drop your android folder in Android Studio
In Upper toolbar click Build >> Generate Signed APK
Choose APK from given options.
Type in your KeyStore informations.
After building an app, you must be able to use google sign in.
I have generated my SHA1 code from my keystore but when I try to create an OAuth client 2.0, Google game console is giving me the error: "Certificate fingerprint is invalid".
Anyone knows why this happens?
How do I fix this?
I've contacted Google Play Developer Support about this issue (I've got a same problem).
Here is their answer : Please ensure the key is set to 2048 bit and is valid for at least 25 years.
I've tried it, but sadly my debug.keystore is still not getting accepted, maybe there will be some luck on your side.
$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
I'm Dan, and I'm a software engineer on Play Games Services.
First, let me thank you for using our service, and apologize for the inconvenience caused. We have discovered a bug in our product that prevents users from linking fingerprints of their signing keys to newly created applications. The issue has been fixed and you should be able to link your application as expected.
If you encounter a bug in the feature, please let us know using the bug report tool (Help -> Need more help? -> Send feedback & report bugs).
I ran into this issue recently.
After I added an Android credential, the Google Play Console pops up a modal with the app name and an SHA-1 fingerprint. For some reason this fingerprint is incorrect.
In the Google Play Console You need to go to Release -> App Integrity,and copy the SHA-1 certificate fingerprint under App signing key certificate.
Ok that is weird. I encountered the same problem. while I have done this numerous time in the past, never had this issue before. I tried with multiple options but still no go. So figured out a workaround. Thought of sharing it to save time:
Once you create a Game Service, You will get the API console project under -> Game Details > Api Console Project
Click your API project, and it should take you to your API console project.
Create Auth SHA1 keys by choosing credentials > create credentials.
Now, Google site do suggest not to do it
Warning: Do not create new client IDs for your game from the Google API Console. If you do so, Google Play games services will not associate your game settings with the client ID, and this could cause errors during gameplay.
https://developers.google.com/games/services/console/enabling
But as far I Have only one Sha1 for this package, I think we are good. I can confirm that my project is working fine and I am able to successfully linked the app. Although, I have still not tested all my games features.
Also, I am still figuring out the reason on why it works from Google API console with the same Sha1 key and package and will not work if I use the same combination from Play console -> linked apps. I will update on this thread as I learn more. Perhaps Google is changing the OAuth screen consent screen, may be this is a new change now.
Created an app which uses react-native-google-signin to login to the app with google login
Created a keystore for to sign my app, as is described here
Signed my app and uploaded into Google Playstore
When I was asked if I want to opt-in for the Google Play App Signing, I agreed
If I try to login to my app (downloaded from the playstore), I'm getting an error messsage: DEVELOPER_ERROR, error code: 10
Note1: my app does not use firebase
Note2: if I install the apk directly into my device, the login seems to work
I'm sure the problem has something to do with how the application is signed with Google Play App Signing but I'm not able to isolate the issue
Update:
Downloaded the google-services.json from here and added it under /android/app and now the app works if I download it from the release management page and install it manually. Still doesn't work if I install it directly from the Google Play Store though.
It is very simple, Go to play store account where you uploaded your signed APK. select your App, then go to the Release Management section then App signing.
Copy the SHA1 key of App Signing certificate.
Go to this link https://developers.google.com/identity/sign-in/android/start-integrating
Click on CONFIGURE A PROJECT button
select your App, select Android, App your app package name, then paste the SHA1 certificate
Then click Create. Thats it.
Now you can use google signin in your App
Solution:
The problem was that while generating the google-services.json, the App signing certificate SHA-1 certificate fingerprint needs to be provided; I was providing the Upload certificate's SHA-1 certificate fingerprint which is why it wouldn't work on production.
In essence, in the credentials page, you'll need to create a two oauth client ids for Android (one with the App Signing certificate and one with the Upload certificate and one oauth client id of type web and in while using react-native-google-signin you need to specify the webClientId.
You added sha-1 key for your app in debug mode and at that time you will be able to do google sign in your app.
But as the app goes in production, it requires sha-1 key for production.
And that you need to add at firebase console.
You can check your firebase console and check for android app.
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
The above commad helps to create sha-1 key for debug version.
You meed to provide you signed key-store file path for production sha-1.
And this will be done with command
keytool -exportcert -list -v \-alias <your-key-name> -keystore <path-to-production-keystore>
You just need to provide specific paths for keystore file for released apk.
Yesterday same problem occurred to me.
Google has released a new signing service in playstore publish console in which google will signin your app with his keystore. After signing , it will give you a new SHA which you have to add in your fireenter image description herebase account. See the image for the better understanding
In release mode, my google sign-in is not working, but it works fine in debug mode. I got a similar question from SO here, but I didn't get perfect solutions.
My handleSignInResult is coming false - How can this be fixed?
Yesterday same problem occurred to me.
Google has released a new signing service in playstore publish console in which google will signin your app with his keystore. After signing , it will give you a new SHA which you have to add in your firebase account.
When you upload app on play store
After signing , it will give you a new SHA which you have to add in your firebase account.
Its Working HAPPY Coding Cheers
Add new SHA1 in https://console.firebase.google.com
Create Release SHA1 using Command Line
keytool -list -v -keystore "E:\Jsk_file\healthNickel" -alias healthNickel
keytool -list -v -keystore "E:\Jsk_file\YOUR_JKS_FILE_NAME" -alias YOUR_JKS_ALIAS_NAME
Enter keystore Password :- YOUR_KEYSTORE_PASSWORD
I had same problem, i did read some posts and was able to get work done by following below steps
Step 1) Please go to https://console.developers.google.com/apis/credentials?
Step 2) Click on create credentials ->select OAuth client ID ->select application type as Android
Step 3) then generate Signing-certificate fingerprint by writing below command in command prompt before that you should have keystore and its path
keytool -exportcert -keystore "D:\PlayStore_keystore\myproject.jks" -list -v
Step 4) after click on enter you will be asked for
Enter keystore password :
Enter password which you have used for creating keystore
Step 5) then it will give details regarding keystore like SHA1,SHA256,MD5 etc.
Step 6) Enter SHA1 as fingerprint and give packagename which is in manifest file
step 7) Click create you will get new OAuth client ID
step 8) now you have got client id you will need to get google-services.json file.
step 9) please goto https://console.firebase.google.com
step 10) if you already have project with that packagename ->go to overview ->click on menu icon where packagne name is written
step 11) select settings goto-> project Settings-> add Android app (in the bottom) -> there will be option called Add fingerprint
step 12) in step 5 you have got SHA1 paste that in certificate fingerprint and save it
step 13) now download new google-services.json file (as it conatins new client id ,certificate_hash etc)
step 14) paste that google-services.json file in app folder in your android project.
step 15) You are good to go...
Make sure you follow all the steps specified in the Guide
. If need be, create a new OAuth Client, new configuration file (the google-services.json) file and do everything step-by-step.
Also try adding a Web Client giving the same credentials.
And for Android as well as Web client give both the SHA1 for debug as well as the release keystores.
In Android Studio, at extreme left you will see a tab saying "Build Variants". Select the release mode there and do everything after that.
Because you are asking about release version of android so I assume you already have signed your application with keystore.
So in order to obtain the SHA1 of your release app.
Go to your /bin in JDK directory.
And run the following command in your cmd.
keytool -list -v -keystore "key store path" -alias "key alias"
This command will give you all the required details of your release version.
Copy the SHA1 string and add it to your firebase console.
You are good to go.
Go to Play store and Search for "App Integrity"
Google play store app integrity
Then
Copy the SHA Keys and Add into the Firebase or Google Cloud signing keys.
and then you are good to go.
Ok I struggled with this and finally I found the solution here it is:
First of all there are three SHA1 keys
Debug SHA1 key
Release SHA1 key
SHA1 key when you google play sign your app
Here you can get debug and release keys and for third key check HarshitG's answer.
There is App signing certificate, this is that key.
Gather those three keys and add them in firebase console under SHA certificate fingerprints
Then Download the google-services.json file and add it in your YOUR_PROJECT_NAME/project/app/ [you'll see it if you change the view to Project from Android]
Rebuild, generate release apk and enjoy :)
Whenever you are using any google api you must add your release hash key on the app you generated in google developer console if you have added hash key for debug.
For a Release (aka, Signed) APK - if you are only deploying to Firebase, you need to add the SHA1 for the same keystore file you used to sign the app.
After successfully adding the SHA1 into the Firebase Project console , get the latest google-services.json and update your project's module local copy.
I didn't see any docs on this so far (seems it's something you have to dig for); found it to be tricky stuff. Lot's of answers on SO. Found the Firebase deployment solt. thanks to:
Answer in this thread to update SHA1 on Google Play, it gave me the idea maybe I need to fix something with SHA1: https://stackoverflow.com/a/44307293/2162226
How to get the SHA1 for a signed APK: https://stackoverflow.com/a/34933381/2162226
in the terminal go to the project folder->android-> paste this command and hit enter ./gradlew signingReport . this will generate set of keys for you .
Then copy the SHA1 and SHA256 keys under release release label.
add them in to your Firebase settings keys section.
Download the googleServices.json and replace your existing googleServices.json with the new one and build the apk again.
hope this helped.
Best And fastest way to fix login social media by flutter application using firebase after upload the app in google play to solve problem
go to google play console than setup > app integrity > from App signing key certificate copy sha1& sha256 and past in firebase account in android app add new sha1 and sha256 .
for facebook error login also copy sha1 from App signing key certificate in google play console go to this website : http://tomeko.net/online_tools/hex_to_base64.php
past in hex string and click covert than copy output base 64 and past inside app setting in facebook development
that's all
If you have two or more firebase projects or the google cloud project, there may be a duplicate SHA1. If such conditions have been explained in this link.
https://support.google.com/firebase/answer/6401008?authuser=0
CAUTION
If exist you put more than one identifier for the same 'signingReport' (copy SHA1 and SHA256 from the same report object) this isn't work, keep this im mind.
This works for me:
Remove all SHA1 in firebase
Run ./gradlew signingReport in android folder and get SHA1 from debug mode.
Run this commmand with your data:
keytool -list -v -keystore your_absolute_path_to_keystore -alias your_alias_from_keystore
(After that you will be promped to digit the password of key and it
wil generate your SHA1 + SHA256 and other infos.)
Copy only SHA1 and paste it in firebase.
Download google-services.json again and move it to your android/app
Before mindlessly running commands n stuff lets get some concepts straight!!
Your app needs to get signed by a signing certificate / keystore (that .jks file) to create a release build. Release builds are created in either Debug mode or Release mode (We'll learn about this futher on)
There are 3 types of these keystore files that you will come across:-
Debug keystore generated by using ./gradlew signingReport
Upload keystore generated by following these instructions
Deployment keystore/Play Signing keystore which is automatically generated by Play Console when you first try to upload a app bundle there. (You can find it at Setup > App integrity > App signing). This keystore stays with Google. You do not have access to its .jks file. So its safe and wont get lost.
Now, I would say, if you wish to get your app on Play Store, DO NOT generate Debug keystore. Generate and ALWAYS use your Upload keystore only.
Why is this important?
Debug keystore are just able to sign your apps in Debug mode (not Release mode).
Even if you try to use flutter build appbundle with --release flag, you are gonna get a app-release.aab which is signed in Debug mode! You can never publish an app signed in Debug mode in Play Store.
Upload keystore can sign your app in Release mode which can be published on Play Store.
Therefore, if you intend to publish your app in future, generate upload keystore by following these instructions and make changes to you gradle files accordingly. Do not generate that debug keystore cuz you wont need it.
This explanation should make you understand that why some answers are wrong which recommend to get a Debug keystore
Now the proper answer to the above question.
Certain Google Play services (such as Google Sign-in and App Invites) require you to provide the SHA-1 of your signing certificate
So if you are signing you app with upload keystore, add the SHA-1 fingerprint of your upload keystore in Firebase Console > Settings Icon > Project settings > Add fingerprint
You can get the SHA-1 of Upload keystore using keytool -v -list -keystore /path/to/upload-keystore.jks
Also, you can get the SHA-1 of Upload keystore and Deployment keystore on Play Console at Setup > App integrity > App signing
Which SHA-1 should I add? There are two SHA-1 at Play Console.
You have to add both SHA-1 fingerprints to firebase.
Why?
For publish reviews you always have to submit your app signed with your Upload keystore. Play Console will accept your app update submission signed with that same Upload keystore only (So keep the Upload keystore safe). That's why, to make that Upload keystore signed App work properly you need to add SHA-1 of Upload keystore in Firebase.
After your publish review is Accepted, your app will be signed again using the Deployment keystore by Play Console (automatic), then it will be published on Play Store. So that's why to make that Deployment keystore signed App work properly you need to add SHA-1 of Deployment keystore in Firebase.
This question already asked but I did not find any satisfactory answer.
I followed each and every step of https://developers.google.com/+/mobile/android/samples/quickstart-android#credentials-screenshot but instead of their package name I am using mine.
There are two cases one is direct testing and one after signin the apk with keystore.
When I am testing my app in that case signin with any google account working fine but after I generate my signed apk it is giving me Error signing in the specified account. Please choose a different account.
If everything is same then why it is not working with signed apk?
I found my mistake and it is SHA1 key, My debug SHA1 and keystore SHA1 are different and in google console I gave my debug SHA1 so it was working with debug apk but not with signed apk.
So what I did is I extracted SHA1 from my keystore and put that in google console now it is working for signed apk(it will not work with debug now).
This is how you can extract SHA1 from keystore.
c:\Program Files\Java\jdk1.7.0_71\bin>keytool -list -v -keystore c:\you_key_here.key