firebase / firebase/firebase-admin-node

[Messaging]firebase-admin is not able deliver Notification in Android Edge

Open
#2,781 1 comment 0 reactions 1 assignee Claimed by @chong-shao View on GitHub
api: messaging
Dominant language
TypeScript
Stars
1.7k
Forks
419
Avg merge
3d 10h
Merged PRs (30d)
16

Description

### [READ] Step 1: Are you in the right place?
Able to generate token but `await this.app.messaging().sendEachForMulticast(message)` is working all other browser but dont know only android Edge has the problem.

### [REQUIRED] Step 2: Describe your environment

* Operating System version: _____ Mac OS
* Firebase SDK version: _____
* Firebase Product: _____ FCM
* Node.js version: _____16.0.0
* NPM version: _____

Device Information
![WhatsApp Image 2024-11-22 at 11 51 33](https://github.com/user-attachments/assets/cad0cf1d-39fe-44ab-86df-d1bcd105eb40)

### [REQUIRED] Step 3: Describe the problem
In Android Chrome, I can successfully send notifications, but in Android Edge, notifications are not working. The sendEachForMulticast(message) method is returning success

#### Steps to reproduce:

Send the notification either through the Firebase Console or by using messaging.sendEachForMulticast(message)

#### Relevant Code:
import admin from 'firebase-admin'
admin.initializeApp({
credential: admin.credential.applicationDefault(),
});

// This registration token comes from the client FCM SDKs.
const edge = "dHoMX5A_-....................fSbpmNzTKYzjtjq6TaUaesUgnAfA0"
const chrome = "fGU9Zu8k7xFt.....................................vyEo-uKqQ7lUhQfjWQt2J1E"

const registrationToken = edge;

const message = {
data: {
score: '850',
time: '2:45'
},
notification: {
title: "I am title",
body: "I am Body",
},
tokens: [registrationToken]
};

const messaging = admin.messaging();
messaging.sendEachForMulticast(message)
.then((response) => {
console.log('Successfully sent message:', response);
})
.catch((error) => {
console.log('Error sending message:', error);
});

```
// TODO(you): code here to reproduce the problem
```
No Notification and no console error in Android Edge

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.