Closed davideicardi closed 2 weeks ago
I found a few problems with this issue:
Sorry, my fault. I still used sendMulticast
deprecated method.
sendMulticast
hi what should we use instead?
sendEachForMulticast From the latest version of the lib
Hi Team,
Issue : Facing inconsistent push notifications. With same token without any changes push notifications works for some times and does not works some times.
Platform : Android and IOS Codebase : node.js Firebase-admin sdk version : 12.4.0 Node.js version: Node.JS 20
Sample node code :
let message = {
tokens: array of fcm tokens
notification:
{
title: "test_title",
body: push notification message,
},
data:
{
data: payload,
alertType: "crash",
},
};
let response = await firebaseAdmin.messaging().sendEachForMulticast(message);
The error message is random and either one of them
{"success":false,"error":{"code":"messaging/mismatched-credential","message":"SenderId mismatch"}}
{"success":false,"error":{"code":"messaging/unknown-error","message":"Operation is not implemented, or supported, or enabled. Raw server response: \"{\"error\":{\"code\":501,\"message\":\"Operation is not implemented, or supported, or enabled.\",\"status\":\"UNIMPLEMENTED\"}}\""}}
{"success":false,"error":{"code":"messaging/registration-token-not-registered","message":"Requested entity was not found."}}
Hi Team,
Issue : Facing inconsistent push notifications. With same token without any changes push notifications works for some times and does not works some times.
Platform : Android and IOS Codebase : node.js Firebase-admin sdk version : 12.4.0 Node.js version: Node.JS 20
Sample node code :
let message = { tokens: array of fcm tokens notification: { title: "test_title", body: push notification message, }, data: { data: payload, alertType: "crash", }, }; let response = await firebaseAdmin.messaging().sendEachForMulticast(message);
The error message is random and either one of them
- {"success":false,"error":{"code":"messaging/mismatched-credential","message":"SenderId mismatch"}}
- {"success":false,"error":{"code":"messaging/unknown-error","message":"Operation is not implemented, or supported, or enabled. Raw server response: "{"error":{"code":501,"message":"Operation is not implemented, or supported, or enabled.","status":"UNIMPLEMENTED"}}""}}
- {"success":false,"error":{"code":"messaging/registration-token-not-registered","message":"Requested entity was not found."}}
Same Issue
Where is it stated that sendEach is deprecated? https://firebase.google.com/docs/reference/admin/node/firebase-admin.messaging.messaging#messagingsendeach Its still in the docu. Thanks for the answer I couldnt find out whats wrong since they secretely changed the method and the error response is misleading, also tests are misleading because for some of the requests they let it go through while randomly others get refused!:D
same issue
Platform : Android and IOS Codebase : node.js Firebase-admin sdk version : 12.2.0, Node.js version: Node.JS 20.12.1
use fn : sendAll()
Sometimes attempts with the same token will fail and sometimes they will succeed.
[ERROR]
[2024-09-12T04:43:08.339Z] 500 ERROR: (Error)Operation is not implemented, or supported, or enabled.
Raw server response:
"{"error":{"code":501,"message":"Operation is not implemented, or supported, or enabled.","status":"UNIMPLEMENTED"}}"
same issue
Platform : Android and IOS Codebase : node.js Firebase-admin sdk version : 12.2.0, Node.js version: Node.JS 20.12.1
use fn : sendAll()
Sometimes attempts with the same token will fail and sometimes they will succeed.
[ERROR]
[2024-09-12T04:43:08.339Z] 500 ERROR: (Error)Operation is not implemented, or supported, or enabled. Raw server response: "{"error":{"code":501,"message":"Operation is not implemented, or supported, or enabled.","status":"UNIMPLEMENTED"}}"
try sendEachForMulticast
https://firebase.google.com/docs/reference/admin/node/firebase-admin.messaging.messaging.md#messagingsendeachformulticast
same issue Platform : Android and IOS Codebase : node.js Firebase-admin sdk version : 12.2.0, Node.js version: Node.JS 20.12.1 use fn : sendAll() Sometimes attempts with the same token will fail and sometimes they will succeed. [ERROR]
[2024-09-12T04:43:08.339Z] 500 ERROR: (Error)Operation is not implemented, or supported, or enabled. Raw server response: "{"error":{"code":501,"message":"Operation is not implemented, or supported, or enabled.","status":"UNIMPLEMENTED"}}"
try
sendEachForMulticast
https://firebase.google.com/docs/reference/admin/node/firebase-admin.messaging.messaging.md#messagingsendeachformulticast
nice!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
same issue Platform : Android and IOS Codebase : node.js Firebase-admin sdk version : 12.2.0, Node.js version: Node.JS 20.12.1 use fn : sendAll() Sometimes attempts with the same token will fail and sometimes they will succeed. [ERROR]
[2024-09-12T04:43:08.339Z] 500 ERROR: (Error)Operation is not implemented, or supported, or enabled. Raw server response: "{"error":{"code":501,"message":"Operation is not implemented, or supported, or enabled.","status":"UNIMPLEMENTED"}}"
try
sendEachForMulticast
https://firebase.google.com/docs/reference/admin/node/firebase-admin.messaging.messaging.md#messagingsendeachformulticast
Thanks u really save my day 😄 !! According to the change log, we may upgrade to >=11.7.0 https://firebase.google.com/support/release-notes/admin/node#cloud-messaging_2
firebase-admin
12.3.0 (but also previous versions)I have a project that send notification messages to Android and IoS. We use
sendEachForMulticast
method. It worked fine for several months. But recently we started to receive the following error:We create the messages, using the
MulticastMessage
type, with the following structure:Any ideas of what can be the problem? It could be related to https://firebase.google.com/docs/cloud-messaging/migrate-v1?authuser=0&hl=en ?