Unity Android app will no longer log into Google Play - android

I have seen several threads around this issue but I am still struggling.
My app is failing to sign in on Android with:
Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me?language=en_US
I had this all working about 4 months ago but my hard drive failed and I am trying to get things working again on a newer version of Unity. I am only having this problem with NEW builds. My old apk still works fine so everything must be fine in the Google Play Developer Console. Something is not setup right in Unity.
I have tried with and without setting the "OAuth2 Client ID" from the Developer Console in the Android settings.
I have tried setting the keystore to .android/debug.keystore using the androiddebugkey with "android" as the password for both.
What else could it be?

So to sum up my comments up in an answer, that might be useful to somebody else.
1.) An app authenticates itself towards the Google Play Services with the combination of Keystore and Package name.
You can't sign in without or with another keystore. So you should always backup the keystore file together with your project in a version control system, that is safe from a single hard drive failure.
2.) If you lose keystore file, you can not update your app anymore.
But you could create a new app and link it to the same Google Play Game.

Related

My app that uses Maps API doesn't work if downloaded from Google Play

Okay, so here is my problem:
I made a little app for myself that uses the Maps API from Google. I followed the instructions on how to put the API key in the app and all that. I make my app, run it on my phone (via USB debugging if that's important) and it works just fine. Now, out of fun, I put the app on Google Play Store (for some of my friends and family to use it idk), and all of a sudden, the app doesn't work. What happened was, the map wouldn't load (as if i haven't put in the API key). Then I uninstalled the app, tried running it with USB debugging again, and the same thing happened. So I put in the new API key, and it works just fine. Uploaded the version 2 in the Play Store, same problem and the same situation. How do I fix this?
I will provide any additional information that you need.
Check if you've entered your API key within the google_maps_api.xml file in the release directory (/app/src/release/res/values) just like in your debug directory (/app/src/main/debug/values).
Then, if you have API key restrictions make sure that you are using right certificates for the debug and release builds. You can get your debug and release certificates by following the steps given on Google Maps SDK for Android documentation
I hope this helps! Goodluck on your project

Android Google sign-in gets DEVELOPER_ERROR (10)

There are lot of online gotchas and SO questions on this topic and I pretty much read through lots of them, but this error still persists.
What have I done so far:
Created both debug and release signing config
Created Web and 2x Android credentials in Google Developer console
Ensured that Android credentials in GDC have appropriate SHA-1 hashes and correct package name
SDK uses ClientID of Web credentials
The app is still in development phase and hasn't been published to Play Store. Few days ago, we changed both package name and and ApplicationID. I made sure that have package name change mirrored to my credentials in GDC.
I am positive that login was ok until few days ago (possible linked to package name change).
Can you please suggest any other troubleshooting steps?
I solved the issue couple of days ago and I would like to offer a retrospective to anyone else who might stumble upon this.
Disclaimer: If I had read the docs more carefully, I would have spotted the issue.
What I knew:
Both Facebook and Google sign-in worked from emulator
Both worked when I launched app on a device via USB
Both worked when I deployed locally build APK to a phone
Still, none worked when app was downloaded by Internal tester group from Play store.
I tried generating hash via keytool both for my release and debug key, but that did not seem to click.
Finally, after days of debugging, I have found what was wrong: Forget about your local (debug/release) keys and use the one that Play Store provided. You will find this one in Release Management section.
For Google sign-in:
In your Google Developer Console, create a new credential where you will input a SHA-1 from Play Store
For Facebook sign-in:
Get the SHA-1 and convert it to Base64. I used this tool: http://tomeko.net/online_tools/hex_to_base64.php. Then, input the base64 payload into your Facebook application.
Hope someone will find this at least a bit useful.

Cannot restore older version of keystore

I'm working on a react native project and I generated a keystore and released the signed apk to play store few days ago.
While working I mistakenly copied another keystore into the android/app directory in the project and since then could not return to the older version anymore. Checking version history of the keystore also states it was created today rather than modified today.
How can I get the keystore back when I don't have a Time Machine setup?
If you've lost your keystore, there is no way you can update that application on Google Play. If the app is significant (millions of installs), you might get help from Google Play support.
You can't. Your only option is using software that analyses your hard drive for files that were not overwritten physically yet.
Update: the play store support might be able to help you if you used the key only for uploading with Google Play App Signing
I know it is heartbreaking, but there is no way out!
You will have to unpublish the app and try again with different package name,
If you wish that doesn't happen again you should enable google play app signin, with this you can upload the same app again with a different keystore(the process requires some good work though). But if you haven't done that already there is no help.
The same thing has happened to me, luckily my app was in alpha at that time so there were no inconveniences to my users.

Trying to update a Samsung store app - getting error "The signing key is invalid. Please check the signing key of the binary"

We are building an update Android apk using Corona SDK - with the Target App Store set to "Samsung".
We are definitely using the same keystore file that we used to sign the original build. I've used it plenty of times, and it's the only one I have for this app so it's definitely the right one. When uploading updates to Google Play it has worked fine, it's just not working on the Samsung store for some reason
We keep getting this error message:
"The signing key is invalid. Please check the signing key of the binary"
I can only presume this refers to the keystore used to sign the application, searching for the problem didn't turn up much, other that someone who had asked the same question on the samsung forums and never got a reply.
Is there something else we could have missed?
It turned out that the error was not at our end, it was being caused be a fault on the store itself.
We had to delete the app and upload it again as a new application, at Samsung's suggestion.

Google Play Game Services - unable to sign in

Recently I try to implement a leaderboard by Google Play Game Service.
And first I import that sample project TypeANumber. I follow the way here https://developers.google.com/games/services/android/quickstart step by step.
I used the keytool to generated the SHA1 of keystore, and use this SHA1 to verify the app.
Then I sign the app by the keystore.
When I run the sample and try to sign in. I got the error "Google Play Game Services - unable to sign in".
Then I double check all my steps and try again. Still got this error.
I searched this problem on google, and I find this man got the same problem with me
Google Play Game Services - unable to sign in
All the situation is the same. And he got the solution.
I follow his solution delete my app client ID on Google APIs Console, unlinked my app and relinked it with the proper Certificate Fingerprint.
All this work done, I still got the same error.
Did I miss something? Any body got the same problem like this ?
Or maybe I should create an app with the same package name of the sample project and upload the apk ?
Or maybe Google Play Game Service doesn't work at China ?
I have encountered similar issues and I note that this page was updated on 30th May 2013 which
may help you, or me, or maybe even both of us !
https://developers.google.com/games/services/android/troubleshooting
Update: I worked my way through this and eventually realised that I had two different app_id strings in my project - one for the Facebook API and one for Google play Game Services! The two strings were stored in different files so my error was hard to find. Once I renamed one everything worked fine. One problem that I have encountered is that I am unable to test with the id that I used to define the Game in the developer console. Other people have mentioned this elsewhere on SO but no harm mentioning it again.

Categories

Resources