I'm having a problem with GPGS not authenticating in my game developed in Unity.
Screenshot: View post on imgur.com
The occurrences are as follows:
1. Connecting to game
2. GOOGLE PLAY GAMES window pops up and disappears (above image)
3. A loading circle appears and then disappears
I ran adb logcat on my phone and below is a snippet of the area which I think is the problem:
04-30 09:45:10.023 11290 11316 W Unity :
04-30 09:45:10.023 11290 11316 W Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
04-30 09:45:10.023 11290 11316 W Unity :
04-30 09:45:10.044 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.058 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.065 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.073 3470 11371 V AccountUtils: 0 accounts found with uca feature
04-30 09:45:10.081 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.124 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.126 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.270 2097 2892 I BroadcastQueue: am_broadcast_enqueue: [background,0,Intent { act=com.facebook.messages.ipc.peersPROD flg=0x10 (has extras) },2]
04-30 09:45:10.270 2097 2141 I BroadcastQueue: am_broadcast_finished: [background,0,Intent { act=com.facebook.messages.ipc.peersPROD flg=0x10 (has extras) }]
04-30 09:45:10.276 20864 21291 W Auth : [GetToken] GetToken failed with status code: UNREGISTERED_ON_API_CONSOLE
04-30 09:45:10.282 3470 27320 E TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: UNREGISTERED_ON_API_CONSOLE
04-30 09:45:10.294 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.301 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.302 11290 11290 V GamesNativeSDK: Play Games callback indicates connection failure.
04-30 09:45:10.302 11290 11368 I GamesNativeSDK: UI interaction required to connect to Google Play.
04-30 09:45:10.339 11290 11368 I GamesNativeSDK: Auth operation started: SIGN IN
04-30 09:45:10.339 11290 11368 I GamesNativeSDK: Connecting to Google Play...
04-30 09:45:10.346 3470 7470 W GamesServiceBroker: Client connected with SDK 10084000, Services 10298448, and Games 39080048
04-30 09:45:10.358 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.366 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.373 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.383 3470 11371 V AccountUtils: 0 accounts found with uca feature
04-30 09:45:10.391 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.410 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.427 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.517 20864 10927 W Auth : [GetToken] GetToken failed with status code: UNREGISTERED_ON_API_CONSOLE
04-30 09:45:10.518 3470 27320 E TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: UNREGISTERED_ON_API_CONSOLE
04-30 09:45:10.545 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.547 2097 2171 I art : Starting a blocking GC Explicit
04-30 09:45:10.548 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.550 11290 11290 V GamesNativeSDK: Play Games callback indicates connection failure.
04-30 09:45:10.550 11290 11368 I GamesNativeSDK: UI interaction required to connect to Google Play.
04-30 09:45:10.550 11290 11368 I GamesNativeSDK: Resolving connection.
It appears that the game was unregistered in the API console from the above logcat. I saw this answer here and went to check my OAuth2 Client IDs on both the Developer Console and the API Console, and they were identical. I am also using a tester account.
What bugs me is that a game I developed last year had no problems (using Unity 5.4.2 & GPGS version 0.9.35) yet the game I am currently doing is experiencing this (using Unity 5.6 & GPGS version 0.9.36), and I really don't want to push back schedules because of this.
Someone somewhere online gave the suggestion of updating SDK Tools and Google Repository to the latest version, but it just makes Unity unable to list the sdk versions. I had to downgrade SDK Tools to 25.2.5 and Google Repo to 41.0.0.
I tried importing GPGS35 onto the the project, which causes build errors, and the latest version (GPGS37) is broken. I also downgraded the project into Unity 5.4.2 with catastrophic results.
I'm not sure if this has anything to do with the problem since this is the exact same code which I used to init GPGS for my previous game (with the exception of the debug yes/no):
void Start () {
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder ()
.EnableSavedGames ()
.Build ();
PlayGamesPlatform.InitializeInstance (config);
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate ();
}
public static void Login () {
Social.localUser.Authenticate ((bool success) => {
if (success) {
MenuManager.instance.gpgsDebugText.text = "yes";
}
else {
MenuManager.instance.gpgsDebugText.text = MenuManager.instance.gpgsDebugText.text + "no";
}
});
}
I hope someone is able to answer and it's annoying when the game is just one step away from being complete, and 20-over hours were lost trying to solve this problem.
Thank you very much for your time!