当前位置: 首页 > 知识库问答 >
问题:

Google Play Games服务UNREGISTERED_ON_API_CONSOLE

魏彦
2023-03-14

我有一个问题是GPG没有在我的Unity开发的游戏中进行身份验证。

截图:在imgur.com上查看帖子


我在手机上运行了adb logcat,下面是我认为是问题所在的区域的一个片段:

04-30 09:45:10.023 11290 11316 W Unity   :  
04-30 09:45:10.023 11290 11316 W Unity   : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
04-30 09:45:10.023 11290 11316 W Unity   : 
04-30 09:45:10.044  3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.058  3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.065  3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.073  3470 11371 V AccountUtils: 0 accounts found with uca feature
04-30 09:45:10.081  3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.124  3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.126  3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.270  2097  2892 I BroadcastQueue: am_broadcast_enqueue: [background,0,Intent { act=com.facebook.messages.ipc.peersPROD flg=0x10 (has extras) },2]
04-30 09:45:10.270  2097  2141 I BroadcastQueue: am_broadcast_finished: [background,0,Intent { act=com.facebook.messages.ipc.peersPROD flg=0x10 (has extras) }]
04-30 09:45:10.276 20864 21291 W Auth    : [GetToken] GetToken failed with status code: UNREGISTERED_ON_API_CONSOLE
04-30 09:45:10.282  3470 27320 E TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: UNREGISTERED_ON_API_CONSOLE
04-30 09:45:10.294  3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.301  3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.302 11290 11290 V GamesNativeSDK: Play Games callback indicates connection failure.
04-30 09:45:10.302 11290 11368 I GamesNativeSDK: UI interaction required to connect to Google Play.
04-30 09:45:10.339 11290 11368 I GamesNativeSDK: Auth operation started: SIGN IN
04-30 09:45:10.339 11290 11368 I GamesNativeSDK: Connecting to Google Play...
04-30 09:45:10.346  3470  7470 W GamesServiceBroker: Client connected with SDK 10084000, Services 10298448, and Games 39080048
04-30 09:45:10.358  3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.366  3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.373  3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.383  3470 11371 V AccountUtils: 0 accounts found with uca feature
04-30 09:45:10.391  3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.410  3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.427  3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.517 20864 10927 W Auth    : [GetToken] GetToken failed with status code: UNREGISTERED_ON_API_CONSOLE
04-30 09:45:10.518  3470 27320 E TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: UNREGISTERED_ON_API_CONSOLE
04-30 09:45:10.545  3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.547  2097  2171 I art     : Starting a blocking GC Explicit
04-30 09:45:10.548  3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.550 11290 11290 V GamesNativeSDK: Play Games callback indicates connection failure.
04-30 09:45:10.550 11290 11368 I GamesNativeSDK: UI interaction required to connect to Google Play.
04-30 09:45:10.550 11290 11368 I GamesNativeSDK: Resolving connection.



游戏似乎是从上面的logcat在API控制台中注销的。我在这里看到了这个答案,然后去检查开发人员控制台和API控制台上的OAuth2客户机ID,结果它们是相同的。我也在使用一个测试者帐户。


让我感到困扰的是,我去年开发的一款游戏没有问题(使用Unity 5.4.2&GPGS0.9.35版),而我目前正在做的游戏却遇到了这个问题(使用Unity 5.6&GPGS0.9.36版),我真的不想因此而推迟时间表。


网上某处有人给出了将SDK工具和Google存储库更新到最新版本的建议,但这恰恰让Unity无法列出SDK版本。我不得不将SDK工具降级到25.2.5,将Google Repo降级到41.0.0。


我尝试将GPGS35导入到项目中,这会导致生成错误,并且最新版本(GPGS37)已损坏。我还将该项目降级为Unity 5.4.2,结果是灾难性的。


我不确定这是否与问题有关,因为这与我在上一个游戏中初始化GPG时使用的代码完全相同(除了调试是/否):

    void Start () {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder ()
            .EnableSavedGames ()
            .Build ();

        PlayGamesPlatform.InitializeInstance (config);
        PlayGamesPlatform.DebugLogEnabled = true;
        PlayGamesPlatform.Activate ();
    }

    public static void Login () {
        Social.localUser.Authenticate ((bool success) => {
            if (success) {
                MenuManager.instance.gpgsDebugText.text = "yes";
            }
            else {
                MenuManager.instance.gpgsDebugText.text = MenuManager.instance.gpgsDebugText.text + "no";
            }
        });
    }


