Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GameAgent: Volley error when reporting played

I am having a problem with play-game services. For a simple connection I get:

07-14 00:28:08.394 28271 28271 I gobandroid: connected
07-14 00:28:08.783 19165 19206 E Volley  : [1562] BasicNetwork.performRequest: Unexpected response code 401 for https://www.googleapis.com/games/v1/applications/played
07-14 00:28:08.789 19165 28324 W GameAgent: Volley error when reporting played
07-14 00:28:08.789 19165 28324 W GameAgent: com.android.volley.AuthFailureError
07-14 00:28:08.789 19165 28324 W GameAgent:     at com.android.volley.toolbox.BasicNetwork.performRequest(:com.google.android.gms:159)
07-14 00:28:08.789 19165 28324 W GameAgent:     at ipb.performRequest(:com.google.android.gms:64)
07-14 00:28:08.789 19165 28324 W GameAgent:     at com.android.volley.NetworkDispatcher.run(:com.google.android.gms:113)

for this init code

  mGoogleApiClient = GoogleApiClient.Builder(activity).addConnectionCallbacks(object : GoogleApiClient.ConnectionCallbacks {
      override fun onConnected(bundle: Bundle?) {
          Log.i("connected")
      }

      override fun onConnectionSuspended(i: Int) {
         // Attempt to reconnect
         mGoogleApiClient!!.connect()
      }
  }).addApi(Games.API).addScope(Games.SCOPE_GAMES).build()

this is the related version:

com.google.apis:google-api-services-games:v1-rev197-1.22.0

This is also in the logs and maybe related:

07-14 14:39:17.827  1736  4963 W GamesServiceBroker: Client connected with SDK 8487000, Services 9256436, and Games 37230036
07-14 14:39:17.943  1736  2302 V BaseAuthAsyncOperation: All scopes had been granted in the past, skip access token fetching
07-14 14:39:17.951  1012  1012 I Auth    : [AuthDelegateWrapper] Service intent: Intent { cmp=com.google.android.gms/.auth.account.authenticator.DefaultAuthDelegateService }.
07-14 14:39:17.952  1012  1012 I Auth    : [AuthDelegateWrapper] Service intent: Intent { cmp=com.google.android.gms/.auth.account.authenticator.DefaultAuthDelegateService }.
07-14 14:39:17.973  1012  1022 D GoogleCertificatesImpl: Fetched 318 Google certificates
07-14 14:39:18.023  1736  2302 V BaseAuthAsyncOperation: access token request successful
07-14 14:39:18.077   613  1644 W AppOps  : Bad call: specified package com.google.android.play.games under uid 10230 but it is really 10066
like image 358
ligi Avatar asked Oct 31 '22 00:10

ligi


1 Answers

Please try to have HTTP Authentication using volley library.

Solutions and explanations given in these SO posts - com.android.volly.AuthFailureError in making basic volly POST request to a django server and How does one use Basic Authentication with Volley on Android? might help. Happy coding! :)

like image 99
Teyam Avatar answered Nov 10 '22 21:11

Teyam