首页 > 解决方案 > 无法在 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)

标签: reactjs

解决方案


推荐阅读