Firebase 令牌错误 TOO_MANY_REGISTRATIONS [英] Firebase token error TOO_MANY_REGISTRATIONS

查看:14
本文介绍了Firebase 令牌错误 TOO_MANY_REGISTRATIONS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在阅读了 100 条线程和谷歌搜索后,我仍然对以下错误消息感到困惑.

After reading 100's of threads and googling I am still confused about this following error message.

目前,我正在使用 Firebase 云消息传递,并且在很短的时间内,我正在尝试从 Firebase 获取我的令牌,以便能够将消息发送到我的服务器.这两种方法我都试过了:

Currently, I am using Firebase Cloud Messaging and in very short terms I am trying to get my token from Firebase to be able to send messages to my server. I've tried with both these methods:

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

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

所以在日志中,我读到了这个:

So in the logs, I read this:

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

根据其他帖子和答案,这是设备上安装的应用程序太多,向 C2DM/GCM/FCM 注册"的原因.我还阅读了设备上安装的最多 100 个 GCM/FCM 注册应用程序"的限制.

According to other posts and answers, it's a cause of "Too many installed applications on the device that are registered with C2DM/GCM/FCM". I've also read there was a limitation of "Max 100 GCM/FCM registered applications installed on the device".

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

But this is not simply true, is it? I mean, it may be true but it isn't the whole answer to this issue. I am constantly working and testing with different devices and my current device DOES NOT have 100 applications registered with FCM. In fact, my device does not even have 100 applications installed at all, far from it!

有没有办法管理以前注册的设备和令牌?我尝试运行以下代码,但没有任何运气:

Is there any way to manage previous registered devices and tokens? I've tried to run the following code without any luck:

FirebaseInstanceId.getInstance().deleteInstanceId();

我试图确定来自不同来源(包括文档)的信息,但未能理解这实际上是如何工作的.不久前我对旧的 C2DM 和最近的 GCM 也有同样的问题.几天前我已经与 Firebase 合并以使用它的功能而不是改进的想法,但它仍然回响在我身上.

I've tried to nail down information from different sources (including the documentation) without luck of understanding how this actually works. I've had the same issue with old the C2DM a while ago and also with GCM lately. I've merged with Firebase a few days ago to use its features instead which the thoughts of improvements on this, but it still echoes back at me.

推荐答案

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

After spoken directly with the Google team I got the following answer from them:

团队确认并澄清了他们的数据表明该设备不是真正的普通设备,这也是:

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

  1. 重复使用太多次的虚拟设备(模拟器)

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

以自动化方式用于测试太多应用的真实设备

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

使用系统分区的克隆映像自定义的真实设备,从其他设备克隆

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

如果这是真机,最好的解决方法是恢复出厂设置到设备的真实系统映像.由于这个设备很可能目前卡在 2 或 3,你介意恢复出厂设置吗如果问题仍然存在,请告诉我们?

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?

我已对我的设备执行了出厂重置,但问题消失了.我仍然不知道这是如何出现的以及为什么会出现.

I have performed a factory reset on my device and the issue is gone. I still don't see exactly how this can appear and why.

这篇关于Firebase 令牌错误 TOO_MANY_REGISTRATIONS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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