Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Login issues with Google Play Game Services

I'm currently implementing the Google Play Game Service into my game to provide a multiplayer real-time gaming feature (using libgdx and BaseGameUtils).

Everything is working fine on my Nexus 4 with my main Google account (Sign in, creating a room, etc.), call it "A".

To test the automatching and message sending/receiving, I've created a second Google account, call it "B", and added this account to my (factory resetted) Samsung Galaxy Tab.

At first everything worked there also fine - I was able to create a automatched room, send and receive text messages, etc. But after 15 minutes of testing, I wasn't able to login anymore with account "B" on Galaxy Tab. Account "A" on Nexus 4 still works fine.

To rule out any problems with the device, I've added account "A" to my Galaxy Tab and login was successful. I've also added account "B" to my Nexus 4 and the login doesn't work.

After waiting some time (30 minutes), immedetiately the login with account "B" works again on both devices. And that's my current state: I can do some tests with account "B", but after a short time it get's "blocked" and I have to wait, until I can use it again. Account "A" works always.

While this "blocking" time, I've tried everything: deleting app data/cache, deleting play-service data/cache, unlinking app with my the "B"-account. Nothing works. Here's the logcat output, if I want to login with account "B" while it is "blocked":

07-27 13:20:35.508: I/dul(13742): I/O exception (org.apache.http.NoHttpResponseException)   caught when processing request: The target server failed to respond
07-27 13:20:35.508: I/dul(13742): Retrying request
07-27 13:20:35.808: E/Volley(13742): [1224] ip.a: Unexpected response code 403 for   https://www.googleapis.com/games/v1/players/102515671693140579145
07-27 13:20:35.818: E/SignInIntentService(13742): Access Not Configured
07-27 13:20:35.818: E/SignInIntentService(13742): ark
07-27 13:20:35.818: E/SignInIntentService(13742):   at ams.b(SourceFile:189)
07-27 13:20:35.818: E/SignInIntentService(13742):   at ams.a(SourceFile:111)
07-27 13:20:35.818: E/SignInIntentService(13742):   at adz.a(SourceFile:220)
07-27 13:20:35.818: E/SignInIntentService(13742):   at adz.a(SourceFile:201)
07-27 13:20:35.818: E/SignInIntentService(13742):   at adi.a(SourceFile:489)
07-27 13:20:35.818: E/SignInIntentService(13742):   at att.a(SourceFile:221)
07-27 13:20:35.818: E/SignInIntentService(13742):   at   com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343 )
07-27 13:20:35.818: E/SignInIntentService(13742):   at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
07-27 13:20:35.818: E/SignInIntentService(13742):   at android.os.Handler.dispatchMessage(Handler.java:99)
07-27 13:20:35.818: E/SignInIntentService(13742):   at android.os.Looper.loop(Looper.java:137)
07-27 13:20:35.818: E/SignInIntentService(13742):   at android.os.HandlerThread.run(HandlerThread.java:60)
07-27 13:20:35.818: E/LoadSelfFragment(16159): Unable to sign in - application does not have a registered client ID

Of course I have a registered client ID, otherwise I couldn't login with account "A" and sometimes with account "B". Of course I added both accounts in the Developer Console to the testing whitelist. And of course I added the correct application ID via resource-link to my manifest.

I don't think it has something to do with my code, because account A never has problems, and account B works "sometimes". Are there any known issues with the testing whitelist? Or do you have any suggestions how to solve that problem? Btw I also don't think that I'm quota restricted, because that would effect both accounts, wouldn't it?

I really appreciate your help

like image 286
mavoka Avatar asked Jul 27 '13 11:07

mavoka


1 Answers

This behavior will occur if:

Current user is connected into any room and:

the app is restarted such that it tries to login to Google Services without having gone through the disconnect portion as required by Google Play Services.

I found this happened to me quite regularly (unfortunately for me) as I was figuring out how to pass messages between my Android code and LibGDX code side (my app would just Lock up due to synchronization issues). I also setup some test accounts that I could "cycle" through to avoid being completely locked out of logging in. However, I found out that if I used Task Manager to Kill the process before restarting the app, 90+ percent of the time, I could continue to use the same account.

If you are updating your code, and load to the device while you are in a Room, this will also earn you the server wrath for approximately 30 minutes for that account.

In short, to keep your account viable:

1) ensure you LeaveRoom prior to updating your code (I have found logging out of PS is not required) 2) If your app locks up... Killing the process via Task Manager (I use Samsung) will most likely let your account continue (you can see in the logcat where it calls the disconnect when you do that) when you start up the app again.

like image 165
user2346305 Avatar answered Oct 14 '22 10:10

user2346305