Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

android - Firebase token error TOO_MANY_REGISTRATIONS

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

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

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".

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();

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...