Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Google Play Game Services login issues
Started by greenrift Jun 06 2013 11:14 AM

- - - - -
44 replies to this topic
google gamenetwork game services login
[TOPIC CONTROLS]
Page 1 of 2 1 2
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

greenrift

[GLOBAL: userInfoPane.html]
greenrift
  • Enthusiast

  • 45 posts
  • Enterprise

Been trying out the Google Play Game services plugin and every time I try to login, I get an alert stating: "Sign-in error".  Has anyone had any success logging in yet?  Looks like it inits fine and I get the login flow showing up on the screen, but it ends with that alert.  Below is the code I use to get things going in my main.lua.

 

local loggedIntoGC = false
local function googleLogin()
    local function requestCallback(event)
      if(event.isError) then
        print("ERROR LOGGING IN")
      else
        loggedIntoGC = true
        print("SUCCESS??")
      end
  end
  if(not loggedIntoGC) then
    gameNetwork.request( "login",
    {
       userInitiated=true,
       listener=requestCallback
    })
  elseif(gameNetwork.request("isConnected")) then
    print("GAMENETWORK IS CONNECTED FOR SURE")
  else
    print("GAMENETWORK IS NOT CONNECTED?")
  end
end
local function initCallback(event)
  if(event.data) then
    -- loggedIntoGC = true
    print("GOOGLE SERVICES INITIALIZED")
    print(event.data)
    googleLogin()
  end
end
local function onSystemEvent(event)
  if(event.type == "applicationStart") then
    print("CALLING INIT")
    gameNetwork.init("google", initCallback)
    return true
  end
end
Runtime:addEventListener("system", onSystemEvent)



[TOPIC: post.html]
#2

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

I just started integrating this today and seeing the exact same thing.  Hopefully someone can shed some light on this.



[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,791 posts
  • Enterprise

Thanks for the early feed back.  I'm investigating and will try to get you an answer soon.



[TOPIC: post.html]
#4

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

Chip Chain (the first consumer of this new plugin) works fine. But it probably used and earlier version than we are using. Thanks for checking into this.

[TOPIC: post.html]
#5

dchan

[GLOBAL: userInfoPane.html]
dchan
  • Contributor

  • 360 posts
  • Corona Staff

[TOPIC: post.html]
#6

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

@dchan I'm pretty sure I did all those steps correctly.

[TOPIC: post.html]
#7

dchan

[GLOBAL: userInfoPane.html]
dchan
  • Contributor

  • 360 posts
  • Corona Staff

Did you look into logcat to see if a reason was given there?



[TOPIC: post.html]
#8

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,791 posts
  • Enterprise

So lets say you missed the step of getting the SHA1 codes from the keystore.  How do you go back in and re-do the Oauth2 setup?  In says for production you have to repeat the step but I don't see where?



[TOPIC: post.html]
#9

dchan

[GLOBAL: userInfoPane.html]
dchan
  • Contributor

  • 360 posts
  • Corona Staff

Only way that I see how is to delete the linked game and then make another one.



[TOPIC: post.html]
#10

greenrift

[GLOBAL: userInfoPane.html]
greenrift
  • Enthusiast

  • 45 posts
  • Enterprise

Looks like it cannot find appropriate client ids.  So, it looks like it cannot find a suitable linked app client id.  However, I have created both production and debug client ids for my test app (and yes appropriate SHA1s from the keystore).  I even tried again and it said the SHA1s were already in use.  So they were created correctly.  I've gotten it to work on a few non-Corona apps.

 

Logcat:

 

E/Volley  (24903): [217650] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/117164537067318863601
E/Volley  (24903): [217650] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/117164537067318863601
E/SignInIntentService(24903): Access Not Configured
E/SignInIntentService(24903): aol
E/SignInIntentService(24903):   at ajy.a(SourceFile:108)
E/SignInIntentService(24903):   at abm.a(SourceFile:213)
E/SignInIntentService(24903):   at abm.a(SourceFile:194)
E/SignInIntentService(24903):   at aav.a(SourceFile:486)
E/SignInIntentService(24903):   at aqu.a(SourceFile:221)
E/SignInIntentService(24903):   at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343)
E/SignInIntentService(24903):   at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/SignInIntentService(24903):   at android.os.Handler.dispatchMessage(Handler.java:99)
E/SignInIntentService(24903):   at android.os.Looper.loop(Looper.java:137)
E/SignInIntentService(24903):   at android.os.HandlerThread.run(HandlerThread.java:60)
E/LoadSelfFragment(24976): Unable to sign in - application does not have a registered client ID
D/BaseGameActivity(24719): onActivityResult, req 1 response 10004
D/BaseGameActivity(24719): responseCode != RESULT_OK, so not reconnecting.
D/BaseGameActivity(24719): giveUp: giving up on connection. Status code: 4
D/BaseGameActivity(24719): ERROR CODE 4: message=There was an issue with sign-in.; details=SIGN_IN_REQUIRED


