Closed enixsoft closed 1 week ago
These are now throwing
Error sending to topic FirebaseMessagingError: An unknown server error was returned. Raw server response: "{"error":"Deprecated endpoint, see https://firebase.google.com/docs/cloud-messaging/migrate-v1"}"
Yes @Johnnyrook777 for me as well. sentToTopic is an important one for our business and now not working anymore. I am using v 12.3.1.
If I look here the example seems to indicate that the new send method will also handle topics?
https://firebase.google.com/docs/cloud-messaging/migrate-v1#update-the-payload-of-send-requests
I am going to update and test and refer back here if it was successful or not
Yes using .send() instead of sendToTopic() works. sendToCondition will probably also work as it can take the message type is:
export type Message = TokenMessage | TopicMessage | ConditionMessage;
Yes, .send() works fine as a replacement, but the issue is that those deprecated methods that no longer work are still present in the latest version (now 12.3.1) and some aren't even marked as deprecated. It seems developers here simply doesn't care even though notifications are essential to many apps.
Thanks @DevDianDankie, I also had success using a TopicMessage
and .send
.
Seems like an oversight to not have the old functions migrated or depicated, and we certainly got caught off guard :(
I think this is solved by https://github.com/firebase/firebase-admin-node/pull/2683
Hey folks, sendToTopic
and sendToCondition
should have been marked as deprecated along with the other deprecated FCM APIs. We missed it. I apologies for the confusion this caused. The APIs are now deprecated in v12.4.0
+
Please use the send()
API instead.
Describe your environment
Describe the problem
According to FAQ for FCM features deprecated in June 2023, the API endpoint
https://fcm.googleapis.com/fcm/send
is shutting down and:It has been replaced by HTTP v1 endpoint:
https://fcm.googleapis.com/v1/projects/myproject-b5ae1/messages:send
However, in this latest v12.1.1 version of firebase-admin-node, there are 4 methods still using this legacy endpoint:
Only methods sendToDevice and sendToDeviceGroup are marked as deprecated, but methods sendToTopic and sendToCondition are not - despite all of them using the same endpoint. But won't all four of them stop working soon? So shouldn't they have been already removed in the latest version? It is a breaking change.