Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

GPGS sign-in not working ("cancelled")
Started by J@V0 Sep 05 2019 11:11 AM

9 replies to this topic
gpgs

Best Answer J@V0 , 17 September 2019 - 12:03 AM

I have created a new app in my Google Play Console and rebuilt my app with a new key and it works now.

Not sure what was wrong because I followed the same steps as the tutorial, maybe not in the exact same order this time...

 

Thanks @TawaNicolas for the help!

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

J@V0

[GLOBAL: userInfoPane.html]
J@V0
  • Enthusiast

  • 89 posts
  • Corona SDK

I'm trying to add Google Services to my game and followed the tutorial here but the sign-in fails. I've tried debugging with Android Studio and logcat and noticed that gpgsInitListener throws the following as soon as the login starts:

 

event.isError: {
      isError = true,
      name = "login",
      phase = "canceled"
    }

Funny thing is that I never have the opportunity to choose which account to use (I think other apps show which email is being used and ask to continue). After I access the scene containing the code, I see a "Google Play Games" popup and then a spinning wheel followed by a black screen.

My code is exactly the same as in the tutorial, except for the packageName, appID and leaderboardID. I made sure the app signing is correct as well.

 

In the logcat I see the following messages:

2019-09-05 21:01:13.404 6603-10712/? W/GamesServiceBroker: Client connected with SDK 18360000, Services 19056039, and Games 110770048
2019-09-05 21:01:13.560 15677-15677/? W/SignInActivity: onSignInFailed()...
2019-09-05 21:01:13.560 15677-15677/? W/SignInActivity: Sign in failed during 6
2019-09-05 21:01:13.560 15677-15677/? W/SignInActivity: ==> Returning non-OK result: 10002
2019-09-05 21:01:13.589 6603-10712/? W/GamesServiceBroker: Client connected with SDK 18360000, Services 19056039, and Games 110770048

And looking at the doc:

The attempt to sign in to the Games service failed. For example, this might happen if the network is flaky, or the user's account has been disabled, or consent could not be obtained.

 

One thing to note is that my app is "pending publication" but I have added my email to the list of testers in the internal test section and it is rolled out.

 

Update: I'm attaching the full logs. It fails around line 1337.

Note: I've replaced my package name with something else in this file.

Attached Files

  • Attached File  logs.txt   285.57KB   1 downloads


[TOPIC: post.html]
#2

J@V0

[GLOBAL: userInfoPane.html]
J@V0
  • Enthusiast

  • 89 posts
  • Corona SDK

Both my game and applications are now published (internal test) and the problem remain. I checked the apk fingerprint and it is the correct one...

 

I realised that it might be an issue with the Google login rather than the corona plugin so I will try to ask on Stackoverflow. Will update this thread if I get any solution.



[TOPIC: post.html]
#3

TawaNicolas

[GLOBAL: userInfoPane.html]
TawaNicolas
  • Observer

  • 23 posts
  • Corona SDK

Any updates on this? I'm having the same problem.



[TOPIC: post.html]
#4

J@V0

[GLOBAL: userInfoPane.html]
J@V0
  • Enthusiast

  • 89 posts
  • Corona SDK

Unfortunately no, try Stackoverflow but no luck so far....



[TOPIC: post.html]
#5

TawaNicolas

[GLOBAL: userInfoPane.html]
TawaNicolas
  • Observer

  • 23 posts
  • Corona SDK

Turns out, for me, I had missed some steps in the setup.

I followed the tutorial on this page and it solved my problem, maybe this can be helpful for you as well:

http://docs.coronalabs.com/tutorial/games/gameLeaderboards/index.html



[TOPIC: post.html]
#6

J@V0

[GLOBAL: userInfoPane.html]
J@V0
  • Enthusiast

  • 89 posts
  • Corona SDK

I followed this tutorial as well. Did you change anything besides from:

YOUR_APPLICATION_ID
leaderboardId = "CgkA8kb12jK0onOQBg"
globalData.gpgs.leaderboards.show( "CgkA8kb12jK0onOQBg" )


[TOPIC: post.html]
#7

TawaNicolas

[GLOBAL: userInfoPane.html]
TawaNicolas
  • Observer

  • 23 posts
  • Corona SDK

No I didn't. But my issue was caused because I did not enable the stuff they mention on the Google console thing.

Did you enable Drive API and Google Play Game Services API?



[TOPIC: post.html]
#8

J@V0

[GLOBAL: userInfoPane.html]
J@V0
  • Enthusiast

  • 89 posts
  • Corona SDK

Google Play Developer API was indeed not enabled but even after enabling it I get the same error. Did you have to wait or re-build after enabling the APIs?



[TOPIC: post.html]
#9

TawaNicolas

[GLOBAL: userInfoPane.html]
TawaNicolas
  • Observer

  • 23 posts
  • Corona SDK

No it worked immediately.



[TOPIC: post.html]
#10

J@V0

[GLOBAL: userInfoPane.html]
J@V0
  • Enthusiast

  • 89 posts
  • Corona SDK

  Best Answer

I have created a new app in my Google Play Console and rebuilt my app with a new key and it works now.

Not sure what was wrong because I followed the same steps as the tutorial, maybe not in the exact same order this time...

 

Thanks @TawaNicolas for the help!




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: gpgs