8
votes

We are using Firebase cloud messaging. Sometimes when Android or iOS app is in sleep mode the cell phone receives same (duplicates) notifications messages. For device identifications the FIRInstanceID token is used. An external server on node.js is used for sending notifications to Firebase service. No duplications in our server log file are presented.

2
Firebase has a lot of issues, but not this. Check your server again for this. Problem must be on your side.Hisham Muneer
Firebase has a lot of issues AND also this. I can confirm this behavior on several devices Android 4.4 and 5.0. I am only using Firebase console for sending push notifications.Catalin Morosan
Do you happen to have a sample payload being sent by the server? Even one that has redacted values may provide a clue as to the answer.PGMacDesign

2 Answers

0
votes

check this answer, That worked for me... https://stackoverflow.com/a/44435980/1533285

I was requesting permissions to GCM too so Systray showed two notifications.

0
votes

in file firebase-messaging-sw.js

comment this line

// self.registration.showNotification(notificationTitle,notificationOptions)

and no duplicate fcm anymore