FCM 401“来自 APNS 或 Web 推送服务的身份验证错误”

Law*_*mbo 6 apple-push-notifications ios firebase-cloud-messaging

有时会从我们的 firebase 项目的 http v1 端点收到 401。

我收到的错误消息是:

 "error": {
    "code": 401,
    "message": "Auth error from APNS or Web Push Service",
    "errors": [
      {
        "message": "Auth error from APNS or Web Push Service",
        "domain": "global",
        "reason": "unauthorized"
      }
    ],
    "status": "UNAUTHENTICATED"
  }
}
Run Code Online (Sandbox Code Playgroud)

这些显然只发生在 ios 设备上,问题是,一些消息正在通过,这意味着它一定是 APNS 证书以外的东西。

我想知道是否与某些设备上应用程序的多个版本(生产版本和开发版本)有关?