Back to all

Firebase and Onesignal errors

Good Day. I've been trying to enable push notifications on my median app (wich is a website), and ive been constantly getting the same error logs both inside median's own emulator and outside of it (that means, using a real phone, and checking real time logs on adb ), the error logs are consistently the same:

E/FirebaseMessaging( 7369): Topic sync or token retrieval failed on hard failure exceptions: java.util.concurrent.ExecutionException: java.io.IOException: TOO_MANY_REGISTRATIONS. Won't retry the operation.  
E/OneSignal( 7369): Error Getting FCM Token

I decided to contact OneSignal support to see what might be happening. this is what support has told me (im quoting here.) :


''

From the logs, I can see that you are using Firebase Messaging. The error is cause by Firebase Messaging blocking push token due to TOO_MANY_REGISTRATIONS

Because instead of using the existing push tokens, your app is constantly getting new Push tokens from FCM.

The reason you are getting this error is having both Firebase Messaging SDK and OneSignal Push SDK in your mobile app.''


To see more into this situation, i decided to delete the firebase project to see what would happen. after that, i tried running the app again on the emulator, and i somehow still got the same errors, despite having completely deleted the firebase project:

E/FirebaseMessaging( 7369): Topic sync or token retrieval failed on hard failure exceptions: java.util.concurrent.ExecutionException: java.io.IOException: TOO_MANY_REGISTRATIONS. Won't retry the operation.  
E/OneSignal( 7369): Error Getting FCM Token

I reported this to the OneSignal support team, and this is what they told me (once again, quoting here):


'' This is strange but this error logs shouldn't appear if you did not install Firebase Messaging:
​18780 E FirebaseMessaging: Topic sync or token retrieval failed on hard failure exceptions: java.util.concurrent.ExecutionException: java.io.IOException: TOO_MANY_REGISTRATIONS. Won't retry the operation. 12-10 15:16:52.623 18613 18759 E OneSignal: Error Getting FCM Token ---

I would suggest getting in touch with Median for this issue if Firebase Messaging is not in your Median mobile app.
​''


As you can see, thats why im here. i have not added firebase messaging to my median app, in fact, firebase messaging doesn't even appear as an option for me, only firebase analytics (wich i did not install.) ive only installed onesignal. in the firebase console, i created a project, added my median app to it, and did the necessary steps to get onesignal's push setup so that i can use the app id on median to get my notifications. but ever since then, all that onesignal shows is ''never subscribed'' status when i try to enter the app.

From what i can see the issue at hand is exactly what onesignal support told me. somehow my app has both firebase messaging sdk and onesignal sdk in it, even though i never installed firebase messaging to begin with.

Of course, now lets clarify things: im not an expert at coding. im not an expert in web push notification systems or sdk's. i could be talking total bollocks here. But the only way for me to find out a potential sollution seems was to try and contact median support. so any help would be deeply appreciated! i also would really appreciate it you guys can ''dumb it down to my level'', since i won't be able to understand a lot of acronyms or words that mean something very specific - and im sorry if this is asking a lot, but it would save time over me having to ask the dumb questions like ''what does this word you said mean?'' and instead get to ask more important questions that can eventually lead to the problem being solved - Thanks!