Push Notification "works" in standalone but has error related to FCM

Hey, I’ve been searching a lot through your forum and different resources, but I’m unable to resolve this issue related to push notifications.

Our push notification “works” both in IOS and Android, as it sends them out correctly and I receive it.
However, when i try to debug and send a push notification to my device for testing, it returns this error together:

{
    "data": [
        {
            "status": "ok",
            "id": "xxxxxxxxxxxxxxx"
        },
        {
            "id": "xxxxxxxxxxxxxxxx",
            "status": "error",
            "message": "The recipient device is not registered with FCM.",
            "details": {
                "error": "DeviceNotRegistered",
                "fault": "developer"
            }
        }
    ]
}

Also, some users have reported that they didn’t receive PN, I’m wondering if it could be due to this error. Note, the same device token in standalone device “works” as i receive them correctly, but has this FCM error.

We have FCM configured, use Apple PN key, and have the credentials all configured via expo.

Any help would be appreciated.

Hi @yunibaek,

What do you mean by saying it “works” when you send your push notifications? Also, are push notifications on the iOS side are running smooth?

I’ve usually seen this error when the user uninstalled the app. But since you’re using your own device and testing there, I doubt you don’t have the app installed :smile:

Did you recently migrate from GCM to FCM?

-Charlie

It “works” in standalone, as in I receive the notification on my device and I see it in the notification center.
However, when I try to execute a test push notification such as:

curl -H "Content-Type: application/json" -X POST "https://exp.host/--/api/v2/push/send" -d '{
  "to": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
  "title":"hello",
  "body": "world"
}'

I receive the error above, and no notification shows up. I’m using the exact same push token that’s in our DB which “works” in standalone.

We have always used FCM. We recently changed our apple push notification certificate to use the key as noted here: https://docs.expo.io/versions/latest/distribution/building-standalone-apps/#switch-to-push-notification-key-on-ios (though it doesnt seem related as this is related to FCM PN error).

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.