Skip to content
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

Duplicate Notifications Delivered through FC #863

Open
johnfrancmartin opened this issue Sep 29, 2023 · 3 comments
Open

Duplicate Notifications Delivered through FC #863

johnfrancmartin opened this issue Sep 29, 2023 · 3 comments

Comments

@johnfrancmartin
Copy link

johnfrancmartin commented Sep 29, 2023

Environment:

  • Operating System version: Java 8
  • Firebase SDK version: 10.11.0
  • Library version: 8.1.0
  • Firebase Product: messaging (auth, database, storage, etc)

Problem:

We're seeing multiple instances of a single message being sent via Cloud Messaging using the Firebase Admin SDK, and users seeing duplicates on iOS. We have logs both on the server side, directly before and after on the server side, and on the client side upon receipt in a Notification Service Extension.

We've verified through these logs (tied to data from user screenshots), that the message is sent only once on our server, we receive a success response from the Firebase SDK, and the user receives that exact notification twice.

Server Logs:

16:08:16.542 | al-pool-2228 |  INFO | w.SendNotificationWorker$ | 303 | 31ec5101-b43e-4519-99a1-9bb3650471c7: Successfully sent notification 2273480
16:08:16.537 | al-pool-7377 |  INFO | .n.NotificationDispatcher | 342 | Notification id 2273480 sent status true
16:08:16.537 | al-pool-7377 |  INFO | c.s.f.s.FirebaseService$  | 158 | Submitted notification to Firebase with messageId: projects/{redacted}/messages/{redacted} for notification id: 2273480
16:08:16.336 | al-pool-4602 |  INFO | w.SendNotificationWorker$ |  92 | 31ec5101-b43e-4519-99a1-9bb3650471c7: Sending notification 2273480

Client Logs:

16:08:21.092 AM -0700 |	INFO | {redacted} | NotificationService | did receive notification | notificationId = 2273480
16:08:21.091 AM -0700	| INFO | {redacted} | NotificationService | did receive notification | notificationId = 2273480

Relevant Code:

val messageId = FirebaseMessaging.getInstance.send(messageBuilder.build)
logger.info(s"Submitted notification to Firebase with messageId: $messageId for notification id: ${notificationId
          .getOrElse(0L)}")
@lahirumaramba
Copy link
Member

Hi @johnfrancmartin I would encourage you to submit a support request through https://firebase.google.com/support/troubleshooter/contact where you can include the project id. So the FCM team can investigate the issue. Thanks!

@HirenXL
Copy link

HirenXL commented Aug 1, 2024

Did you find any solution? I'm facing the same issue.

@emindeniz99
Copy link

Idk the solution but do you know collapse id feature of notification systems( fcm apns hms) to prevent showing two notifications same time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants