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.
senderId
is linked with more than 1 token. 2)(which is impossible I guess) is that the same token is linked with multiplesenderIds
. So could you please ensure that none of the above is true? And if you could post the code of how you're registering the client to firebase? – Lockridge