[Resolved] Google Play Game Services - trouble signing in

With the sample code as a guide, I implemented Google Play Game Services.  I thought I was almost done only to discover it doesn’t work.  (Ugh, I should’ve checked the device build right away with a basic & simple login routine before coding everything else.)

My trouble is with the user initiated login.  It simply fails to complete on Nexus 7 with an alert:

Sign-in error

There was an issue with sign-in

What could cause this error?  I see adb logcat outputs that suggest it may have something to do with client ID (see below), but the app does have a registered client ID (it shows up in my Google APIs Console. )

I googled to see if I can find a solution, but only thing that came up was a mention of some SHA1 problem, but I don’t see how it may be fixed.  If it is indeed something to do with SHA1, how do I fix it?  Deleting the client ID from the Google APIs Console and creating a new one, or what?  Would deleting the client ID remove all the achievements and leaderboards I created for the app in Developer Console?  I really don’t cherish the idea of losing them all and starting from scratch again unless I absolutely have to…

Anyhow, I’d so appreciate any help/suggestions for resolving this.

Naomi


Here are some lines from adb logcat output that seem relevant:

D/BaseGameActivity( 7908): onConnectionFailed: result 4

E/Volley  ( 1568): [204] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxxxxxxxxxxxx

E/SignInIntentService( 1568): Access Not Configured

E/LoadSelfFragment( 7963): Unable to sign in - application does not have a registered client ID

And here are the full adb logcat output:

D/BaseGameActivity( 7908): onCreate: creating GamesClient

D/BaseGameActivity( 7908): onCreate: creating GamesPlusClient

D/BaseGameActivity( 7908): isGooglePlayServicesAvailable returned 0

D/BaseGameActivity( 7908): beginUserInitiatedSignIn: starting new sign-in flow.

D/BaseGameActivity( 7908): Connecting GamesClient.

D/BaseGameActivity( 7908): onConnectionFailed: result 4

D/BaseGameActivity( 7908): onConnectionFailed: since user initiated sign-in, trying to resolve problem.

D/BaseGameActivity( 7908): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{42846f90: android.os.BinderProxy@43172df0}}

D/BaseGameActivity( 7908): result has resolution. Starting it.

I/ActivityManager(  484): START u0 {cmp=com.google.android.gms/.games.ui.signin.SignInActivity (has extras)} from pid -1

D/dalvikvm(  484): GC_FOR_ALLOC freed 1273K, 35% free 16166K/24724K, paused 63ms, total 63ms

D/FlurryAgent( 7908): Ending session

I/ActivityManager(  484): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +76ms

D/dalvikvm( 1568): GC_CONCURRENT freed 648K, 23% free 9472K/12252K, paused 5ms+5ms, total 72ms

D/dalvikvm( 7979): GC_CONCURRENT freed 433K, 7% free 7888K/8476K, paused 4ms+4ms, total 50ms

E/Volley  ( 1568): [204] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxxxxxxxxxxxx

E/Volley  ( 1568): [204] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxxxxxxxxxxxx

E/SignInIntentService( 1568): Access Not Configured

E/SignInIntentService( 1568): aol

E/SignInIntentService( 1568):     at ajy.a(SourceFile:108)

E/SignInIntentService( 1568):     at abm.a(SourceFile:213)

E/SignInIntentService( 1568):     at abm.a(SourceFile:194)

E/SignInIntentService( 1568):     at aav.a(SourceFile:486)

E/SignInIntentService( 1568):     at aqu.a(SourceFile:221)

E/SignInIntentService( 1568):     at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343)

E/SignInIntentService( 1568):     at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)

E/SignInIntentService( 1568):     at android.os.Handler.dispatchMessage(Handler.java:99)

E/SignInIntentService( 1568):     at android.os.Looper.loop(Looper.java:137)

E/SignInIntentService( 1568):     at android.os.HandlerThread.run(HandlerThread.java:60)

E/LoadSelfFragment( 7963): Unable to sign in - application does not have a registered client ID

D/BaseGameActivity( 7908): onActivityResult, req 5 response 10004

D/BaseGameActivity( 7908): isGooglePlayServicesAvailable returned 0

D/BaseGameActivity( 7908): beginUserInitiatedSignIn: continuing pending sign-in flow.

D/BaseGameActivity( 7908): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{42846f90: android.os.BinderProxy@43172df0}}

D/BaseGameActivity( 7908): result has resolution. Starting it.