[TOPIC: post.html]
#11

greenrift

[GLOBAL: userInfoPane.html]
greenrift
  • Enthusiast

  • 45 posts
  • Enterprise

Only way that I see how is to delete the linked game and then make another one.

That is correct.  You cannot go back and re-authorize an existing linked app.



[TOPIC: post.html]
#12

greenrift

[GLOBAL: userInfoPane.html]
greenrift
  • Enthusiast

  • 45 posts
  • Enterprise

Did you guys set up everything in the developers console?

https://developers.google.com/games/services/console/enabling

https://developers.google.com/games/services/console/configuring

 

Yes.  I've done this on a few non-Corona apps and things are fine on those.



[TOPIC: post.html]
#13

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

ya, I went through all the steps again and still getting the same error.

 

i looked in logcat.  i was getting invalid client id, so I trimmed it down to just the number part as others suggested.  then I get a 403.  I'll keep playing with it.



[TOPIC: post.html]
#14

greenrift

[GLOBAL: userInfoPane.html]
greenrift
  • Enthusiast

  • 45 posts
  • Enterprise

ya, I went through all the steps again and still getting the same error.

 

i looked in logcat.  i was getting invalid client id, so I trimmed it down to just the number part as others suggested.  then I get a 403.  I'll keep playing with it.

Just a FYI, both in standard Android and in Corona, all that is required is the application id (number that is next to the game name in the game services game details screen).  I have yet to need to use the authenticated app id (OAuth id) in any of my Android apps.  Not sure if that is the case on the iOS or web side.



[TOPIC: post.html]
#15

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

Ok, I started all over.  Removed Game Services for my game and went to API Console and removed all associated client ids.  Then I followed the direction stated earlier using the SHA1 key from my debug.keystore.  Again I get the "sign-in error".  Here's what logcat reports.  Any help is appreciated, as I am completely stuck.

 

 

