javascript - 消息 : This browser doesn't support the API's required to use the firebase SDK.(消息/不支持的浏览器)

标签 javascript firebase-cloud-messaging

这个问题在这里已经有了答案:





Firebase messaging is not supported in your browser how to solve this?

(3 个回答)


7 个月前关闭。




部署我们的网站后出现此错误,我的域是 domain.com,我无法将其更改为 https 或 localhost,那么我该如何摆脱此错误。

provider.ts:122 Uncaught FirebaseError: Messaging: This browser doesn't support the API's required to use the firebase SDK. (messaging/unsupported-browser).
    at e.instanceFactory (index.ts:56:25)
    at e.getOrInitializeService (provider.ts:318:33)
    at e.getImmediate (provider.ts:115:21)
    at e._getService (firebaseApp.ts:136:22)
    at e.<computed> [as messaging] (firebaseNamespaceCore.ts:228:29)
    at Object.s [as messaging] (firebaseNamespaceCore.ts:209:32)
    at Module.<anonymous> (firebaseInit.js:18:28)
    at a ((index):1:2329)
    at r ((index):1:2198)
    at Array.t [as push] ((index):1:2061)

最佳答案

Firebase 云消息传递仅在 HTTPS 网站上受支持。如果您无法将您的网站置于 HTTPS 上,您将无法使用 FCM 来传递推送通知。
另见:

  • Firebase messaging is not supported in your browser how to solve this?
  • 关于javascript - 消息 : This browser doesn't support the API's required to use the firebase SDK.(消息/不支持的浏览器),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70750266/

    相关文章:

    javascript - 什么时候需要服务器端验证?

    android - remoteMessage.getNotification().getBody() 出错

    android - Firebase FCM 强制 onTokenRefresh() 被调用

    javascript - 如何测试构造函数中抛出的错误?

    ajax 中的 php ajax

    javascript - ionic invalid key hash facebook 不匹配任何存储

    使用 FirebaseApp.configure() 时 iOS 应用崩溃

    android - 手机进入深度 sleep 时未收到 FCM 通知

    android - 如何手动生成 google-services.json

    php - Google Maps API V3 使用限制是按网站访问者还是按网络服务器?