I/ActivityManager(  484): START u0 {cmp=com.google.android.gms/.games.ui.signin.SignInActivity (has extras)} from pid -1

D/dalvikvm( 7908): GC_CONCURRENT freed 1004K, 54% free 8226K/17548K, paused 2ms+2ms, total 37ms

D/dalvikvm(  484): GC_FOR_ALLOC freed 1177K, 37% free 15610K/24724K, paused 58ms, total 58ms

W/libc    ( 7908): pthread_create sched_setscheduler call failed: Operation not permitted

I/OpenAL_SLES( 7908): playback_function started

Hi Naomi.  I just tested my app that I have GPGS built in and I’m not getting an error logging in.  This sounds more like a configuration issue.

My build.settings:

   androidPermissions =    {        "android.permission.VIBRATE",        "android.permission.INTERNET"    },    android =    {       googlePlayGamesAppId = "123456789012",       largeHeap = true    },    plugins =    {       ["CoronaProvider.gameNetwork.google"] =       {          -- required          publisherId = "com.coronalabs",       },    },

My code:

local function gcLoginCallback(event)     print("in gcLoginCallback  -- successful Android login or Apple GameCenter connect")     --     -- do other stuff     --     return true end local function gpInitCallback(event)     print("gp call back")   -- will get here from Google, not Apple     if event.isError then         app.isConnected = false     else         print("Need to login")         gameNetwork.request( "login",         {             userInitiated=true,             listener=gcLoginCallback         })     end     print("done with gp callback") end local function authorize()     if device.isAndroid  then   -- my device module.  Detect Android as you see fit.         gameNetwork.init("google", gpInitCallback)     else         gameNetwork.init("gamecenter", gcLoginCallback)     end end

Tomorrow’s Blog tutorial post should be on setting this up.

Thank you, Rob.  Your code looks very much like mine.  Let me review my code again and see if I see anything amiss.  I’ll report back with result.

Thanks again.

Naomi

So I decided I should go ahead and plugin the required IDs from my app to the sample code in github, and I still get the very same error alert.  I think it confirms that the error is not triggered by how I wrote/coded the project files but has something to do with how I set up the Game Services for my app in Google Developer Console, and it might have something to do with SHA1 (because I’m not entirely sure if I got it done correctly.)

How do I fix it, though?  What do I need to do…?  I’m going to google “Unexpected response code 403” and see if I find some solution.  Meanwhile, I’d so appreciate to hear suggestions for things I should try.

I posted below the adb logcat output in its entirety when running the sample code project with my app IDs for reference.

Naomi


(FYI, I replaced the player id with xxxxxxxx as before.)

V/DeadZone(  583): consuming errant click: (244.8485,4.0)

D/BaseGameActivity( 2443): onCreate: creating GamesClient

D/BaseGameActivity( 2443): onCreate: creating GamesPlusClient

D/BaseGameActivity( 2443): isGooglePlayServicesAvailable returned 0

D/BaseGameActivity( 2443): beginUserInitiatedSignIn: starting new sign-in flow.

D/BaseGameActivity( 2443): Connecting GamesClient.

D/BaseGameActivity( 2443): onConnectionFailed: result 4

D/BaseGameActivity( 2443): onConnectionFailed: since user initiated sign-in, trying to resolve problem.

D/BaseGameActivity( 2443): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{41d4eb60: android.os.BinderProxy@41d77218}}

D/BaseGameActivity( 2443): result has resolution. Starting it.

I/ActivityManager(  479): START u0 {cmp=com.google.android.gms/.games.ui.signin.SignInActivity (has extras)} from pid -1

D/dalvikvm(  479): GC_FOR_ALLOC freed 394K, 13% free 13378K/15220K, paused 52ms, total 53ms

I/ActivityManager(  479): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +78ms

D/dalvikvm( 1040): GC_CONCURRENT freed 372K, 6% free 8417K/8944K, paused 12ms+5ms, total 52ms

E/Volley  ( 1040): [89] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxxxxx

E/Volley  ( 1040): [89] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxxxxx

E/SignInIntentService( 1040): Access Not Configured

E/SignInIntentService( 1040): aol

E/SignInIntentService( 1040):     at ajy.a(SourceFile:108)

E/SignInIntentService( 1040):     at abm.a(SourceFile:213)

E/SignInIntentService( 1040):     at abm.a(SourceFile:194)

