尝试发送推送通知时出错

时间:2020-08-20 08:25:57

标签: android react-native push-notification expo

我最近将expo应用程序弹出到裸露的工作流程中,并更改了程序包名称。现在,我无法使用expo-server-sdk或expo notifications push tool从自己的后端发送通知。我得到的错误如下:

[
  {
    id: 'e17a1f3a-7c5b-41fe-8446-89ba6cb22027',
    status: 'error',
    message: "Unable to retrieve the FCM server key for the recipient's app. Make sure you have provided a server key as directed by the Expo FCM documentation.",
    details: { error: 'InvalidCredentials', fault: 'developer' }
  }
]
{
  'e17a1f3a-7c5b-41fe-8446-89ba6cb22027': {
    status: 'error',
    message: "Unable to retrieve the FCM server key for the recipient's app. Make sure you have provided a server key as directed by the Expo FCM documentation.",
    details: {
      fault: 'developer',
      error: 'InvalidCredentials',
      sentAt: 1597911004
    },
    __debug: {}
  }
}

我已经用android测试过。旧服务器密钥失败后,我尝试创建新服务器密钥并将其上传到EXPO服务器

expo push:android:upload --api-key

导致相同错误的原因。我尝试先从博览会服务器(expo push:android:clear)删除api密钥,然后再次上传,结果相同。然后,我尝试创建一个新的firebase项目并重做expo documentation中所述的步骤,以得到相同的结果。我什至等了几天,看看在想出点子的时候问题是否会解决。我的知识和谷歌搜索使我失败了,因此任何帮助将不胜感激。如果您需要更多信息,请告诉我。

提前谢谢!

0 个答案:

没有答案