Google game service error code for game 400

There is an application that uses the gaming service, but for some reason it stops working. it looks several times, I can log in successfully, but usually not. if I checked the API traffic, then about 10% received a response code = 200, while others - 404.

who get 404:

  • games.applications.played
  • games.events.record

when I tried to check the error in the log, I see:

11705-13707/com.google.android.gms W/GamesServiceBroker: Client connected with SDK 12171000, Services 11975436, and Games 54390036 11705-9262/com.google.android.gms E/BoundService: No such BoundService for action: com.google.android.gms.auth.APP_CERT 11705-9262/com.google.android.gms E/BoundService: No such BoundService for action: com.google.android.gms.auth.APP_CERT 691-778/system_process E/PROXIMITY: ProximitySensor: unknown event (type=3, code=0) 8876-8890/com.agminstruments.drumpadmachine V/FA: Inactivity, disconnecting from the service 691-778/system_process E/PROXIMITY: ProximitySensor: unknown event (type=3, code=0) 2254-2269/? I/PerfService: PerfServiceNative_getPackName 11705-16860/com.google.android.gms E/Volley: [3966] BasicNetwork.performRequest: Unexpected response code 400 for https://www.googleapis.com/games/v1/players/me?language=ru-RU 11705-9262/com.google.android.gms E/PlayerAgent: Unable to load player g08394879143000804289 11705-9262/com.google.android.gms W/PlayerAgent: {"errors":[{"domain":"global","reason":"invalid","message":"Invalid applicationId with value . Reason: No application ids specified."}],"code":400} 3978-3978/com.google.android.play.games.ui I/SignInActivity: Transition from 8 to 11 3978-3978/com.google.android.play.games.ui W/SignInActivity: onSignInFailed()... 3978-3978/com.google.android.play.games.ui W/SignInActivity: Sign in failed during 8 3978-3978/com.google.android.play.games.ui W/SignInActivity: ==> Returning non-OK result: 10002 

I do not understand why there is no identifier in the message "Invalid applicationId with value". because I added id to the application. I also tried to change the ID, in which case I received an error message that the ID XXXXXXXXXXXX is not associated with the my.package.name application.

I also double-checked Application ID , SHA fingerprints, re-importing google-services.json also tried to manually add OAuth2 Client ID from related applications. check the instructions for the game services, and everything looks fine. what else can i check?

Update:

tried to upgrade game servers to 11.8.0 and use GoogleSignInClient

  mGoogleSignInClient = GoogleSignIn.getClient(application, GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN); activity.startActivityForResult(mGoogleSignInClient.getSignInIntent(), 312); 

but also got an error:

 com.google.android.gms.common.api.ApiException: 4: 
+7
android google-play-services google-play-games google-api
source share
4 answers

Try this. First, start with the Play debugging services.

  • Enable debugging services in the code> make apk> install on the device> open the "Monitor" from the "tools" folder in android sdk> connect the device to the PC> run

  • After debugging, if you received this message

"You have the wrong configurations related to OAUth2, please check. Error; UNRect_ON_API_CONSOLE" "OnSignInFailed () ..."

  • Switch to

enter image description here

Just copy / paste the "Application Signature Certificate" "SHA-1 Certificate Fingerprint". Instead of “Download Certificate”, “SHA-1 Certificate Fingerprint”, which is one of the keystores, inside the OAuth 2.0 API Client

It will do your job!

At the moment, games in google play are no longer connected to the local network. But it successfully connects when it was imported into the Google Play Store (subscribing to the Google App does exactly what it was supposed to do: it changes your SHA1 from the "download certificate" one to "subscribe to the application").

Note. One of GitHub's problems is taken over the image. Hope this helps!

+1
source share

I also had "com.google.android.gms.common.api.ApiException: 4" on the device. Updating the Google Play Games app resolved this issue for me.

Then I just had to manually press the Google login button in my application. Hope this helps!

using gms_library_version '11 .8.0 'and the code I'm using:

  @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //... mGoogleSignInClient = GoogleSignIn.getClient(this, new GoogleSignInOptions .Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN).build()); //... } // when the button gets clicked public void startSignInIntent() { startActivityForResult(mGoogleSignInClient.getSignInIntent(), RC_SIGN_IN); } @Override public void onActivityResult(int requestCode, int resultCode, Intent intent) { if (requestCode == RC_SIGN_IN) { Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(intent); try { GoogleSignInAccount account = task.getResult(ApiException.class); onConnected(account); } catch (ApiException apiException) { String message = apiException.getMessage(); if (message == null || message.isEmpty()) { message = getString(R.string.signin_other_error); } onDisconnected(); new AlertDialog.Builder(this) .setMessage(message) .setNeutralButton(android.R.string.ok, null) .show(); } } //... } 
+1
source share

Clearing the cache and data is also one of the main solutions to these errors.

1. Go to settings → Go to application settings (in some devices, the application parameter is called applications). 2. For all applications → Find the Google Play store → Clear data and cache 3. After everything is clear, you need to force stop the application. Alternatively, find the Google Services Framework → Open the Google Services Framework → Clear the cache and data. Now reboot your device and try downloading the application.

+1
source share

as described here. error code 4 means

public static final int SIGN_IN_REQUIRED

The client tried to connect to the service, but the user is not subscribed. The client can continue working without using the API. Otherwise, if hasResolution () returns true, the client can call startResolutionForResult (Activity, int) to prompt the user to log in. After the sign activity returns with RESULT_OK, further attempts should succeed.

Constant value: 4

so make sure that the fingerprint of your application in the Google SHA-1 developer-console signing-certificate belongs to the same key that is used to sign the APK that you are testing.

When building a debug build, Android Studio uses its own debug key. You can change it from

right-click on the application folder in the Project folder → select the "Open Module Settings""Signing" → configure the same key that you mentioned in the google dev console. After that, go to the "Build Types" tab and select your signature configuration.

OR

checkout this answer too.

+1
source share

All Articles