E/SignInIntentService( 1040):     at aav.a(SourceFile:486)

E/SignInIntentService( 1040):     at aqu.a(SourceFile:221)

E/SignInIntentService( 1040):     at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343)

E/SignInIntentService( 1040):     at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)

E/SignInIntentService( 1040):     at android.os.Handler.dispatchMessage(Handler.java:99)

E/SignInIntentService( 1040):     at android.os.Looper.loop(Looper.java:137)

E/SignInIntentService( 1040):     at android.os.HandlerThread.run(HandlerThread.java:60)

E/LoadSelfFragment( 2504): Unable to sign in - application does not have a registered client ID

D/dalvikvm(  479): GC_FOR_ALLOC freed 354K, 12% free 13394K/15220K, paused 59ms, total 60ms

D/BaseGameActivity( 2443): onActivityResult, req 2 response 10004

D/BaseGameActivity( 2443): isGooglePlayServicesAvailable returned 0

D/BaseGameActivity( 2443): beginUserInitiatedSignIn: continuing pending sign-in flow.

D/BaseGameActivity( 2443): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{41d4eb60: android.os.BinderProxy@41d77218}}

D/BaseGameActivity( 2443): result has resolution. Starting it.

I/ActivityManager(  479): START u0 {cmp=com.google.android.gms/.games.ui.signin.SignInActivity (has extras)} from pid -1

D/dalvikvm(  479): GC_FOR_ALLOC freed 274K, 13% free 13377K/15220K, paused 56ms, total 57ms

D/dalvikvm( 2443): GC_CONCURRENT freed 1327K, 18% free 7990K/9696K, paused 10ms+2ms, total 35ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 25ms

D/dalvikvm( 2443): GC_CONCURRENT freed 517K, 19% free 7880K/9696K, paused 9ms+4ms, total 35ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 18ms

D/dalvikvm( 2443): GC_CONCURRENT freed 335K, 18% free 8013K/9696K, paused 8ms+2ms, total 26ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 18ms

D/dalvikvm( 2443): GC_CONCURRENT freed 444K, 18% free 8026K/9696K, paused 8ms+1ms, total 22ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 3ms

D/dalvikvm( 2443): GC_CONCURRENT freed 565K, 19% free 7895K/9696K, paused 5ms+2ms, total 26ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 9ms

D/dalvikvm( 2443): GC_CONCURRENT freed 43K, 14% free 8339K/9696K, paused 3ms+3ms, total 16ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 15ms

D/dalvikvm( 2443): GC_CONCURRENT freed 976K, 20% free 7852K/9696K, paused 12ms+11ms, total 66ms

I/ActivityManager(  479): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +100ms

D/dalvikvm( 1318): GC_CONCURRENT freed 410K, 7% free 8000K/8564K, paused 4ms+2ms, total 130ms

D/dalvikvm( 1040): GC_CONCURRENT freed 418K, 7% free 8438K/9012K, paused 4ms+7ms, total 67ms

E/Volley  ( 1040): [90] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxxxxx

E/Volley  ( 1040): [90] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxxxxx

E/SignInIntentService( 1040): Access Not Configured

E/SignInIntentService( 1040): aol

E/SignInIntentService( 1040):     at ajy.a(SourceFile:108)

E/SignInIntentService( 1040):     at abm.a(SourceFile:213)

E/SignInIntentService( 1040):     at abm.a(SourceFile:194)

E/SignInIntentService( 1040):     at aav.a(SourceFile:486)

E/SignInIntentService( 1040):     at aqu.a(SourceFile:221)

E/SignInIntentService( 1040):     at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343)

E/SignInIntentService( 1040):     at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)

E/SignInIntentService( 1040):     at android.os.Handler.dispatchMessage(Handler.java:99)

E/SignInIntentService( 1040):     at android.os.Looper.loop(Looper.java:137)

E/SignInIntentService( 1040):     at android.os.HandlerThread.run(HandlerThread.java:60)

E/LoadSelfFragment( 2504): Unable to sign in - application does not have a registered client ID

D/dalvikvm(  479): GC_FOR_ALLOC freed 352K, 12% free 13395K/15220K, paused 60ms, total 60ms

D/BaseGameActivity( 2443): onActivityResult, req 2 response 10004

D/BaseGameActivity( 2443): responseCode != RESULT_OK, so not reconnecting.

D/BaseGameActivity( 2443): giveUp: giving up on connection. Status code: 4

