#GameServices OnAuthStatusChange errors

1 messages · Page 1 of 1 (latest)

glad hound
#

I am seeing the following errors in GameServices OnAuthStatusChange (on Android):
Error -> code = 0, domain = "[Essential Kit] Game Services", Description="10: "
And:
Error -> code = 0, domain = "[Essential Kit] Game Services", Description="Unknown error"

What might these errors mean when calling GameServices.Authenticate?

The "10: " one seems to happen when GameServices.Authenticate is called with the interactive parameter = false.

lethal smelt
glad hound
#

I was using Google Play Games Unity plugin, that was working fine. I switched to GameServices to support both GameCenter auth and Google Play Games auth.
I tested existing logins and they have been working.
But new users seem to have errors. (I'm not sure if this is all new users or just some)

glad hound
#

If I try to auth, get the failure, then background the app and foreground it, then when I try to auth it pops up the "Select a Play Games profile" UI.
Boot game->Wait for login screen->Login == Login failure
Boot game-> Wait for login screen->Wait a long time->Login == LoginFailure
Boot game-> Background app -> Forground App -> Login == Login failure
Boot game->Wait for login screen->Login (failure)->Background app-> Foreground App -> Login == Login successful displays Google pick profile screen.

(These are for players that either have not had a Google Play Games account, or deleted one and recreated it, and probably if they just deleted their Google Play Games account also)

glad hound
#

Ok, It seems like it is caused by this code in AndroidManifestGenerator.cs:
if (!settings.GameServicesSettings.AndroidProperties.EnableAutoInitialization) //This is automatically added by play games sdk. So removing if we don't need auto initialization. { //There is an issue once we disable this provider which auto initializes play games sdk. It won't show welcome message, but shows only once back to app. But this is fine, if you really want to disable auto initialization. Provider provider = new Provider(); provider.AddAttribute("android:name", "com.google.android.gms.games.provider.PlayGamesInitProvider"); provider.AddAttribute("android:enabled", "false"); provider.AddAttribute("tools:replace", "android:enabled"); application.Add(provider); }
And that "there is an issue once we disable this provider" sounds very much like my problem. I'm not sure why this would be considered fine.

glad hound
#

How do I Disable Auto Initialization of Game Services, but also have GameServices.Authenticate(true) work for players that do not already have Google Play Game accounts?

glad hound
#

I ended up enabling Auto Initialization to work around this issue, as it appears to be essentially broken when disabled.

lethal smelt
#

Auto init is enabled by default as its the official supported way from google play services. Auto enable off is not officially supported by google. We have a hack to make it work but not perfect. There is no official way to disable auto init.

glad hound
#

It would be good to warn people about that in the settings. It took a lot of my time to track this down, and I would not have tried the setting originally if I'd known it was not supported.

lethal smelt
#

Noted. I recall adding it in some comments or tutorial. Will warn on deselecting it.

glad hound
#

I've determined that this error happens if the user cancels creating a Google Play Games account:

  • Error -> code = 0, domain = "[Essential Kit] Game Services", Description="Unknown error"
#

This also causes an "Unknown error" dialog to appear on the user's screen (if you have GameServices set to display errors) even though it is not actually an error.

lethal smelt