-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: FCM - Duplicate Topic Notifications #1900
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
I can confirm, that I encounter the same issue. What is very weird it doesn't happen every single time, but rather from time to time and the number of duplicated notifications device receives varies, minimum 2 but it was even 6 in a few cases. I tried to find the pattern and the only difference I see is that when a message with duplicated notifications is send, the time of execution of sendAll is much longer (at least two times longer) than in messages without duplicates. Today I had a situation, when a message was send and notifications was duplicated 5 times, but sendAll thrown an error "Error while making request: timeout of 10000ms exceeded", but still the message was send. In my case, I'm passing 100 messages to sendAll. I'm using 10.0.2 version of firebase-admin within firebase function to send a message. |
+1 |
Hello, from the "sentTime"s: 2022-09-10 19:02:04.313 Looks like the time difference between the first send and the retry is 10s. Was the retry automatically performed by the Admin SDK or it's your code that implements the retry logic? |
Performed by the Admin SDK, might be the source of the problem. |
@lahirumaramba Hi Lahiru, I think the wait time should be extended to 15s. Could you help make the change? |
This issue is still not fixed for batch-requests. The |
I can confirm @thopedam comment. |
Thanks folks, timeout fix for batch send is included in |
We are using firebase cloud messaging - topic base push notifications to send notifications for two apps (iOS and android). Mobile message SDK - "@react-native-firebase/messaging": "^16.4.0" Here is the code block which we used to invoke firebase cloud messaging.
//send topic based push notification |
@lahirumaramba we are experiencing this exact issue again since the 5th of march, starting at around 11:00 am UTC: many push notifications get delivered up to 5 times, caused by the internal default retry behavior of the The "fix" to increase the timeout did not really solve this issue, if the Firebase backend doesn't respond in a reasonable amount of time. This is a high priority issue, as it is very annoying for our users and they have started to uninstall our app! I have currently applied a hotfix patch, that overwrites (and effectively disables) the retry config for the Please be aware, that while this severe bug is open, Firebase Messaging isn't usable for any serious organization. |
Hey @MightySepp666 I understand your frustration. Let me reopen this issue and we can use it to track the next steps. cc: @jonathanedey |
I have also noticed that sending a message to a topic can cause duplicate messages to be received. This seems to become consistent if a client's token has changed without the previous token being first unsubscribed. For instance, if I disable notification permissions for the website in Chrome's preferences and then re-enable them, the next Although it seems that at least in MacOS Chrome, the duplicates eventually result in only a single notification being displayed, I still tried to be cautious by adding logic in the worker to ignore messages with the same tag if they arrive within a few seconds of the last. So, my question is: should I not care about the possible duplicates and make sure to always trigger a |
Why has this not been merged in yet #1739? |
any updates on this issue ? |
Any updates on this? |
[READ] Step 1: Are you in the right place?
template.
with the firebase tag.
google group.
of the above categories, reach out to the personalized
Firebase support channel.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
Android and iOS users receive at least once a day a duplicate topic notification sent from the Lambda service running the Firebase-Admin SDK.
No duplicate notifications we're generated by our service itself (used extensive logging for each notification sent).
We use the sendAll function (of the SDK) and send the notifications in batches.
The client app does not create a local notification in any part of the code.
Steps to reproduce:
What happened? How can we make the problem occur?
This could be a description, log/console output, etc.
Log from the client receiving a duplicate notification:
the "sentTime"s are
2022-09-10 19:02:04.313
2022-09-10 19:02:14.219
Relevant Code:
Sent payload:
Send command:
The text was updated successfully, but these errors were encountered: