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

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

问题描述

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

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

当前,我正在使用Firebase Cloud Messaging,并且在很短的时间内,我试图从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

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

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天全站免登陆