I’m trying to add Google Services to my game and followed the tutorial herebut 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.