【问题标题】:Facing an issue while subscribing to fcm with new refresh token使用新的刷新令牌订阅 fcm 时遇到问题
【发布时间】:2020-07-28 14:19:49
【问题描述】:

我正在使用 AngularFireMessaging 来处理 Angular 应用程序中的 FCM 令牌。 问题是当用户单击允许时,它会创建一个令牌并点击此链接进行订阅。 https://fcm.googleapis.com/fcm/connect/subscribe

但是现在响应是错误的。 503.

{
  "error": {
    "code": 503,
    "message": "The service is currently unavailable.",
    "status": "UNAVAILABLE"
  }
}

知道如何解决这个问题。

我在 service worker (firebase-messaging-sw.js) 中使用下面的 js 库作为导入

// Give the service worker access to Firebase Messaging.
// Note that you can only use Firebase Messaging here, other Firebase libraries
// are not available in the service worker.
importScripts('https://www.gstatic.com/firebasejs/5.5.0/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/5.5.0/firebase-messaging.js');

【问题讨论】:

    标签: javascript angular firebase firebase-cloud-messaging angularfire


    【解决方案1】:

    只是 FCM 在短时间内阻止了多个注册多个令牌的请求。时间差不是很清楚。它在 10 小时后开始工作,以此类推。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-31
      • 2020-09-19
      • 2017-05-10
      • 2019-06-29
      • 2020-07-12
      • 2017-11-09
      相关资源
      最近更新 更多