热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Google登录突然无法正常工作-GoogleSign-Insuddenlynotworking

IamworkingonanAndroidappthatusesGoogleSign-In.我正在开发一款使用Google登录的Android应用。Everythingwa

I am working on an Android app that uses Google Sign-In.

我正在开发一款使用Google登录的Android应用。

Everything was working fine until recently. I stopped working on this project for about two weeks and got back to it yesterday, and the Google Sign-In is suddenly not working anymore. When I click sign in, the Sign-In popup opens, I choose my account and... nothing happens.

一切都很好,直到最近。我在这个项目上停止工作了大约两个星期,并且昨天又回到了它,谷歌登录突然不再起作用了。当我点击登录时,登录弹出窗口打开,我选择了我的帐户......没有任何反应。

So as I did not change anything in the code related to the Sign-In, I started to search everywhere else.

因为我没有更改与登录相关的代码中的任何内容,所以我开始在其他地方搜索。

First I noticed that my compile 'com.google.android.gms:play-services-auth:11.4.2' could be updated to 11.6.0, so this is what I did.

首先我注意到我的编译'com.google.android.gms:play-services-auth:11.4.2'可以更新到11.6.0,所以这就是我所做的。

I ran the app again and it was now asking me to update Google Play Services, so I clicked on update button but again, nothing happened. I tried multiple times but it didn't change anything. So I started looking somewhere else.

我再次运行应用程序,它现在要求我更新Google Play服务,所以我点击了更新按钮但是再一次没有发生任何事情。我尝试了多次,但没有改变任何东西。所以我开始寻找其他地方。

I went to the link where I found the code sample for Google Sign-In to see if anything has changed and... yea it has changed, 10 days ago the sample was updated so I updated my code and now, nothing better, just that the Sign-In popup does not appear now when I click sign in.

我去了链接,在那里我找到了Google登录的代码示例,看看是否有任何变化......是的,它已经改变了,10天前样本已经更新,所以我更新了我的代码,现在,没有更好,只是单击登录时,现在不显示登录弹出窗口。

So I started looking more deeply at the logs, and here are the problematic lines : W/GooglePlayServicesUtil: Google Play services out of date. Requires 11717000 but found 11577470 W/FA: Service connection failed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null} W/LoginActivity: signInResult:failed code=12500

所以我开始更深入地研究日志,这里有一些问题:W / GooglePlayServicesUtil:Google Play服务已经过时了。需要11717000但找到11577470 W / FA:服务连接失败:ConnectionResult {statusCode = SERVICE_VERSION_UPDATE_REQUIRED,resolution = null,message = null} W / LoginActivity:signInResult:failed code = 12500

So apparently, it should be related to Google Play Services... Note that I don't get the "Update Google Play Services" popup anymore. Most of the answers that I found regarding this kind of issue suggested to try on another emulator with a lower API, or downgrading Google Play Services compile line, so I tried both. I used to run my tests on a Pixel XL with API 27, I tried on a Nexus 6P with API 25, on this one I can get to the Sign-In popup but when selecting my account I get W/LoginActivity: signInResult:failed code=10. I also tried on two real devices that are OnePlus 3 with API 25 and Samsung Galaxy S6 Edge with API 24, I get the same error on these two than on Nexus 6P. Moreover I don't find anything regarding the meaning of the error code 10. Regarding Google Play Services downgrade, some classes of the new code sample are not recognized if I do so. Also, it seems not to be a Google Play Services issue anymore when trying on devices with lower API than 27.

显然,它应该与Google Play服务有关...请注意,我不再获得“更新Google Play服务”弹出窗口。我发现有关此类问题的大多数答案建议尝试使用较低API的其他模拟器,或降级Google Play服务编译行,因此我尝试了两者。我曾经在带有API 27的Pixel XL上运行我的测试,我尝试使用带有API 25的Nexus 6P,在这个上我可以进入登录弹出窗口但是在选择我的帐户时我得到W / LoginActivity:signInResult:failed代码= 10。我还尝试了两个真正的设备,即带有API 25的OnePlus 3和带有API 24的三星Galaxy S6 Edge,我在这两个设备上得到的错误与Nexus 6P相同。此外,我没有找到任何关于错误代码10含义的内容。关于Google Play服务降级,如果我这样做,则无法识别新代码示例的某些类。此外,在尝试API低于27的设备时,似乎不再是Google Play服务问题。

UPDATE : I found that the error code 10 means "The application is misconfigured". I don't see how since nothing has changed between the time everything worked find and the time it stopped working, anyway I generated a new debug.keystore, a new configuration file and added it to my /app. And obviously it still does not work.

更新:我发现错误代码10表示“应用程序配置错误”。我没有看到,因为在找到所有工作的时间和它停止工作的时间之间没有任何变化,无论如何我生成了一个新的debug.keystore,一个新的配置文件并将其添加到我的/ app。显然它仍然不起作用。

UPDATE 2 : As I tried everything thinkable, and I knew something was wrong with my debug.keystore (I read everywhere that this file should regenerate itself if deleted when building a project, which was not the case for me). I uninstalled/reinstalled Android Studio, hoping that it will at least solve this problem. Well I had tons of files that I don't remember in .android folder and now I have only 1 folder and 2 files, obviously debug.keystore is not one of them. So this made me remember that there is another way of getting the SHA1 signature and this is what I explain in my answer post. But still there is something wrong with my debug.keystore so if anyone has an idea...

更新2:当我尝试所有可想到的东西时,我知道我的debug.keystore出了问题(我在任何地方都读到如果在构建项目时删除了这个文件应该重新生成,这对我来说并非如此)。我卸载/重新安装了Android Studio,希望它至少能解决这个问题。好吧,我有很多文件,我不记得.android文件夹,现在我只有1个文件夹和2个文件,显然debug.keystore不是其中之一。所以这让我记住了获得SHA1签名的另一种方式,这就是我在回答帖子中解释的内容。但是我的debug.keystore仍然有问题,所以如果有人有想法......

1 个解决方案

#1


0  

I finally found a way to get it to work. This is probably not the right solution as there is still something wrong (I will edit the question to explain why), but it works so maybe it could help.

我终于找到了让它发挥作用的方法。这可能不是正确的解决方案,因为仍然有问题(我将编辑问题来解释原因),但它的工作原理也许它可以提供帮助。

So the problem was coming from the configuration file, and more precisely the debug.keystore used to generate it, indeed, I tried to generate the SHA1 signature required to get the configuration file by running signingReport in the Gradle panel, instead of running the keytool -exportcert -list -v \ -alias androiddebugkey -keystore ~/.android/debug.keystore command and now it works again.

所以问题来自配置文件,更确切地说是用于生成它的debug.keystore,实际上,我试图通过在Gradle面板中运行signingReport来生成获取配置文件所需的SHA1签名,而不是运行keytool -exportcert -list -v \ -alias androiddebugkey -keystore~ / .android / debug.keystore命令,现在再次工作。

I still don't get how this issue appeared initially since I didn't change anything...

因为我没有改变任何东西,我仍然不知道这个问题最初是如何出现的......


推荐阅读
  • 使用eclipse创建一个Java项目的步骤
    本文介绍了使用eclipse创建一个Java项目的步骤,包括启动eclipse、选择New Project命令、在对话框中输入项目名称等。同时还介绍了Java Settings对话框中的一些选项,以及如何修改Java程序的输出目录。 ... [详细]
  • Spring源码解密之默认标签的解析方式分析
    本文分析了Spring源码解密中默认标签的解析方式。通过对命名空间的判断,区分默认命名空间和自定义命名空间,并采用不同的解析方式。其中,bean标签的解析最为复杂和重要。 ... [详细]
  • node.jsrequire和ES6导入导出的区别原 ... [详细]
  • Redis API
    安装启动最简启动命令行输入验证动态参数启动配置文件启动常用配置通用命令keysbdsize计算key的总数exists判断是否存在delkeyvalue删除指定的keyvalue成 ... [详细]
  • Linux重启网络命令实例及关机和重启示例教程
    本文介绍了Linux系统中重启网络命令的实例,以及使用不同方式关机和重启系统的示例教程。包括使用图形界面和控制台访问系统的方法,以及使用shutdown命令进行系统关机和重启的句法和用法。 ... [详细]
  • 图解redis的持久化存储机制RDB和AOF的原理和优缺点
    本文通过图解的方式介绍了redis的持久化存储机制RDB和AOF的原理和优缺点。RDB是将redis内存中的数据保存为快照文件,恢复速度较快但不支持拉链式快照。AOF是将操作日志保存到磁盘,实时存储数据但恢复速度较慢。文章详细分析了两种机制的优缺点,帮助读者更好地理解redis的持久化存储策略。 ... [详细]
  • Linux如何安装Mongodb的详细步骤和注意事项
    本文介绍了Linux如何安装Mongodb的详细步骤和注意事项,同时介绍了Mongodb的特点和优势。Mongodb是一个开源的数据库,适用于各种规模的企业和各类应用程序。它具有灵活的数据模式和高性能的数据读写操作,能够提高企业的敏捷性和可扩展性。文章还提供了Mongodb的下载安装包地址。 ... [详细]
  • mysql-cluster集群sql节点高可用keepalived的故障处理过程
    本文描述了mysql-cluster集群sql节点高可用keepalived的故障处理过程,包括故障发生时间、故障描述、故障分析等内容。根据keepalived的日志分析,发现bogus VRRP packet received on eth0 !!!等错误信息,进而导致vip地址失效,使得mysql-cluster的api无法访问。针对这个问题,本文提供了相应的解决方案。 ... [详细]
  • 本文介绍了如何使用Express App提供静态文件,同时提到了一些不需要使用的文件,如package.json和/.ssh/known_hosts,并解释了为什么app.get('*')无法捕获所有请求以及为什么app.use(express.static(__dirname))可能会提供不需要的文件。 ... [详细]
  • 本文介绍了一个适用于PHP应用快速接入TRX和TRC20数字资产的开发包,该开发包支持使用自有Tron区块链节点的应用场景,也支持基于Tron官方公共API服务的轻量级部署场景。提供的功能包括生成地址、验证地址、查询余额、交易转账、查询最新区块和查询交易信息等。详细信息可参考tron-php的Github地址:https://github.com/Fenguoz/tron-php。 ... [详细]
  • 本文介绍了Sencha Touch的学习使用心得,主要包括搭建项目框架的过程。作者强调了使用MVC模式的重要性,并提供了一个干净的引用示例。文章还介绍了Index.html页面的作用,以及如何通过链接样式表来改变全局风格。 ... [详细]
  • 一次上线事故,30岁+的程序员踩坑经验之谈
    本文主要介绍了一位30岁+的程序员在一次上线事故中踩坑的经验之谈。文章提到了在双十一活动期间,作为一个在线医疗项目,他们进行了优惠折扣活动的升级改造。然而,在上线前的最后一天,由于大量数据请求,导致部分接口出现问题。作者通过部署两台opentsdb来解决问题,但读数据的opentsdb仍然经常假死。作者只能查询最近24小时的数据。这次事故给他带来了很多教训和经验。 ... [详细]
  • 本文详细介绍了在Linux虚拟化部署中进行VLAN配置的方法。首先要确认Linux系统内核是否已经支持VLAN功能,然后配置物理网卡、子网卡和虚拟VLAN网卡的关系。接着介绍了在Linux配置VLAN Trunk的步骤,包括将物理网卡添加到VLAN、检查添加的VLAN虚拟网卡信息以及重启网络服务等。最后,通过验证连通性来确认配置是否成功。 ... [详细]
  • 第四讲ApacheLAMP服务器基本配置Apache的编译安装从Apache的官方网站下载源码包:http:httpd.apache.orgdownload.cgi今 ... [详细]
  • zabbix中文乱码的问题
    在使用zabbix时,有时候会出现中文乱码的问题,如下:因为zabbix自身对中文简体的支持不完善,需要我们手动的去上传新的字体进行替换:1、在windows获取字体库文件在Windows上的 ... [详细]
author-avatar
古台山_683
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有