NovuN
Novu3y ago
balance

Unexpected provider error

Hi,

I'm currently running novu locally using docker compose. I set up a basic workflow that sends a push notification. I set up the FCM provider. I then use the following script to send a notification:

// Set device token for push
const { Novu, PushProviderIdEnum } = require('@novu/node');

const config = {
  backendUrl: 'http://localhost:3000',
};

const novu = new Novu(NOVU_API_KEY, config);

// Only run once at the start
//novu.subscribers.setCredentials(SUBSCRIBER_ID, PushProviderIdEnum.FCM, {
//  deviceTokens: [DEVICE_TOKEN],
//}).then((res) => { console.log("Set device token successfully."); }).catch((error) => { console.log(error); })

// Send a push notification
novu.trigger(WORKFLOW_ID, {
  to: {
    subscriberId: SUBSCRIBER_ID,
  },
  payload: {
    "message": "hi"
  },
});


I downloaded the FCM toolbox app from the play store, which gives me a device token. So I can test things without having to code an app for it.

If I now run my script, I see the notification in the acitvity monitor but it tells me, that there is an unexpected provider error. The details are just {}.


How should I debug this?

Also see https://i.imgur.com/L2TAYTu.png
Imgur
Was this page helpful?