4

I created My SHA-1 with my .jks file, after i created my google-services.json with my package name and SHA-1 code. After i published my app to Appstore. and my Sign In service worked perfectly, But one hours later all service is down.

And i used same SHA-1 for every Platform, and i checked again still same SHA-1.

Android Studio SHA-1 output

Anroid Studio

My Google Play-service.json SHA1 Servicejson

Play Store SHA-1, Maybe i need to use App-Signig cert? Play Store

what's wrong?

Berat Eyüboğlu
  • 1,663
  • 3
  • 18
  • 32

3 Answers3

8

I fixed this problem, Firstly i downloaded my apk from play store and i unzip my apk and checked my SHA, and i saw Play Store used App-Signing cert SHA. but i used Upload-Cert SHA everywhere.

after i changed my API sha to Play Store App-Signing SHA, worked perfectly.

Berat Eyüboğlu
  • 1,663
  • 3
  • 18
  • 32
2

If you enabled "Google Play App Signing" when publishing your app, you are now probably dealing with two fingerprints:

  1. The one coming from your local keystore (keytool -exportcert -keystore path-to-production-keystore -list -v), known as the "upload cert".

  2. The new one generated by Google when you enabled Signing (the "signing certificate").

The conflict with this situation, is that you also have two OAuth 2.0 client IDs:

  1. The one that you created before publishing your app (and before enabling google signing).
  2. A NEW one created by Google when you enabled Google Signing.

You can verify this fact from: Google Play Console -> Games Services -> Select your App -> API Console project -> Credentials -> OAuth 2.0 client IDs

SOLUTION

In order for Google Sign-in (and all related Games Services features) to work, I had to correct the fingerprint for my pre-existing OAuth2 Client ID (the one that I created before publishing my app).

  1. Look for the "right" OAuth 2.0 client ID: Google Play Console -> Games Services -> Select your App -> Linked Apps --> Select your App --> Take note of the "OAuth2 Client ID" at the bottom.

  2. Look for the "Signing" certificate: Google Play Console -> Games Services -> Select your App -> API Console project -> Credentials -> OAuth 2.0 client IDs --> "Android client for XXXXXX (auto created by Google Service)" --> Take note of the value (xx:xx:xx:etc....) Comment: In order to reuse this value in my other OAuth 2.0 client ID, I had to replace it with some dummy number. Otherwise, you will get error: "Certificate already used in some other project".

  3. Go to your pre-existing OAuth2 Client ID: Google Play Console -> Games Services -> Select your App -> API Console project -> Credentials -> OAuth 2.0 client IDs --> Select "OAuth 2.0 client ID" from step 1. Update certificate value with the one from step 2.

This solved my issue. Multiplayer is working perfectly !

Pablo Alfonso
  • 2,317
  • 1
  • 18
  • 24
1

In my case, I created new game from developer console -> Game Services -> Add New Game before I publish the game in Play Store.

When it asks me for my SHA1 key, I entered the key which gradle generates for me (in Android Studio, open Gradle tab and double click PROJECT/Tasks/Android/singingReport. It will show you SHA1 keys for debug and release)

After that, developer console created project in API console for me (in console.developers.google.com/apis/dashboard). For my SHA1 key, it generated Client ID

Then I published the game in Play Store and use Google Play App Signing. Because of this, Google generated a different SHA1 key for me. (You can see that SHA1 in developer console (PROJECT/Release Management/App Signing). It uses SHA1 in "App Signing Certificate"

This SHA1 key also added in API console automatically, but obviously different client ID generated.

Then I go to the Game Services/PROJECT/Linked Apps in developer console and check "OAuth2 Client ID" at the end of the page. It matches with client ID in API Console which is paired with SHA1 Key I entered before I publish the app (not the new one)

At the end, I delete my API Console project by doing these steps and make all the step above from scratch. Finally it works!

Berkay92
  • 552
  • 6
  • 21