D/BaseGameActivity(30607): onCreate: creating GamesClient
D/BaseGameActivity(30607): onCreate: creating GamesPlusClient
D/BaseGameActivity(30607): isGooglePlayServicesAvailable returned 0
D/BaseGameActivity(30607): beginUserInitiatedSignIn: starting new sign-in flow.
D/BaseGameActivity(30607): Connecting GamesClient.
D/BaseGameActivity(30607): onConnectionFailed: result 4
D/BaseGameActivity(30607): onConnectionFailed: since user initiated sign-in, trying to resolve problem.
D/BaseGameActivity(30607): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{2ba55af0: android.os.BinderProxy@2ba69b80}}
D/BaseGameActivity(30607): result has resolution. Starting it.
E/Trace   (30689): error opening trace file: No such file or directory (2)
I/Recovery(10171): Received: Intent { act=com.google.android.gms.INITIALIZE flg=0x10 pkg=com.google.android.gms cmp=com.google.android.gms/.recovery.AccountRecoveryService$Receiver }
D/dalvikvm(23357): GC_CONCURRENT freed 453K, 50% free 3801K/7588K, paused 3ms+3ms, total 35ms
D/dalvikvm(23357): WAIT_FOR_CONCURRENT_GC blocked 23ms
D/libEGL  (30689): loaded /system/lib/egl/libEGL_adreno200.so
D/libEGL  (30689): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
D/libEGL  (30689): loaded /system/lib/egl/libGLESv2_adreno200.so
I/Adreno200-EGL(30689): <qeglDrvAPI_eglInitialize:294>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_JB.04.01.01.00.036_msm8960_JB_CL2644550_release_AU (CL2644550)
I/Adreno200-EGL(30689): Build Date: 07/31/12 Tue
I/Adreno200-EGL(30689): Local Branch:
I/Adreno200-EGL(30689): Remote Branch: quic/master
I/Adreno200-EGL(30689): Local Patches: NONE
I/Adreno200-EGL(30689): Reconstruct Branch: AU_LINUX_ANDROID_JB.04.01.01.00.036 +  NOTHING
D/GCM     (23357): GcmService start Intent { act=com.google.android.gms.INITIALIZE flg=0x10 pkg=com.google.android.gms cmp=com.google.android.gms/.gcm.GcmService } com.google.android.gms.INITIALIZE
D/OpenGLRenderer(30689): Enabling debug mode 0
I/ActivityManager(  537): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +368ms
E/GameAgent(10171): Unable to retrieve 1P application 962042484436 from network
E/CheckGameplayAcl(30689): Unable to load metadata for game
D/BaseGameActivity(30607): onActivityResult, req 1 response 10002
D/BaseGameActivity(30607): isGooglePlayServicesAvailable returned 0
D/BaseGameActivity(30607): beginUserInitiatedSignIn: continuing pending sign-in flow.
D/BaseGameActivity(30607): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{2ba55af0: android.os.BinderProxy@2ba69b80}}
D/BaseGameActivity(30607): result has resolution. Starting it.
D/dalvikvm(  537): JIT code cache reset in 5 ms (1048552 bytes 7/0)
D/dalvikvm(  537): GC_FOR_ALLOC freed 988K, 28% free 8391K/11636K, paused 86ms, total 89ms
W/libc    (30607): pthread_create sched_setscheduler call failed: Operation not permitted
I/OpenAL_SLES(30607): playback_function started
D/dalvikvm(30607): GC_FOR_ALLOC freed 1506K, 70% free 2704K/8760K, paused 21ms, total 23ms
I/dalvikvm-heap(30607): Grow heap (frag case) to 3.923MB for 640016-byte allocation
D/dalvikvm(30607): GC_CONCURRENT freed 50K, 63% free 3309K/8760K, paused 5ms+5ms, total 39ms
D/dalvikvm(30607): WAIT_FOR_CONCURRENT_GC blocked 1ms
I/dalvikvm-heap(30607): Grow heap (frag case) to 4.514MB for 640016-byte allocation
D/dalvikvm(30607): GC_CONCURRENT freed 628K, 63% free 3306K/8760K, paused 3ms+5ms, total 34ms
D/dalvikvm(30607): GC_FOR_ALLOC freed 633K, 70% free 2681K/8760K, paused 20ms, total 20ms
I/dalvikvm-heap(30607): Grow heap (frag case) to 4.435MB for 1200016-byte allocation
D/dalvikvm(30607): GC_CONCURRENT freed 9K, 57% free 3854K/8760K, paused 3ms+11ms, total 50ms
D/dalvikvm(30607): GC_FOR_ALLOC freed 18K, 57% free 3846K/8760K, paused 19ms, total 19ms
I/dalvikvm-heap(30607): Grow heap (frag case) to 5.572MB for 1200016-byte allocation
D/dalvikvm(30607): GC_CONCURRENT freed 3K, 43% free 5018K/8760K, paused 4ms+1ms, total 26ms
D/dalvikvm(30607): GC_FOR_ALLOC freed 2351K, 63% free 3268K/8760K, paused 16ms, total 16ms
I/dalvikvm-heap(30607): Grow heap (frag case) to 4.449MB for 614416-byte allocation
I/Corona  (30607): Menu: enterScene event
D/dalvikvm(30607): GC_CONCURRENT freed 605K, 63% free 3265K/8760K, paused 3ms+4ms, total 48ms
I/ActivityManager(  537): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +158ms
E/GameAgent(10171): Unable to retrieve 1P application 962042484436 from network
E/CheckGameplayAcl(30689): Unable to load metadata for game
D/BaseGameActivity(30607): onActivityResult, req 1 response 10002
D/BaseGameActivity(30607): responseCode != RESULT_OK, so not reconnecting.
D/BaseGameActivity(30607): giveUp: giving up on connection. Status code: 4
D/BaseGameActivity(30607): ERROR CODE 4: message=There was an issue with sign-in.; details=SIGN_IN_REQUIRED


[TOPIC: post.html]
#16

dchan

[GLOBAL: userInfoPane.html]
dchan
  • Contributor

  • 360 posts
  • Corona Staff

Just to be sure, have you guys put in your application id number as documented here:

http://docs.coronalabs.com/daily/plugin/gameNetwork-google/index.html#build.settings?

 

settings =
{
    android =
    {
        googlePlayGamesAppId = "123456789012" -- Your Google Play Games App Id
    },
    plugins =
    {
        -- key is the name passed to Lua's 'require()'
        ["CoronaProvider.gameNetwork.google"] =
        {
            -- required
            publisherId = "com.coronalabs",
        },
    },
}


[TOPIC: post.html]
#17

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

Here's mine

 

 

    android =
    {
        googlePlayGamesAppId = "962042484436",
        
        versionCode = "4",
        
        usesPermissions =
        {
          "android.permission.INTERNET",
          "com.android.vending.CHECK_LICENSE",
          "com.android.vending.BILLING"
        }
    },
    
    plugins =
    {
        ["CoronaProvider.gameNetwork.google"] =
        {
            publisherId = "com.coronalabs"
        }
    }


[TOPIC: post.html]
#18

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

Ok, I had forgotten to add my account to the test accounts.  Now I get EXACTLY the same error as greenrift does:

 

 

D/GCM     (  915): GcmService start Intent { act=com.google.android.gms.INITIALIZE flg=0x10 pkg=com.google.android.gms cmp=com.google.android.gms/.gcm.GcmService } com.google.android.gms.INITIALIZE
I/ActivityManager(  537): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +309ms
D/dalvikvm( 1381): GC_EXPLICIT freed 2521K, 66% free 2597K/7588K, paused 5ms+8ms, total 68ms
E/GameAgent(  989): Unable to retrieve 1P application 962042484436 from network
E/PlayerAgent(  989): Unable to load player 112854740871344749979
D/BaseGameActivity( 2860): onActivityResult, req 1 response 10002
D/BaseGameActivity( 2860): isGooglePlayServicesAvailable returned 0
D/BaseGameActivity( 2860): beginUserInitiatedSignIn: continuing pending sign-in flow.
D/BaseGameActivity( 2860): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{2b7b9ff0: android.os.BinderProxy@2b8606d8}}
D/BaseGameActivity( 2860): result has resolution. Starting it.
I/ActivityManager(  537): START u0 {cmp=com.google.android.gms/.games.ui.signin.SignInActivity (has extras)} from pid -1
W/libc    ( 2860): pthread_create sched_setscheduler call failed: Operation not permitted
I/OpenAL_SLES( 2860): playback_function started
D/dalvikvm( 2860): GC_FOR_ALLOC freed 176K, 65% free 3120K/8764K, paused 29ms, total 34ms
I/dalvikvm-heap( 2860): Grow heap (frag case) to 4.330MB for 640016-byte allocation
D/dalvikvm( 2860): GC_CONCURRENT freed 50K, 58% free 3725K/8764K, paused 3ms+3ms, total 43ms
D/dalvikvm( 2860): WAIT_FOR_CONCURRENT_GC blocked 7ms
I/dalvikvm-heap( 2860): Grow heap (frag case) to 4.920MB for 640016-byte allocation
D/dalvikvm( 2860): GC_CONCURRENT freed 1279K, 65% free 3102K/8764K, paused 2ms+4ms, total 52ms
D/dalvikvm( 2860): WAIT_FOR_CONCURRENT_GC blocked 11ms
I/dalvikvm-heap( 2860): Grow heap (frag case) to 4.845MB for 1200016-byte allocation
D/dalvikvm( 2860): GC_CONCURRENT freed 17K, 52% free 4256K/8764K, paused 4ms+2ms, total 28ms
D/dalvikvm( 2860): WAIT_FOR_CONCURRENT_GC blocked 16ms
I/dalvikvm-heap( 2860): Grow heap (frag case) to 5.973MB for 1200016-byte allocation
D/dalvikvm( 2860): GC_CONCURRENT freed 2346K, 65% free 3082K/8764K, paused 3ms+4ms, total 36ms
D/dalvikvm( 2860): WAIT_FOR_CONCURRENT_GC blocked 17ms
I/dalvikvm-heap( 2860): Grow heap (frag case) to 4.268MB for 614416-byte allocation
D/dalvikvm( 2860): GC_CONCURRENT freed <1K, 58% free 3682K/8764K, paused 3ms+2ms, total 21ms
D/dalvikvm( 2860): WAIT_FOR_CONCURRENT_GC blocked 13ms
I/dalvikvm-heap( 2860): Grow heap (frag case) to 4.854MB for 614416-byte allocation
I/Corona  ( 2860): Menu: enterScene event
D/dalvikvm( 2860): GC_CONCURRENT freed 1205K, 65% free 3079K/8764K, paused 3ms+2ms, total 60ms
D/dalvikvm( 1492): GC_CONCURRENT freed 1236K, 29% free 6223K/8652K, paused 11ms+18ms, total 99ms
I/ActivityManager(  537): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +130ms
D/dalvikvm(  989): GC_CONCURRENT freed 475K, 58% free 3200K/7588K, paused 6ms+6ms, total 38ms
E/Volley  (  989): [69] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/112854740871344749979
E/Volley  (  989): [69] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/112854740871344749979
E/SignInIntentService(  989): Access Not Configured
E/SignInIntentService(  989): aol
E/SignInIntentService(  989):   at ajy.a(SourceFile:108)
E/SignInIntentService(  989):   at abm.a(SourceFile:213)
E/SignInIntentService(  989):   at abm.a(SourceFile:194)
E/SignInIntentService(  989):   at aav.a(SourceFile:486)
E/SignInIntentService(  989):   at aqu.a(SourceFile:221)
E/SignInIntentService(  989):   at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343)
E/SignInIntentService(  989):   at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/SignInIntentService(  989):   at android.os.Handler.dispatchMessage(Handler.java:99)
E/SignInIntentService(  989):   at android.os.Looper.loop(Looper.java:137)
E/SignInIntentService(  989):   at android.os.HandlerThread.run(HandlerThread.java:60)
D/dalvikvm(  989): GC_CONCURRENT freed 354K, 57% free 3264K/7588K, paused 3ms+4ms, total 38ms
E/LoadSelfFragment( 6979): Unable to sign in - application does not have a registered client ID
D/dalvikvm(  537): GC_FOR_ALLOC freed 601K, 24% free 8291K/10884K, paused 65ms, total 68ms
D/BaseGameActivity( 2860): onActivityResult, req 1 response 10004
D/BaseGameActivity( 2860): responseCode != RESULT_OK, so not reconnecting.
D/BaseGameActivity( 2860): giveUp: giving up on connection. Status code: 4
D/BaseGameActivity( 2860): ERROR CODE 4: message=There was an issue with sign-in.; details=SIGN_IN_REQUIRED


