messaging/unknown-error when using sendEachForMulticast
davideicardi opened this issue · 15 comments
davideicardi commented
- Operating System version: AWS Lambda
- Firebase SDK version:
firebase-admin
12.3.0 (but also previous versions) - Firebase Product: message notification
- Node.js version: Node.JS 18
- NPM version: 9
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:
{
"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"}}""
}
We create the messages, using the MulticastMessage
type, with the following structure:
{
tokens: [token1, token2],
data: {
// ... (string->string)
},
android: {
priority: 'normal',
ttl: TTL_SECONDS * 1000,
},
fcmOptions: {
analyticsLabel: 'my-label',
},
apns: {
payload: {
aps: {
alert: {
titleLocKey: 'key1',
locKey: 'key2',
locArgs: ['value1'],
},
},
contentAvailable: true,
},
headers: {
'apns-expiration': `${Math.floor(Date.now() / 1000) + TTL_SECONDS}`,
},
},
};
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 ?
google-oss-bot commented
I found a few problems with this issue:
- I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
- This issue does not seem to follow the issue template. Make sure you provide all the required information.
davideicardi commented
Sorry, my fault. I still used sendMulticast
deprecated method.