D/BaseGameActivity( 2443): ERROR CODE 4: message=There was an issue with sign-in. ; details=SIGN_IN_REQUIRED

D/dalvikvm( 2443): GC_CONCURRENT freed 250K, 17% free 8101K/9696K, paused 2ms+3ms, total 28ms

D/dalvikvm( 2443): GC_CONCURRENT freed 491K, 17% free 8112K/9696K, paused 4ms+6ms, total 44ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 18ms

D/dalvikvm( 2443): GC_CONCURRENT freed 420K, 17% free 8124K/9696K, paused 2ms+3ms, total 37ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 22ms

D/dalvikvm( 2443): GC_CONCURRENT freed 323K, 15% free 8257K/9696K, paused 5ms+2ms, total 27ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 14ms

D/dalvikvm( 2443): GC_CONCURRENT freed 455K, 15% free 8270K/9696K, paused 1ms+2ms, total 21ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 13ms

D/dalvikvm( 2443): GC_FOR_ALLOC freed 459K, 17% free 8097K/9696K, paused 21ms, total 21ms

D/dalvikvm( 2443): GC_CONCURRENT freed 1K, 12% free 8583K/9696K, paused 4ms+2ms, total 22ms

D/dalvikvm( 2443): GC_CONCURRENT freed 487K, 12% free 8583K/9696K, paused 2ms+3ms, total 27ms

Here are a couple of posts that mentions the very same trouble (and yeah, I’m glad I’m not the only one getting this error), and I think my hunch is right about SHA1.  It might be that I just have to redo the whole darn thing…  To avoid this problem, remember to follow the instruction about SHA1 very very VERY carefully when setting it up.  Ugh.

Naomi

http://stackoverflow.com/questions/16580885/google-play-game-services-unable-to-sign-in

http://stackoverflow.com/questions/16688029/unexpected-response-code-403-for-https-www-googleapis-com-games-v1-players-112

Now I’m getting “This client ID is globally unique and is already in use” error on Google Dev Console when re-doing the linked app.  It sounds like I need Google OAuth team to run some clean-up on the API Console database (as per this thread.)

To avoid this nightmare, make sure to enter correct SHA1 when creating client and authorizing the app.

Rob, with your tutorial blog about Google Play Game Services (which I haven’t seen yet), I think it would help a lot of devs if you mention how to retrieve SHA1 properly from terminal and enter it before clicking on “create client” button.

Naomi

The blog post should be out later today.  The tutorial doesn’t go into great detail on the Google interface, but does link to an existing walk through on it.

The thing is that you have to get the SHA1 thing right the first time.  As of now you cannot go back and change it, which sucks because they suggest using your debug keystore and there is no way that I’ve found to go back and change it.  You have to re-link the the app and I couldn’t get that to work either.   So I used my release keystore.  Also you can’t delete an GPGS service after it’s been published.  Things with lock icon’s cant be changed later. 

What I had to do was go and rename my first app “Don’t use” since I tried publishing it to see if that would solve my problems.  I created a second service, making sure I got the keystore stuff right the first time.   It confuses you because it puts a keystore value in the field for you and it looks like you can just save that.  It’s a trap! 

Do the command line keystore example and copy/paste the output value in that field before submitting it.

Yeah, the SHA1 trap bit me.  I now know what to do with it, but I can’t proceed because I’ve used the release keystore to begin with.  I have no other choice but to get it fixed.  The way it is, the dreadful “This client ID is globally unique and is already in use” error blocks me from going further.

My google search suggests only way to get this fixed is to have Google team remove the client ID I created with wrong SHA1 from the database.  Until it’s done, I cannot create client ID for my already published app.  This is a major pain in the neck.

Honestly, you should at least mention the SHA1 trap.  That’s one thing that seems to be extremely hard to fix.

Naomi

Remember your GPGS “app” is different than your .apk app.  You can create a new GPGS app and set it all up again, and when you link your .apk APP this time, get the SHA1 key the right way.  You can’t get rid of the first GPGS app.  They make it sound like they are the same.  For instance I felt I needed to name buy GPGS app Omniblaster because that’s the game that was going to use it.  I could have named it FredFlintstone and just linked Omniblaster too it.

Hey, Rob, thank you for the tip.  If I can’t get the new client ID after all, I’ll try that route.

Thanks again.

Naomi

