gpt4 book ai didi

android - Firebase token 错误 TOO_MANY_REGISTRATIONS

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:20:55 32 4
gpt4 key购买 nike

在阅读了 100 多个线程并进行了谷歌搜索后,我仍然对以下错误消息感到困惑。

目前,我正在使用 Firebase 云消息传递,在很短的时间内,我正尝试从 Firebase 获取我的 token ,以便能够将消息发送到我的服务器。我已经尝试过这两种方法:

String token = FirebaseInstanceId.getInstance().getToken(mySenderId, "FCM");

String token = FirebaseInstanceId.getInstance().getToken();

所以在日志中,我读到:

E/FirebaseInstanceId: Token retrieval failed: TOO_MANY_REGISTRATIONS
java.io.IOException: TOO_MANY_REGISTRATIONS

根据其他帖子和答案,这是“设备上安装的应用程序太多,这些应用程序已注册到 C2DM/GCM/FCM”的原因。我还读到过“设备上最多安装 100 个 GCM/FCM 注册应用程序”的限制。

但这不完全正确,对吗?我的意思是,这可能是真的,但这并不是这个问题的全部答案。我一直在使用不同的设备进行工作和测试,而我当前的设备没有在 FCM 上注册 100 个应用程序。事实上,我的设备甚至根本没有安装 100 个应用程序,远非如此!

有什么方法可以管理以前注册的设备和 token 吗?我试过运行以下代码但没有任何运气:

FirebaseInstanceId.getInstance().deleteInstanceId();

我曾尝试确定来自不同来源(包括文档)的信息,但未能理解其实际工作原理。不久前,我在旧的 C2DM 和最近的 GCM 上遇到了同样的问题。几天前我已经与 Firebase 合并以使用它的功能而不是对此进行改进的想法,但它仍然回荡在我身上。

最佳答案

在直接与 Google 团队交谈后,我从他们那里得到了以下答复:

The team confirmed and clarified their data indicated that the device is not really a normal device and this is either:

  1. a virtual device (emulator) being reused too many times

  2. a real device used in automated way to test too many apps

  3. a real device which has been customized with a CLONE image of the system partition, CLONED from a different device

If this is a real device, the best way to solve it is to factory reset to the real system image of the device. Since this device is prob currently stuck in 2 or 3, would you mind factory resetting the device and let us know if the issue still reproduce?

我对我的设备进行了恢复出厂设置,问题消失了。我仍然不明白这是怎么出现的以及为什么会这样。

关于android - Firebase token 错误 TOO_MANY_REGISTRATIONS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47529977/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com