Issue while having both FCM and APNS active

Hi all.

I'm facing a strange issue while having both FCM and APNS integrations set and active.
I'm setting the credentials for a subscriber with an APNS token like this:
{
    "providerId": "apns",
    "credentials": {
        "deviceTokens": ["xxxxxx"]
    }
}


So the subscriber has a token related to apns. But when I'm trying to send a push notification to that user using an existing template, I'm getting FCM related errors.
{
  "stack": "Error: Sending message failed due to \"The registration token is not a valid FCM registration token\"\n    at FcmPushProvider.<anonymous> (/usr/src/app/providers/fcm/build/main/lib/fcm.provider.js:112:35)\n    at step (/usr/src/app/providers/fcm/build/main/lib/fcm.provider.js:44:23)\n    at Object.next (/usr/src/app/providers/fcm/build/main/lib/fcm.provider.js:25:53)\n    at fulfilled (/usr/src/app/providers/fcm/build/main/lib/fcm.provider.js:16:58)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)",
  "message": "Sending message failed due to \"The registration token is not a valid FCM registration token\""
}


Do I miss a step of the process?

Thanks!
Was this page helpful?
Issue while having both FCM and APNS active - Novu