So, the root of this problem was SHA1 being pre-filled along with other items when I linked an app to the Game Services.  

Pre-filled items are all valid except for SHA1, and because the example SHA1 and pre-filled SHA1 are different, it’s so easy to automatically think that Google system retrieved the correct SHA1 for the app.  

Pre-filling it with an invalid SHA1 is a bug that Google will be fixing (per the Google contact I communicated with.)  Once it’s fixed, this whole SHA1 trap should be gone.

Naomi

Yes, them pre-filling the SHA1 value with a bogus key is wrong on so many levels.  It burned me.  It’s going to burn more people before it’s said and done.    I wish I could stick an image of Admiral Ackbar from Star Wars in the Guide to bring people’s attention to that block saying “Its a TRAP!”

Hi Naomi.  I just tested my app that I have GPGS built in and I’m not getting an error logging in.  This sounds more like a configuration issue.

My build.settings:

   androidPermissions =    {        "android.permission.VIBRATE",        "android.permission.INTERNET"    },    android =    {       googlePlayGamesAppId = "123456789012",       largeHeap = true    },    plugins =    {       ["CoronaProvider.gameNetwork.google"] =       {          -- required          publisherId = "com.coronalabs",       },    },

My code:

local function gcLoginCallback(event)     print("in gcLoginCallback  -- successful Android login or Apple GameCenter connect")     --     -- do other stuff     --     return true end local function gpInitCallback(event)     print("gp call back")   -- will get here from Google, not Apple     if event.isError then         app.isConnected = false     else         print("Need to login")         gameNetwork.request( "login",         {             userInitiated=true,             listener=gcLoginCallback         })     end     print("done with gp callback") end local function authorize()     if device.isAndroid  then   -- my device module.  Detect Android as you see fit.         gameNetwork.init("google", gpInitCallback)     else         gameNetwork.init("gamecenter", gcLoginCallback)     end end

Tomorrow’s Blog tutorial post should be on setting this up.

Thank you, Rob.  Your code looks very much like mine.  Let me review my code again and see if I see anything amiss.  I’ll report back with result.

Thanks again.

Naomi

So I decided I should go ahead and plugin the required IDs from my app to the sample code in github, and I still get the very same error alert.  I think it confirms that the error is not triggered by how I wrote/coded the project files but has something to do with how I set up the Game Services for my app in Google Developer Console, and it might have something to do with SHA1 (because I’m not entirely sure if I got it done correctly.)

How do I fix it, though?  What do I need to do…?  I’m going to google “Unexpected response code 403” and see if I find some solution.  Meanwhile, I’d so appreciate to hear suggestions for things I should try.

I posted below the adb logcat output in its entirety when running the sample code project with my app IDs for reference.

Naomi


(FYI, I replaced the player id with xxxxxxxx as before.)

V/DeadZone(  583): consuming errant click: (244.8485,4.0)

D/BaseGameActivity( 2443): onCreate: creating GamesClient

D/BaseGameActivity( 2443): onCreate: creating GamesPlusClient

D/BaseGameActivity( 2443): isGooglePlayServicesAvailable returned 0

D/BaseGameActivity( 2443): beginUserInitiatedSignIn: starting new sign-in flow.

D/BaseGameActivity( 2443): Connecting GamesClient.

D/BaseGameActivity( 2443): onConnectionFailed: result 4

D/BaseGameActivity( 2443): onConnectionFailed: since user initiated sign-in, trying to resolve problem.

D/BaseGameActivity( 2443): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{41d4eb60: android.os.BinderProxy@41d77218}}

D/BaseGameActivity( 2443): result has resolution. Starting it.

I/ActivityManager(  479): START u0 {cmp=com.google.android.gms/.games.ui.signin.SignInActivity (has extras)} from pid -1

D/dalvikvm(  479): GC_FOR_ALLOC freed 394K, 13% free 13378K/15220K, paused 52ms, total 53ms

I/ActivityManager(  479): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +78ms

D/dalvikvm( 1040): GC_CONCURRENT freed 372K, 6% free 8417K/8944K, paused 12ms+5ms, total 52ms

E/Volley  ( 1040): [89] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxxxxx

E/Volley  ( 1040): [89] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxxxxx

E/SignInIntentService( 1040): Access Not Configured

E/SignInIntentService( 1040): aol

E/SignInIntentService( 1040):     at ajy.a(SourceFile:108)

E/SignInIntentService( 1040):     at abm.a(SourceFile:213)

