Google玩游戏服务错误代码400 [英] Google play game service error code 400

查看:1724
本文介绍了Google玩游戏服务错误代码400的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一款应用程序使用玩游戏服务,但由于某种原因停止工作。
它看起来有些时候我可以成功登录,但通常 - 不。如果我检查API流量,大约有10%的响应代码= 200,其他人--404。

获取404的方法:




  • games.applications.played

  • games.events.record


当我试图检查日志中的错误时,我看到:

  11705-13707 / com.google。 android.gms W / GamesServiceBroker:客户端连接到SDK 12171000,服务11975436和游戏54390036 
11705-9262 / com.google.android.gms E / BoundService:没有这样的BoundService用于操作:com.google.android。 gms.auth.APP_CERT
11705-9262 / com.google.android.gms E / BoundService:无此操作的BoundService:com.google.android.gms.auth.APP_CERT
691-778 / system_process E / PROXIMITY:ProximitySensor:未知事件(type = 3,code = 0)
8876-8890 / com.agminstruments.drumpadmachine V / FA:不活动,断开服务
691-778 / system_process E / PROXIMITY:ProximitySensor:未知事件(type = 3,code = 0)
2254-2269 /? I / PerfService:PerfServiceNative_getPackName
11705-16860 / com.google.android.gms E / Volley:[3966] BasicNetwork.performRequest:用于https://www.googleapis.com/games/v1/的意外响应代码400 players / me?language = ru-RU
11705-9262 / com.google.android.gms E / PlayerAgent:无法加载播放器g08394879143000804289
11705-9262 / com.google.android.gms W / PlayerAgent:{errors:[{domain:global,reason:invalid,message:具有值的applicationId无效原因:没有指定应用程序ID}],code: 400}
3978-3978 / com.google.android.play.games.ui I / SignInActivity:从8过渡到11
3978-3978 / com.google.android.play.games.ui W / SignInActivity:onSignInFailed()...
3978-3978 / com.google.android.play.games.ui W / SignInActivity:在8
3978-3978 / com.google.android期间登录失败.play.games.ui W / SignInActivity:==>返回不正确的结果:10002

我不明白为什么消息中没有IDInvalid applicationId有价值。因为我已将id添加到应用程序中。我也尝试更改ID,在这种情况下,我得到了一个ID XXXXXXXXXXXX没有与应用程序my.package.name关联的错误。



我也是双重检查应用程序ID SHA 指纹,重新导入 google-services.json 也尝试从链接的应用程序手动添加 OAuth2客户端ID 。检查播放服务指令,一切看起来都不错。
我可以检查什么?


更新:

尝试将播放服务更新至11.8.0,使用 GoogleSignInClient

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

但也出现错误:

  com.google.android.gms.common.api.ApiException:4:


解决方案

尝试此操作,
首先从调试播放服务开始,


  • 在代码中启用调试播放服务> make apk>在设备上安装>从android sdk中的tools文件夹打开Monitor>将设备连接到PC>运行


  • 调试后,如果您收到此消息

  • OAUth2相关配置,请查看。详细
    错误; UNREGISTERED_ON_API_CONSOLEOnSignInFailed()...





    • 转至





    只需复制/粘贴应用程序签名证书 SHA-1证书指纹 - 取代上传证书SHA-1证书指纹,它是API密钥库中的API ID客户端OAuth 2.0中的密钥库中的一个。



    这会做你的工作!!



    截至目前,谷歌玩游戏在本地没有更多的连接。但是,当它被导入到Google Play商店时,它会成功连接(Google App签名完全符合它应该做的事情:它将SHA1从上传证书更改为应用签名)。

    b
    $ b

    注意: 上面的图片取自GitHub开放问题之一。
    帮助!!


    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: 
    

    解决方案

    Try this, Firstly start with Debugging Play services,

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

    • After Debugging, if you got this message

    "You have wrong OAUth2 related configurations, please check. Detailed error; UNREGISTERED_ON_API_CONSOLE" "OnSignInFailed()..."

    • Go to

    Just copy/paste the "App signing certificate" "SHA-1 certificate fingerprint" - Instead of the "Upload certificate" "SHA-1 certificate fingerprint" which is the one from your keystore, inside the API ID client OAuth 2.0 .

    This will do your work!!

    As of now, google play games is no more connecting in local. But it's connecting successfully when it's been imported into the google play store (Google App signing does exactly what it's supposed to do: it changes your SHA1 from the "upload certificate" one to the "App signing" one).

    Note: Above image is taken from one of GitHub open issue. Hope this helps!!

    这篇关于Google玩游戏服务错误代码400的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