reactjs - 无法在 Firebase 中注册默认服务人员?
问题描述
在 reactjs 中检索令牌时出错。
FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker for scope ('http://localhost:3000/firebase-cloud-messaging-push-scope') with script ('http://localhost:3000/firebase-messaging-sw.js'): ServiceWorker script evaluation failed (messaging/failed-service-worker-registration).
at WindowController.<anonymous> (http://localhost:3000/static/js/0.chunk.js:56513:33)
at step (http://localhost:3000/static/js/0.chunk.js:244050:17)
at Object.throw (http://localhost:3000/static/js/0.chunk.js:243981:14)
at rejected (http://localhost:3000/static/js/0.chunk.js:243944:32)
解决方案
推荐阅读
- mysql - 使用其他查询的值的 Mysql 查询
- redis - LettuceConnectionFactory 与 SentinelTopologyProvider
- c# - 知道 Windows 何时要求关闭进程
- react-native - WebView 已从 React Native 中移除
- php - Google Photos API 刷新令牌在 1 小时后未刷新 photosLibraryClient
- c# - 如何在 rdlc 报告中显示和设计列表列表
- c# - SharePoint CSOM 未在 ExecuteQuery 上引发预期异常
- json - 如何在 Flutter App 中使用 HTML 读取 JSON?
- .htaccess - 如何在 htaccess Xampp 中传递多个值
- python - 错误“强制转换为 Unicode:需要字符串或缓冲区,找到 cStringIO.StringO”当我尝试从 python 中的 url 插入 excel 图像时