4

I'm use node js server for sending remote notification with ""firebase-admin" package

  await admin
  .messaging()
  .send(dataMessage)
  .then(console.log("Data sent"))
  .catch((err) => console.log("Error" + err));


  export const dataMessage = (fcmToken, messageData) => {
  const apns = {payload: {aps: {"content-available": true}}};
  const message = {
    token: fcmToken,
    data: messageData,
    apns
  };
  return message;
};

I don't know why but randomly i get "Error: Requested entity was not found." and i can't realize why. Any advise will be great because it's really frustrating

Barak
  • 654
  • 13
  • 30
  • 1
    If it happens sporadically it may have something to do with the device registration tokens. I'd recommend logging the errors, along with the tokens that caused them and then contacting Firebase support with that information for further guidance. – Hiranya Jayathilaka May 05 '20 at 00:39

0 Answers0