E/SignInIntentService( 1040):     at abm.a(SourceFile:194)

E/SignInIntentService( 1040):     at aav.a(SourceFile:486)

E/SignInIntentService( 1040):     at aqu.a(SourceFile:221)

E/SignInIntentService( 1040):     at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343)

E/SignInIntentService( 1040):     at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)

E/SignInIntentService( 1040):     at android.os.Handler.dispatchMessage(Handler.java:99)

E/SignInIntentService( 1040):     at android.os.Looper.loop(Looper.java:137)

E/SignInIntentService( 1040):     at android.os.HandlerThread.run(HandlerThread.java:60)

E/LoadSelfFragment( 2504): Unable to sign in - application does not have a registered client ID

D/dalvikvm(  479): GC_FOR_ALLOC freed 354K, 12% free 13394K/15220K, paused 59ms, total 60ms

D/BaseGameActivity( 2443): onActivityResult, req 2 response 10004

D/BaseGameActivity( 2443): isGooglePlayServicesAvailable returned 0

D/BaseGameActivity( 2443): beginUserInitiatedSignIn: continuing pending sign-in flow.

D/BaseGameActivity( 2443): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{41d4eb60: android.os.BinderProxy@41d77218}}

D/BaseGameActivity( 2443): result has resolution. Starting it.

I/ActivityManager(  479): START u0 {cmp=com.google.android.gms/.games.ui.signin.SignInActivity (has extras)} from pid -1

D/dalvikvm(  479): GC_FOR_ALLOC freed 274K, 13% free 13377K/15220K, paused 56ms, total 57ms

D/dalvikvm( 2443): GC_CONCURRENT freed 1327K, 18% free 7990K/9696K, paused 10ms+2ms, total 35ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 25ms

D/dalvikvm( 2443): GC_CONCURRENT freed 517K, 19% free 7880K/9696K, paused 9ms+4ms, total 35ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 18ms

D/dalvikvm( 2443): GC_CONCURRENT freed 335K, 18% free 8013K/9696K, paused 8ms+2ms, total 26ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 18ms

D/dalvikvm( 2443): GC_CONCURRENT freed 444K, 18% free 8026K/9696K, paused 8ms+1ms, total 22ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 3ms

D/dalvikvm( 2443): GC_CONCURRENT freed 565K, 19% free 7895K/9696K, paused 5ms+2ms, total 26ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 9ms

D/dalvikvm( 2443): GC_CONCURRENT freed 43K, 14% free 8339K/9696K, paused 3ms+3ms, total 16ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 15ms

D/dalvikvm( 2443): GC_CONCURRENT freed 976K, 20% free 7852K/9696K, paused 12ms+11ms, total 66ms

I/ActivityManager(  479): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +100ms

D/dalvikvm( 1318): GC_CONCURRENT freed 410K, 7% free 8000K/8564K, paused 4ms+2ms, total 130ms

D/dalvikvm( 1040): GC_CONCURRENT freed 418K, 7% free 8438K/9012K, paused 4ms+7ms, total 67ms

E/Volley  ( 1040): [90] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxxxxx

E/Volley  ( 1040): [90] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxxxxx

E/SignInIntentService( 1040): Access Not Configured

E/SignInIntentService( 1040): aol

E/SignInIntentService( 1040):     at ajy.a(SourceFile:108)

E/SignInIntentService( 1040):     at abm.a(SourceFile:213)

E/SignInIntentService( 1040):     at abm.a(SourceFile:194)

E/SignInIntentService( 1040):     at aav.a(SourceFile:486)

E/SignInIntentService( 1040):     at aqu.a(SourceFile:221)

E/SignInIntentService( 1040):     at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343)

E/SignInIntentService( 1040):     at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)

E/SignInIntentService( 1040):     at android.os.Handler.dispatchMessage(Handler.java:99)

E/SignInIntentService( 1040):     at android.os.Looper.loop(Looper.java:137)

E/SignInIntentService( 1040):     at android.os.HandlerThread.run(HandlerThread.java:60)

E/LoadSelfFragment( 2504): Unable to sign in - application does not have a registered client ID

D/dalvikvm(  479): GC_FOR_ALLOC freed 352K, 12% free 13395K/15220K, paused 60ms, total 60ms

D/BaseGameActivity( 2443): onActivityResult, req 2 response 10004

D/BaseGameActivity( 2443): responseCode != RESULT_OK, so not reconnecting.

