Skip to content Skip to sidebar Skip to footer

Google Play Game Services Sign In Button Spits "unknown Error"

I'm trying to use Google Play Game Services in my practice Android app. I got the sign in buttons UI as explained in the developer guide. When I hit the sign in for the first time,

Solution 1:

Try going to your Google+ settings on your device and purging the access that you had granted the app. Afterwards, MANUALLY set up Google+ for your test account, either through a PC/Mac web browser or through your device, then try re-linking the app. This worked for me.

Exact steps for Samsung Galaxy S3:

Settings -> Google -> Google+ -> Apps with Google+ Sign-In -> tap the app and at the bottom, tap Disconnect App.

For what it’s worth, I also tapped the option to “Delete all activity for this app” as well when I deleted it.

Solution 2:

Your ids.xml has to look like:

<?xml version="1.0" encoding="utf-8"?><resources><stringname="app_id">XXXXXXXXX</string></resources>

And, in your manifest, you have to add:

    <meta-data android:name="com.google.android.gms.games.APP_ID"
    android:value="@string/app_id" />

Good luck!

Solution 3:

I recommend utilising the debug log trace in the GameHelper class to get a clearer picture of the error. You can simply make a call in your onCreate to do this...

enableDebugLog(true, "fred"); where "fred" is the tag you want to show on logcat

It is most likely that you will then see an error like "OnConnection Failed result 4... SIGN IN REQUIRED. If you then search SO for that message you should be able to make some progress.

Another possibility:

I managed to get my own leaderboard into production last night. The error you are describing is one that I (and judging by other comments that I have seen in error reports on SO ) and other people have also encountered. I found that I was unable to use the google account that I user in the developer console to sign on, even though it is explicitly listed as a testing account for the game. I tried shutting down the emulator, deleting and redefining the game in the developer console etc. but I have never been able to get it to work.

I used a different account and I was able to sign on. I do not know what the problem is with my developer console account - I also use it in Google Plus without problems. Incidentally, I am still unable to use my developer account on the production app with a real device.

My advice is to use a separate account for testing. Good luck !

Solution 4:

If you are using your production keystore to get the fingerprint, you need to export and use a release build. Otherwise, use the debug keystore to get the fingerprint.

According to https://developers.google.com/games/services/console/enabling#b_create_a_client_id - if using eclipse, the debug keystore is located at

~/.android/debug.keystore

One more thing, for me, I couldn't sign in using my publisher account but one of my other accounts worked ok. Maybe worth a try.

Solution 5:

One additional thing that can be tried is to send (as attachment) the exported and signed yourapp.apk to the tester's account's email, and then install the app through email (by clicking on the attachment), and not through the usb.

It seems to me the problem here is not with play services, but with google+, as it sometimes takes several days for the changes (such as deleting some info) to take effect. If nothing works, create a new gmail account, and try again (that's what "worked" for me eventually :)).

Edit: old accounts that didn't work initially started working after 4 - 5 days. Maybe it just takes Google some time to synchronize everything.

Post a Comment for "Google Play Game Services Sign In Button Spits "unknown Error""