我希望有人能回答,这是恼人的,当游戏只有一步之遥,完成,和20多个小时的努力解决这个问题。

非常感谢您抽出时间!

共有1个答案

段干高歌
2023-03-14

首先去google play控制台…选择您的应用程序..然后转到发布管理下的app signing。你会在这里找到两个证书。1.app签约证书2。从这里上传证书,您将需要应用程序签署SHA-1证书。复制它。现在转到google api控制台。你会发现你的游戏在那里选择它。您会发现这里的sha1与上载证书的sha1相同。但您需要在此处粘贴签名sha1证书。你们都可以走了。希望能有所帮助。

 类似资料:
  • 在 Serenity 中,服务终结点是 ASP.NET MVC 控制器的一个子类。 这是 Northwind 的 OrderEndpoint 摘录: namespace Serene.Northwind.Endpoints { [RoutePrefix("Services/Northwind/Order"), Route("{action}")] [ConnectionKey("N

  • 服务发现服务[架构概述]。 { "cluster": "{...}", "refresh_delay_ms": "{...}" } cluster (required, object) 承载服务发现服务的上游群集的标准定义。该群集必须实现和运行SDS HTTP API的REST服务。 refresh_delay_ms (required, integer) 每次访问SDS群集的API延迟

  • 服务器端提供了比较多的关于推送的 API,包括广播,多播和单播方式的推送,还有超时,心跳,推送事件等设置。 Timeout 字段 该字段用于设置推送空闲超时。默认值为 120 秒,即 2 分钟。 当服务器发布了推送主题后(后面会专门介绍推送),客户端会跟服务器端保持一个长连接,如果达到超时时间,仍然没有任何消息推送给客户端,则返回 nil,此时,如果客户端仍然在线的话,则会立即再次发送获取推送主题

  • 主要内容:1.RPC 架构,2.同步调用与异步调用,3.流行的 RPC 框架,4.HTTP 服务,5.总结1.RPC 架构 2.同步异步调用 3.流行的 RPC 框架 1.RPC 架构 先说说 RPC 服务的基本架构吧。我们可以很清楚地看到,一个完整的 RPC 架构里面包含了四个核心的组件。 Client Server Client Stub Server Stub(这个Stub大家可以理解为存根) 客户端(Client),服务的调用方。 服务端(Server),真正的服务提供者。 客户端存根,

  • 主要内容:1.RPC 架构,2.同步调用与异步调用,3.流行的 RPC 框架,4.HTTP 服务,5.总结1.RPC 架构 先说说 RPC 服务的基本架构吧。我们可以很清楚地看到,一个完整的 RPC 架构里面包含了四个核心的组件。 Client Server Client Stub Server Stub(这个Stub大家可以理解为存根) 客户端(Client),服务的调用方。 服务端(Server),真正的服务提供者。 客户端存根,存放服务端的地址消息,再将客户端的请求参数打包成网络消息,然后

  • 服务定义了访问后端Pod的访问方式。 服务(Service)定义了访问后端Pod的访问方式,服务的详细介绍内容,请参考kubernets官方文档-Service。目前支持两种访问方式。 内部:即Service的ClusterIP模式,自动分配集群内部IP地址,仅供集群内部访问。 外部:即Service的Loadbalance模式,配合外部 云联壹云 提供的负载均衡服务使用,通过负载均衡实例的服务地

  • 如何包含Eureka服务器 要在项目中包含Eureka服务器,请使用组org.springframework.cloud和工件id spring-cloud-starter-eureka-server的启动器。有关 使用当前的Spring Cloud发布列表设置构建系统的详细信息,请参阅Spring Cloud项目页面。 如何运行Eureka服务器 示例eureka服务器; @SpringBoot

  • 在异步HTTP SERVER中使用服务 全局方法service_center() 使用service_center($service)获取服务地址,然后使用call()方法调用公开的服务方法 $service = (yield service_center('User')); $user = (yield $service->call("User::getUser", ['id'