Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google play game service error code 400

There is an app that uses play games service, but by some reason it stops working. it looks some times i can login successfully but usually - no. if i checked API traffic there is about 10% got response code = 200, and others - 404.

methods that get 404:

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

when i tried to check error in 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 not understand why there is no ID in the message "Invalid applicationId with value ." because i've added id into the application. also i've tried to change the ID, and in this case i got an error that ID XXXXXXXXXXXX not linked with app my.package.name.

also i've double checked Application ID, SHA fingerprints , re-import google-services.json also tried to add manually OAuth2 Client ID from linked apps. check play services instruction and everything looks ok. what more i can check?

Update:

tried to update play-servies 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: 
like image 753
Siarhei Avatar asked Feb 24 '18 17:02

Siarhei


People also ask

What causes Google Play services to stop?

When Google Play Services keeps stopping, the most likely cause is a botched update. Google Play Services on your Android device might be updated to a corrupted version even while you're not around to notice it. If your apps are enabled to update automatically via Wi-Fi, this may occur.

What is error code 400 on Roblox?

The Roblox 400 bad request error message is a server communication issue between the client and the Roblox game servers. This connection error usually appears due to a number of possibilities like browser invalid cookies or cache data, incorrect URL address, DNS cache, and uploading files too large in size.


1 Answers

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

Then I just had to manually click the Google Sign in button in my app. I 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();
        }
    }

    //...
  }
like image 174
Daniel Metzner Avatar answered Sep 21 '22 17:09

Daniel Metzner