Google Play Games not configured

Hi everyone, hoping you can all help me solve this issue as I’ve been stumped so far…

I’m able to build a release APK locally directly from Unity but UCB produces a warning message that causes GPG to not work in-game. A locally-built APK works (user is able to see their achievements and leaderboards in-game) but a UCB built APK does not.

We see this warning in the UCB log: [Unity] ASSERT: Cancelling DisplayDialog: Google Play Games not configured! Warning!! Google Play Games was not configured, Game Services will not work correctly.

We don’t get this warning when building locally.

I can’t seem to find anything in the documentation for GPG or UCB or really any other post related to this other than an unresolved one here: Google Play Games and Unity Cloud Build .

The game has Firebase and the FB SDKs which both work fine in-game. Not sure if this is causing a conflict in UCB somehow…

In the full log from UCB, just above the GPG warning, I see this:

11693: [Unity] Android PostProcess task "Moving output package(s)" took 9.5058 ms
11694: [Unity] Key and Certificate Management Tool
11695: [Unity] Commands:
11696: [Unity]  -certreq            Generates a certificate request
11697: [Unity]  -changealias        Changes an entry's alias
11698: [Unity]  -delete             Deletes an entry
11699: [Unity]  -exportcert         Exports certificate
11700: [Unity]  -genkeypair         Generates a key pair
11701: [Unity]  -genseckey          Generates a secret key
11702: [Unity]  -gencert            Generates certificate from a certificate request
11703: [Unity]  -importcert         Imports a certificate or a certificate chain
11704: [Unity]  -importpass         Imports a password
11705: [Unity]  -importkeystore     Imports one or all entries from another keystore
11706: [Unity]  -keypasswd          Changes the key password of an entry
11707: [Unity]  -list               Lists entries in a keystore
11708: [Unity]  -printcert          Prints the content of a certificate
11709: [Unity]  -printcertreq       Prints the content of a certificate request
11710: [Unity]  -printcrl           Prints the content of a CRL file
11711: [Unity]  -storepasswd        Changes the store password of a keystore
11712: [Unity] Use "keytool -command_name -help" for usage of command_name
11713: [Unity] ASSERT: Cancelling DisplayDialog: Google Play Games not configured! Warning!!  Google Play Games was not configured, Game Services will not work correctly.

It could be entirely coincidental but is it possible that the keystore isn’t found just for GPG but not for FB or Firebase? The keystore is uploaded and configured in UCB. The GPGSIds file is present in the repo (using Collaborate) and the GooglePlayGameSettings.txt (with android.SetupDone=true present) is in the ProjectSettings folder of the project. Is it possible this isn’t being copied over in UCB?

I see it’s copying over the manifest: [Unity] Start importing Assets/GooglePlayGames/Editor/GooglePlayGamesPlugin_v0.10.12.txt using Guid(693a823b8f0ad41fe8231a1b1c8a50da) Importer(-1,00000000000000000000000000000000) -> (target hash: '2cfb2d41837e43ae0cfe39cc4f95d09d') in 0.004684 seconds

Has anyone run into this before? Is there anything I should look at?

Update:

GPG will look in three locations, starting with the default ProjectSettings folder. As a stop-gap measure we copied the GooglePlayGameSettings.txt file to “Editor/projsettings.txt” and “Assets/Editor/projsettings.txt”. This worked for us but is obviously not a long-term solution. It would appear to confirm that the ProjectSettings isn’t being copied over properly when building with Unity Cloud Build.

Would anyone know why that would be the case?

Here’s the GPGSettings code where it looks for the project settings content. Hopefully this helps someone else looking to solve the same issue!

mFile = GPGSUtil.SlashesToPlatformSeparator("ProjectSettings/GooglePlayGameSettings.txt");

            StreamReader rd = null;

            // read the settings file, this list is all the locations it can be in order of precedence.
            string[] fileLocations =
            {
                mFile,
                GPGSUtil.SlashesToPlatformSeparator(Path.Combine(GPGSUtil.RootPath, "Editor/projsettings.txt")),
                GPGSUtil.SlashesToPlatformSeparator("Assets/Editor/projsettings.txt")
            };

            foreach (string f in fileLocations)
            {
                if (File.Exists(f))
                {
                    // assign the reader and break out of the loop
                    rd = new StreamReader(f);
                    break;
                }
            }