【发布时间】: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