firebase-js-sdk icon indicating copy to clipboard operation
firebase-js-sdk copied to clipboard

The onMessage event only receives one message (my website tab is open - 1 url pathname) when FCM push notification. When I use FCM to push an additional notification, onMessage does not receive the message

Open KhanhKitin opened this issue 1 year ago • 2 comments

Operating System

macOS monterey 12.5.1

Browser Version

Chrome - Version 120.0.6099.129 (Official Build) (arm64)

Firebase SDK Version

10.7.0

Firebase SDK Product:

Messaging

Describe your project's tooling

My project uses firebase cloud messaging to push notifications to the web.

Describe the problem

The onMessage event only receives one message (my website tab is open - 1 url pathname) when FCM push notification. When I use FCM to push an additional notification, onMessage does not receive the message.

  • I don't know if this problem is due to Chrome blocking multiple push notifications when web focus tab (1 pathname)

Steps and code to reproduce issue

The onMessage event only receives one message (my website tab is open - 1 url pathname) when FCM push notification. When I use FCM to push an additional notification, onMessage does not receive the message.

  • I don't know if this problem is due to Chrome blocking multiple push notifications when web focus tab (1 pathname)

KhanhKitin avatar Dec 29 '23 10:12 KhanhKitin

I’m facing similar issue. Is there any fix for this ?

ThabrezAhmed avatar Feb 27 '24 07:02 ThabrezAhmed

On app load even we send push notification, Application receives notification and after a while(less than a minute) service worker gets stopped, when we send notification we don’t receive it.

ThabrezAhmed avatar Feb 27 '24 07:02 ThabrezAhmed