0

When sending a multicast message to FCM...

        const message = {
            notification: {
                title: messageTitle,
                body: messageBody,
            },
            tokens: tokenArray,
        }

        getMessaging().sendMulticast(message)

I'm receiving this error.

messaging/registration-token-not-registered - Requested entity was not found

According to this post, I should then remove the token.

Here's what I'm confused about though. When I run getToken() on my client device, it's still showing this same token.

getToken(messaging, { vapidKey: "MY_VAPID_KEY"}).then(token => console.log(token))

Is there like a registration step that I'm missing? I don't understand why the client is using this as the current token but FCM thinks it's unregistered.

esafresa
  • 480
  • 7
  • 19

1 Answers1

0

So my solution was I reset the browser cache and notification permissions. My browser then generated a new token which is working.

Kind of strange though is on the first call of getToken() after clearing and refreshing, it sent a request to delete the token after failing a check with isTokenValid(), and then the delete itself failed so my token remained registered and is now working. No idea what's going on there.

esafresa
  • 480
  • 7
  • 19