Skip to content

Tag: firebase-cloud-messaging

FCM sent to “/topics/all” is not received

I have tried sending the FCM notification using the code below I am not receiving the notification in my browser when send the message “to”: /topics/all However if I am sending the message with “to”: my registration token, I am receiving the notification. Can some one tell me why this is happening. I understand that the message sent to /topics/all

How to get FCM token?

I am trying to get FCM token in react js application. First thing i tried is to use messaging.useServiceWorker(registration) then use messaging.getToken() and it’s working fine on localhost for firefox and google chrome, but on an HTTPS live server it works fine on firefox but in chrome it throws an error: DOMException: Failed to execute ‘subscribe’ on ‘PushManager’: Subscription failed

Firebase Cloud Functions for Firestore are not triggering

Cannot get Firebase Cloud Functions for Firestore to trigger on onWrite of my collection. Trying to setup device to device push notification for chat app. Function is deployed and on Pay as you go plan, however, changes in document, updates or create in “chats” collection is not triggering. Firebase cloud messaging is supposed to send a push and write to