【问题标题】:Error while trying trying to use oauth2 / AccountManagerFuture to authenticate with Google尝试使用 oauth2 / AccountManagerFuture 向 Google 进行身份验证时出错
【发布时间】:2012-11-15 20:53:55
【问题描述】:

我正在开发的一个 android 应用程序使用 Google oauth 对用户进行身份验证(通过 AccountManager)。

直到昨天它一直运行良好,现在每当应用程序尝试进​​行身份验证并获取谷歌身份验证令牌时,我都会收到以下错误:

http://i.stack.imgur.com/0H8xT.png

Logcat 显示以下内容(已删除电子邮件):

I/GLSUser ( 1478): GLS error: RATE_LIMIT_EXCEEDED xxx@yyy.com oauth2:https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
V/GoogleLoginService( 1478): Returning error intent with: ComponentInfo{com.google.android.gsf.login/com.google.android.gsf.login.LoginActivity}
I/ActivityManager(  456): START {flg=0x10000000 cmp=com.google.android.gsf.login/.LoginActivity (has extras) u=0} from pid 3967
I/ActivityManager(  456): START {cmp=com.google.android.gsf.login/.ShowErrorActivity (has extras) u=0} from pid 1478
I/qtaguid ( 1478): Tagging socket 52 with tag dc4e7700000000(14438007) for uid -1 failed errno=-13
I/NetworkManagementSocketTagger( 1478): tagSocketFd(52, 14438007, -1) failed with errno-13
W/GLSActivity( 1478): GAIA ERROR WITH NO RESOURCE STRING Unknown
I/ActivityManager(  456): Displayed com.google.android.gsf.login/.ShowErrorActivity: +69ms (total +92ms)

以前有人见过这个 RATE_LIMIT_EXCEEDED 错误吗?

【问题讨论】:

    标签: android oauth-2.0 accountmanager


    【解决方案1】:

    没有,但也许您发送的请求过多?有后台服务之类的吗?尝试使用不同的帐户,也许考虑使用 Google Play 服务,它至少可以更好地处理这个问题。

    【讨论】:

    • 谢谢尼古拉。事实证明,我的代码中有一个问题,即在很短的时间内连续两次向 Google 请求密钥。一旦我修复了这个逻辑错误,它就会重新焕发生机。 o/t:继续精彩的博文——我关注你的博客已经有一段时间了,你在 AES 上的一些帖子以及安全地使用密钥库对我有很大的帮助。
    • 很高兴您发现它们很有用,我有一个新的即将推出。和这个问题有点相关。敬请期待:)
    猜你喜欢
    • 2015-03-24
    • 1970-01-01
    • 2017-08-04
    • 2013-05-23
    • 2015-12-25
    • 2022-06-20
    • 2018-02-22
    • 2014-04-29
    • 2013-06-24
    相关资源
    最近更新 更多