16

After properly implementing Google Play Services in my first game now it is time for the second.

I'm stuck on message "There is no linked app associated with this client ID” .....

I have properly configured things for debug and release. When i run app from Eclipse it works ( debug key is used and i can sign in ).

When i create a signed apk and install it on device i get "There is no linked app associated with this client ID”.

In Google API I have 2 client IDs ( debug and release , also tried to remove one of them - no luck ) I Have tried adding / removing testing accounts ;/ I have created beta test, pushed game to Google Play and marked as beta. Then installed it from the store as "beta tester" I checked also SHA1 values and are set properly. META-INF/CERT.rsa show the same SHA as release in Google API

This is an update not a new apk, game service are published because they are working fine in debug mode.

It's a paid app. After this I have tried to create second linked app with the same package name. It is not working still and now i cannot delete that second linked app :/

It's a mess I know but what else this can be ? I cannot sign in....

Paweł
  • 2,144
  • 1
  • 18
  • 25

3 Answers3

26

EDIT: I resolved following the Google Note. LOL

Note: If you are debugging your game using your debug certificate but have configured game services using your release certificate, you should add a second linked app using the same package name and your debug certificate's SHA1 fingerprint. This will allow you to sign in to the application whether it's signed with the debug or release certificates.

Google Services Developers Link

"a second linked app" is the key point, not two game, but two linked app in the same game

So, the right method is to link two time the same app in the Google Play Developer Console:

  • First app with bundle com.name.appname and release fingerprint

  • And a second app, with the same bundle and another name (es. AppName Test User1) and with debug fingerprint

In this way, in the Api Developer Console, it creates two OAuth2 client ID for the same project and both work well.

NOTE: If you have done many tests, remember to delete all app in the play games section of Google Play Developer Console, and all projects in the Api Developer Console.

DonMizzi
  • 566
  • 1
  • 6
  • 17
  • If I try adding a linked app with debug fingerprint it says " This client ID is globally unique and is already in use. " – cesards Dec 04 '14 at 17:03
  • My debug certificate never works somehow. I upload a release with my own debug keystore and upload it. Then I set my IDE/Gradle to sign debug builds with that keystore. Next to this I can upload a released state and tell the IDE /Gradle to sign releases with my release keystore. Yes it is strange but I spent many days to get my default `.android/default.keystore` to work. – Madmenyo Aug 08 '15 at 16:12
  • Works fine for me. One of the best answers ever. For a whole day now, I've been debugging against my release app, building the signed apk every time, and installing it! Awesome – Russ Wheeler Mar 14 '17 at 22:08
5

The accepted answer above is correct, but the Play Store now uses Google Play App Signing, which will replace the key you use to create the signed apk with a different one. So, if you continue to run into trouble (like I did), this might be the issue.

I found the answer here, but will paraphrase. Basically, follow all the steps above, but you need to use the key used by the Play Store. Go to the Google Play Console and select the app you are working on. Click on 'Release Management' and then 'App Signing' on the left side menu. There you will see both a "App signing certificate" and an "Upload certificate". You need to use the SHA-1 fingerprint from the "App signing certificate" in order for the 0auth2 client ID to work.

Andrew Lasher
  • 83
  • 1
  • 5
2

Two services (games) must be created:

  1. For debug certificate's SHA1 fingerprint.
  2. For release certificate's SHA1 fingerprint.

If the game is published, you can not create a second linked application with the other SHA.

Nathaniel Ford
  • 20,545
  • 20
  • 91
  • 102
Orgatres
  • 117
  • 1
  • 11
  • Not true at all. All you have to do is add a second linked app into the same game entry, just like DonMizzi suggested in the accepted answer. When it asks you to authorize the newly added app, simply enter the debug keystore's SHA1 certificate fingerprint. I was struggling with this for several days and added it now without any issues. – Levon Mar 09 '16 at 19:50
  • How did you do it? In my case, when I try to link the same package under a different name, in order to use the debug.keystore, the Play Console does not show the "Authorize" button to provide the debug SHA1.. :( Here is my post: http://stackoverflow.com/questions/37099493/android-games-leaderboard-broken-while-testing Thanks! – Dimitris May 10 '16 at 13:13