principal-ideal-domain
principal-ideal-domain

Reputation: 4266

App not correctly configured to use google play game services

I'm using the BaseGameActivity class to connect to google play games services. The problem is that somehow authentication doesn't work. I'm searching the web for a solutions for hours but didn't find anything what helps me solving the problem.

When I start the BaseGameActivity I get the following output in the LogCat:

03-19 14:22:36.126: W/GameHelper(15312): ****
03-19 14:22:36.126: W/GameHelper(15312): ****
03-19 14:22:36.126: W/GameHelper(15312): **** APP NOT CORRECTLY CONFIGURED TO USE GOOGLE PLAY GAME SERVICES
03-19 14:22:36.126: W/GameHelper(15312): **** This is usually caused by one of these reasons:
03-19 14:22:36.126: W/GameHelper(15312): **** (1) Your package name and certificate fingerprint do not match
03-19 14:22:36.126: W/GameHelper(15312): ****     the client ID you registered in Developer Console.
03-19 14:22:36.126: W/GameHelper(15312): **** (2) Your App ID was incorrectly entered.
03-19 14:22:36.126: W/GameHelper(15312): **** (3) Your game settings have not been published and you are 
03-19 14:22:36.126: W/GameHelper(15312): ****     trying to log in with an account that is not listed as
03-19 14:22:36.126: W/GameHelper(15312): ****     a test account.
03-19 14:22:36.126: W/GameHelper(15312): ****
03-19 14:22:36.126: W/GameHelper(15312): **** To help you debug, here is the information about this app
03-19 14:22:36.126: W/GameHelper(15312): **** Package name         : *****
03-19 14:22:36.126: W/GameHelper(15312): **** Cert SHA1 fingerprint: *****
03-19 14:22:36.126: W/GameHelper(15312): **** App ID from          : *****
03-19 14:22:36.126: W/GameHelper(15312): ****
03-19 14:22:36.126: W/GameHelper(15312): **** Check that the above information matches your setup in 
03-19 14:22:36.126: W/GameHelper(15312): **** Developer Console. Also, check that you're logging in with the
03-19 14:22:36.126: W/GameHelper(15312): **** right account (it should be listed in the Testers section if
03-19 14:22:36.126: W/GameHelper(15312): **** your project is not yet published).
03-19 14:22:36.126: W/GameHelper(15312): ****
03-19 14:22:36.126: W/GameHelper(15312): **** For more information, refer to the troubleshooting guide:
03-19 14:22:36.126: W/GameHelper(15312): ****   http://developers.google.com/games/services/android/troubleshooting

I checked more than ten times that the Package name, Cert SHA1 fingerprint and App ID (which I starred here) really are identically with those given in https://console.developers.google.com/project/my-app-id/apiui/credential

I also deleted the client IDs given there several times and recreated them. But nothing helps. Can you help me?

Upvotes: 18

Views: 7285

Answers (7)

AndrWeisR
AndrWeisR

Reputation: 1226

Just for anyone else who ends up here... For my unpublished app that I am testing, I had to also ensure that the user I was using to connect to Play Games on my device was a registered tester in the Google Cloud Console > APIs and Services > OAuth consent screen > Test Users section.

https://console.cloud.google.com/apis/credentials/consent

Upvotes: 0

Steven Haggerty
Steven Haggerty

Reputation: 328

None of the above worked for me.

You will get this error if your GoogleSignInOptions is invalid, which was my problem.

For example:

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN).
        requestServerAuthCode("AN INVALID CLIENT ID").
        build();

Will also give the same error.

Upvotes: 0

Michael
Michael

Reputation: 9864

In my case, the SHA1 finger print was incorrect.

  1. Go to the Google Play Developer Console, and find your game
  2. Go the the "Game Details" tab on the left
  3. Scroll Down to "API Console Project" and click your "Project Name"
  4. Now in the Google Developer Console (Different Console), go to API Manager
  5. Click the Credentials Tab
  6. Under the OAuth 2.0 Client IDs, click your project name
  7. And now, finally, you can change your SHA1 finger print and/or package name is need be.

Upvotes: 10

Flynn
Flynn

Reputation: 1

Be sure to use the correct SHA1. In my case I had two different debug.keystore files on my PC.

One was located at C:\User\myUser\.android and the other was located at my android-sdk\.android directory

I used Eclipse and in my case, the debug.keystore was used from the android-sdk directory.

If you are using Eclipse you can check the location of the debug.keystore at Window/Preferences/Android/Build/.

Upvotes: 0

user3478224
user3478224

Reputation: 73

did you try this? Cert SHA1 fingerprint generated at debug does not match with the keystore I'm using In my case I was testing the app in debug and this certificate was differente at the authorized one.

Upvotes: 0

deepaksk
deepaksk

Reputation: 35

When you install and run the game/app onto your device from eclipse itself, it will not sign in and connect with the google game services. Please follow below instructions,
i. You have to export the game/app first (Build Project before exporting) ii. and upload the app.apk file to device iii. Install and run the game/app, you will see the google sign in window.

Upvotes: 0

Reg Mem
Reg Mem

Reputation: 621

Your logged in user on the device needs to be a valid tester account. Check if the logged in user on the device is configured as a valid test user. if not then add the email with which you are logged on to the device to the tester accounts on Google Play Game Developer Console

Upvotes: 3

Related Questions