且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

尝试在 Firebase Cloud Functions 中使用 Firebase Cloud Messaging 发送推送通知时未找到请求的实体

更新时间:2022-11-27 19:07:35

想通了.显然,当我尝试发送到的 FCM 令牌不再注册时,就会发生此错误,如 "messaging/registration-token-not-registered" 错误代码所示.在这种情况下,我只需要从用户的令牌中删除这个令牌并完成它.

Figured it out. So apparently, this error happens when the FCM token I'm trying to send to is not registered anymore, as evidenced by the "messaging/registration-token-not-registered" error code. In that case I just need to remove this token from the user's token and be done with it.