I've made a chat app that uses Firebase's feature Real-time database.
I face a problem with google authentication. The problem started when I downloaded the app from the Play Store, the authentication was working perfectly when I was running the app in debug mode. When users try to sign in they get a toast message code:10 message:10.
I would like to note here that: I've added the SHA1 fingerprint. How can I solve this?
*Not sure if this is helpful but I've followed step by step this tutorial
You need three keys in order to make it work:
The debug key. Informations here.
The release key. Informations here.
Google Play App signing key. Informations here.
All these keys are needed in order to make the sign-in process work.
Other informations here.
After generating SHA1 for release key, I forgot downloading the new google-service.json file that caused the same error.
Make sure you follow the instruction https://developers.google.com/android/guides/client-auth to generate and add debug/release SHA1 to firebase console and download google-service.json after updated.
If you use Use app signing by Google Play option, you need an additional step:
After uploading app into google play console, go to Release management > App signing, copy SHA1 and paste to firebase console
Update
In the new google play console, the App signing key can be found as following:
Setup > App signing
Make sure you have added signed SHA1. If you are using debug one then it will not gonna work for live apk.
You need to put "debug.keystore" in this path C:\Users\USER_FOLDER_NAME.android
then in Android studio follow the below steps
1. Run your project
2. Click on Gradle menu
3. Expand Gradle Tasks tree
4. Double click on android -> signingReport
You can see SHA in Run Tab
for more information see link
For me the problem was that i registered app and enabled google signin on Firebase console but I was testing with the debug version of app which has slightly different package name (same name but ended with .debug) so it was not working because the debug app is not yet registered. so additionally to my release app i also added the debug app to the firebase project for the app and it generated it's own google-services.json which i download and set to src/debug/google-services.json.
I believe this might be useful to some one else.
Related
I've made a chat app that uses Firebase's feature Real-time database.
I face a problem with google authentication. The problem started when I downloaded the app from the Play Store, the authentication was working perfectly when I was running the app in debug mode. When users try to sign in they get a toast message code:10 message:10.
I would like to note here that: I've added the SHA1 fingerprint. How can I solve this?
*Not sure if this is helpful but I've followed step by step this tutorial
You need three keys in order to make it work:
The debug key. Informations here.
The release key. Informations here.
Google Play App signing key. Informations here.
All these keys are needed in order to make the sign-in process work.
Other informations here.
After generating SHA1 for release key, I forgot downloading the new google-service.json file that caused the same error.
Make sure you follow the instruction https://developers.google.com/android/guides/client-auth to generate and add debug/release SHA1 to firebase console and download google-service.json after updated.
If you use Use app signing by Google Play option, you need an additional step:
After uploading app into google play console, go to Release management > App signing, copy SHA1 and paste to firebase console
Update
In the new google play console, the App signing key can be found as following:
Setup > App signing
Make sure you have added signed SHA1. If you are using debug one then it will not gonna work for live apk.
You need to put "debug.keystore" in this path C:\Users\USER_FOLDER_NAME.android
then in Android studio follow the below steps
1. Run your project
2. Click on Gradle menu
3. Expand Gradle Tasks tree
4. Double click on android -> signingReport
You can see SHA in Run Tab
for more information see link
For me the problem was that i registered app and enabled google signin on Firebase console but I was testing with the debug version of app which has slightly different package name (same name but ended with .debug) so it was not working because the debug app is not yet registered. so additionally to my release app i also added the debug app to the firebase project for the app and it generated it's own google-services.json which i download and set to src/debug/google-services.json.
I believe this might be useful to some one else.
THIS didn't solve my problem
THIS didn't solve my problem
THIS didn't make any sense to me but doesn't seem to fix my problem anyway.
So, I've release my app on the PlayStore and the google sign in doesn't work.
I've tried to run my app with the debug and release sha1, and that got me an ApiException: 12500:
After like 2 hours of research I figured I had to use the Google Play Signin SHA-1. I did, now I get an ApiException: 10:, at least that's some progress.
But there I am stuck.
As my knowledge goes, the ApiException 10 is either a SHA or client Id problem.
It can't be a SHA problem since I now use Play's SHA (In the firebase console I have the release and play sha-1 and updated services.json, adding the debug sha just brings me back to apiexception 12500).
So I thought and still think the problem is my client Id BUT
Using the default_web_client_id doesn't work. Both client ID's for both SHA's extracted from google-services don't work. The client Id I created in Google Developers Console won't work.
So I'm begging you to help me understand what I'm missing.
Thanks.
What I tried first :
I want through this error ApiException: 12500 for a long time. I tried everthing :
remove my debugkeystore, recreate one
add support email on firebase console
change versions of plugin
update google on my device
But when I was browsing stackoverflow, I found a solution :
Maybe the solution :
I went to this page (https://console.developers.google.com/apis/credentials)
Do not forget to select your project on the list (top left). Then go on "Oauth consent screen"
I filled almost all the fields : the application logo, the email support, the application homepage link, application privacy policy link (with the project.firebaseapp.com); and I saved.
Now it's working, I can login.
Hope this will help
Source
Thanks to answer of Pranjal Gupta : Google Sign In error 12500
So when I published my app on the Google Play Store, I had to change the SHA1 key on Firebase and Google Play API Console to the new one that the Google Play Console generated.
The problem now is if I want to test my app from Android Studio, I need to change the SHA1 key back to the original one. If I do that, then the current users who have already logged in my app will no longer be able to log back in.
How do I test my app when it's dependent on the Google sign in and not affect current users?
Multiple SHA1 fingerprints can be added to a single firebase project. Add your debug key (Android studio SHA1 fingerprint) to your firebase project along with your app's production key. Then download the latest Json file and add it to your project in Android studio.
Sarweshkumar C R's answer is perfect, just adding visualization for total newbies. Both keys can coexist with no problems, in the image I added 3 SHA certificate fingerprints to demonstrate and you can add by clicking 'Add fingerprint'
I wanted to update an app I already published in the playstore to add achievements and leaderboard.
I have created the game in the Developer Console and everything was fine, everything worked with the debug SHA1 I have entered in the Google API for my app.
But now I have generated a signed APK with a different SHA1 (of course), and I have changed the debug SHA1 in Google API with the SHA1 for my signed APK.
I have pushed the APK to the playstore and published the game from the Developer Console. But now that my game is available in the store, when people try to connect to the Google Play Games they get "Failed to Sign in. Please check you network connection and try again".
I already looked at this link
but I am doing everything correctly.
Is it possible that I need to wait several hours before Google API handle the new SHA1 I have entered ? I have no idea of what is going on
You may refer with this thread. Try to move the app ID and leaderboard ID from strings.xml to ids.xml in values folder. You may also try to delete all client ids then add them again for debug keystore and release keystore.
Here's an additional reference which might also help: LIBGDX game configuration with google Play game services Errors
Here are a few points that might help you.
It takes several hours before your changes on Developer Console are actually published. Test the game after a few hours.
You don't need to publish in order to test it. You can do that by adding tester accounts in your developer console.
You can't "test" Google Play Services with developer account. You will need another account for that.
Edit:
Very Important:
Make sure you added required permissions to AndroidManifest.xml in
your Android project.
Ok so for everyone having the same problem as me.
Don't forget that now Google can sign your app.
The SHA1 fingerprint i needed was in the developer console, no need to get the SHA1 fingerprint of my APK.
I am trying to implement the APK Expansion Downloader Library into my application, but I am struggling to get past the LVL verification check.
Everytime I run up the application, I get a "Signature verification failed" message back from the LicenseValidator class. The application is signed in release mode, with a proper Keystore.
I have checked maybe 10+ times that the PUBLIC_KEY I am using inside of the application is the same as on the developer account, yet its still not working. I have also uploaded the application to the Play Store, with the expansion file (correctly named), and even added in my account as a Test account on the developer console. I have also tried adding the publisher account onto my device, and its still not working.
I do not know what to do next, I need this to work and cannot find any help on the internet as to how to fix this.
Thanks
Adam
you had several versions of file extansion? Because I had the same problem as the api sent me the name of an old file ... as a workaround in the verification code I just replaces the version number ... It's not terrible, but the bug does not come from me ...
Fixed. Via "Manage apps" I stopped the Google Play Store app, cleared its data (not the cache, which was zero bytes), then restarted my licensed app - licensing now works.