Closed shi-vy closed 3 years ago
I have been through all of the steps here: https://developers.google.com/games/services/android/troubleshooting
The metadata tags are fine, contents of the GooglePlayGamesManifest.plugin match exactly with what comes out in the ADB output above, I don't change anything after generating it via Google Play Games --> Setup --> Android Setup.
The package name is correct. This hasn't changed or been modified in years.
The certificate fingerprint is correct. The SHA1 fingerprint in the keystore used to sign the app is the same SHA1 fingerprint that shows up in the ADB output above, it is the same one that appears in the Google Play Console Dashboard and it is the same one that appears in the Google Cloud Console API Manager.
Test accounts aren't relevant to my situation as the game is published and is currently live in the store.
Double checked that my proguard-user.txt
includes everything from here.
I'm really not sure what else to do.
Image of my resources is below, when it hit setup there is sets up and says Play Games has been set up correctly. The client ID there matches the client ID in the Play Console... everything literally matches everywhere.
What is package name of your game?
com.halfbrick.brickwars
Same issue here. Everything matches. I can use playgames services fine until I add .RequestServerAuthCode(false)
to my config. If that is present, I get the App not correctly configured error in the logs. I've tried regenerating oauth certs, tried both the upload and production certs etc. It's unclear how to debug what is actually wrong.
If you use a client id that belongs to another project, you will immediately see an error pop-up, saying "Web client id not associated with this game!". Apparently, this is not your case.
A potential cause of this is using a client id that belongs to the same project but is the wrong one. In the Configuration tab of Play Games Services on Play Console, you have the option to create a credential for Android and Game server. If you use an Android one instead of Game server as your web client id, the sign-in will be successful as long as you initialize your PlayGamesClientConfiguration in the simplest way: new PlayGamesClientConfiguration.Builder().Build()
.
However, when you add the .RequestServerAuthCode(false)
bit there, it will fail with the long error message of APP NOT CORRECTLY CONFIGURED TO USE GOOGLE PLAY GAME SERVICES
.
Please, take a look at it and check if you are using a Game Server
one. Let us know if the issue still persists.
My particular issue, was that the web client ID I was mistaken to be the client id that is for the google play games services. That particular ID though, isn't even used in the GPGS setup... (It even says Web App Client ID (Optional): in other words, you don't need to specify the GPGS client ID that you find in the Play games console for GPGS to authenticate and work with leaderboards etc.
The web app client ID on the other hand, is the OAuth client ID for your web app (firebase in my case). The reason it is optional, is you only need it if you are going to call .RequestServerAuthCode. In this case, the web app client ID is used to grant that auth code and allow you auto pass the token to authenticate with your web app. So for me, when I put the client ID for my web app instead of the one for my GPGS key, wow, magically it solved the problem just like that.
You have to set up a Game Server
credential and use that ClientID
if you want RequestServerAuthCode()
to work
Hi,
I've had the Play Games Plugin in my game for a long time, over multiple versions. Recently I tried to upgrade to 0.10.12, and I kept encountering this issue over a myriad of test devices and Google accounts. I rolled back the upgrade, and am back on 0.10.11 and it has now become a persistent issue.
Relevant auth code
There is more to the code, handling the successful request, but that's not relevant here as I am constantly getting the
result
variable beingSignInStatus.UiSignInRequired
.I looked at the code comments here which has the follow comments.
First things first, the client in my example is signed in. I guess this error should be returned when a user does not have an active Google Account or a Play Games account created...? I've tried on multiple Google accounts with Play Games accounts signed in. I've tried signing out and back into these accounts, I've tried factory resetting my device. Nothing has helped.
I have no idea what the second half of the comment section is trying to say. There is no
hasResolution
method that I can find... there is nostartResolutionForResult
method on anything I can find... I don't even understand the{@link ... }
syntax. I guess it's all broken javadoc?When I look at the logs in adb, I see this message pop up when I'm trying to authenticate
All the information there, (the package name, SHA1, and App ID) are exactly correct and haven't changed for over 2 years.
I have started to try removing the whole Play Games SDK, and re-added it per the instructions in the README, but nothing is working.
Some other relevant info, I am targetting Android API Level 21 (Android 5), Proguard is enabled but I exclude basically everything in the
com.google.android.gms.games.*
namespace. I have tested on two devices, one running Android 11, the other Android 6. Three accounts on each, all having the same issue.I hope someone can help, I legitimately am at a total loss for what has happened here.
Thanks.