Open arijeetbaruah opened 3 years ago
I got the same problem.
min Version API level: Andriod 9.0 target API level: Highest installed (SDK 30)
In my case
In my case the problem was that I had Anti-Piracy Enabled.
To turn it off go to Google Play Console Select app -> Play Games Services -> Setup and Management -> Configuration -> Credentials (Android) -> Edit -> Enable anti- piracy OFF
We've been experiencing the same recently, for a few days too - in our case it does happen for [new apps pointing to new Google Cloud projects] as well as [new apps pointing to existing and fully working Google Cloud projects].
We've checked many, many times our setup and all looks fine: credentials/SHA1 fingerprints for the Upload and App signing key certificates, testers, tracks and Google Cloud setup. All absolutely fine. Yet we keep getting the confusing "error 16".
GooglePlayGames/BasicApi/CommonStatusCodes.cs
///
We have the same problems, we are also using "EnableSavedGames"
I get the same error.
I get the same error.
Do you fix it?
We are also experiencing this, will update if I find a fix.
Same problem :(
Alright, so this cost me about two full days of dev time.
In the end, it was because the OAuth consent screen had User type set to 'Internal', and the Google account I was using for testing was not managed by the company in question. For small organisations I think it's generally easiest to always use 'External' here, and just add email addresses for testing/development - especially if using contractors.
Anyway, after lots of back-and-forth I found the best way to debug it was with the Android monitor
which can be found in the tools
directory of your JDK. The native SDK writes a lot of extra logging information here, which unfortunately doesn't reach Unity. Once you have monitor running, and your device attached, try filtering the logs for Errors, or with the query tag:PlayGames
. In my case, it did actually point me in the right direction.
It should look a bit like this.
Here are some of the other things I learned along the way, in the hope they help someone else:
keytool -printcert -file /path/to/unzipped/apk/META-INF/CERT.RSA
I'm facing this problem yet...
Thank you @sicklydove, your tips were very helpful! I noticed that monitor
is officially deprecated in Android Studio 3.1 and being removed from Android Studio 3.2, but adb logcat
will provide similar results. My problem is that I was formerly running adb logcat -s Unity
to filter those down to Unity logs, but most of the useful logs aren't Unity, and many of them also don't have the PlayGames tag mentioned. PlayerAgent
was the tag for the log entry that was most useful to me, pictured here:
I hadn't yet published my Play Games Configuration in the Play Games Console, as it warned that some changes to the game wouldn't be possible after publishing, and leaderboards and achievements couldn't be deleted. But that was my issue--the configuration couldn't be found, and that was causing the auth issue.
I had the same issue but managed to fix it by adding my testing account in Play console.
It was still throwing error after adding the account until I cleared app data for Play Store, Play Services, Play Games apps.
I am trying to login and Display the LeaderboardUI but getting stats 16.
Unity version: 2019.4.9f plugin version: 0.10.11 (0x00001011)
Logcat logs:
My code