D/BaseGameActivity( 2443): giveUp: giving up on connection. Status code: 4

D/BaseGameActivity( 2443): ERROR CODE 4: message=There was an issue with sign-in. ; details=SIGN_IN_REQUIRED

D/dalvikvm( 2443): GC_CONCURRENT freed 250K, 17% free 8101K/9696K, paused 2ms+3ms, total 28ms

D/dalvikvm( 2443): GC_CONCURRENT freed 491K, 17% free 8112K/9696K, paused 4ms+6ms, total 44ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 18ms

D/dalvikvm( 2443): GC_CONCURRENT freed 420K, 17% free 8124K/9696K, paused 2ms+3ms, total 37ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 22ms

D/dalvikvm( 2443): GC_CONCURRENT freed 323K, 15% free 8257K/9696K, paused 5ms+2ms, total 27ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 14ms

D/dalvikvm( 2443): GC_CONCURRENT freed 455K, 15% free 8270K/9696K, paused 1ms+2ms, total 21ms

D/dalvikvm( 2443): WAIT_FOR_CONCURRENT_GC blocked 13ms

D/dalvikvm( 2443): GC_FOR_ALLOC freed 459K, 17% free 8097K/9696K, paused 21ms, total 21ms

D/dalvikvm( 2443): GC_CONCURRENT freed 1K, 12% free 8583K/9696K, paused 4ms+2ms, total 22ms

D/dalvikvm( 2443): GC_CONCURRENT freed 487K, 12% free 8583K/9696K, paused 2ms+3ms, total 27ms

Here are a couple of posts that mentions the very same trouble (and yeah, I’m glad I’m not the only one getting this error), and I think my hunch is right about SHA1.  It might be that I just have to redo the whole darn thing…  To avoid this problem, remember to follow the instruction about SHA1 very very VERY carefully when setting it up.  Ugh.

Naomi

http://stackoverflow.com/questions/16580885/google-play-game-services-unable-to-sign-in

http://stackoverflow.com/questions/16688029/unexpected-response-code-403-for-https-www-googleapis-com-games-v1-players-112

Now I’m getting “This client ID is globally unique and is already in use” error on Google Dev Console when re-doing the linked app.  It sounds like I need Google OAuth team to run some clean-up on the API Console database (as per this thread.)

To avoid this nightmare, make sure to enter correct SHA1 when creating client and authorizing the app.

Rob, with your tutorial blog about Google Play Game Services (which I haven’t seen yet), I think it would help a lot of devs if you mention how to retrieve SHA1 properly from terminal and enter it before clicking on “create client” button.

Naomi

The blog post should be out later today.  The tutorial doesn’t go into great detail on the Google interface, but does link to an existing walk through on it.

The thing is that you have to get the SHA1 thing right the first time.  As of now you cannot go back and change it, which sucks because they suggest using your debug keystore and there is no way that I’ve found to go back and change it.  You have to re-link the the app and I couldn’t get that to work either.   So I used my release keystore.  Also you can’t delete an GPGS service after it’s been published.  Things with lock icon’s cant be changed later. 

What I had to do was go and rename my first app “Don’t use” since I tried publishing it to see if that would solve my problems.  I created a second service, making sure I got the keystore stuff right the first time.   It confuses you because it puts a keystore value in the field for you and it looks like you can just save that.  It’s a trap! 

Do the command line keystore example and copy/paste the output value in that field before submitting it.

Yeah, the SHA1 trap bit me.  I now know what to do with it, but I can’t proceed because I’ve used the release keystore to begin with.  I have no other choice but to get it fixed.  The way it is, the dreadful “This client ID is globally unique and is already in use” error blocks me from going further.

My google search suggests only way to get this fixed is to have Google team remove the client ID I created with wrong SHA1 from the database.  Until it’s done, I cannot create client ID for my already published app.  This is a major pain in the neck.

Honestly, you should at least mention the SHA1 trap.  That’s one thing that seems to be extremely hard to fix.

Naomi

Remember your GPGS “app” is different than your .apk app.  You can create a new GPGS app and set it all up again, and when you link your .apk APP this time, get the SHA1 key the right way.  You can’t get rid of the first GPGS app.  They make it sound like they are the same.  For instance I felt I needed to name buy GPGS app Omniblaster because that’s the game that was going to use it.  I could have named it FredFlintstone and just linked Omniblaster too it.