[TOPIC: post.html]
#19

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,791 posts
  • Enterprise

I guess I'm blind.  How do  you delete things?  I can't unlink an app.  I can't delete the game.  I had one that wasn't finished and I could delete it.  My test app is currently unpublished, I've blown away everything on the api site, but I can't make it go away from the Google Play Games page or unlink my apps.

 

Am I missing something?



[TOPIC: post.html]
#20

dchan

[GLOBAL: userInfoPane.html]
dchan
  • Contributor

  • 360 posts
  • Corona Staff

When you click on the linked app, on the bottom of the page theres a button that says "Remove this app".



[TOPIC: post.html]
#21

dchan

[GLOBAL: userInfoPane.html]
dchan
  • Contributor

  • 360 posts
  • Corona Staff

Can funkvisions and greenrift try deleting the whole game and try again?  I've had this problem before and that solved it.  I know you just tried this funkyvision but you also had the testing account problem which might have messed with the results.



[TOPIC: post.html]
#22

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

Right... I blew away the entire game and all the stuff in api console.  When I recreated it I forgot to add my test account.  So I did start all over, I just forgot the one step and when I added it I got to the point greenrift did.



[TOPIC: post.html]
#23

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

Interesting... I just rebuilt using my production keystore instead of debug (after I added another client id for that SHA1 to the api console).  Now I get a "quota exceeded" error... strange... but at least maybe progress.



[TOPIC: post.html]
#24

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

Hooray! I finally got mine to work.  But only for my production/release key.  I had to go back and make sure I checked "This app is preferred for new installations." for the entry I was using.  It still seems a little flakey, but I'll play around with it some more.



[TOPIC: post.html]
#25

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

I think I got everything working properly.  I just pushed an update of my game to Google Play with the leaderboards enabled. We'll see how it goes!




[topic_controls]
Page 1 of 2 1 2
 
[/topic_controls]