我正在使用FCM向浏览器发送通知。我收到以下错误:
messaging/failed-serviceworker-registration", message: "Messaging: We
are unable to register the default s…t. (messaging/failed-serviceworker-
registration).", browserErrorMessage: "Failed to register a
ServiceWorker: A bad HTTP res…code (404) was received when fetching the
script.", stack: "FirebaseError: Messaging: We are unable to
registe…/assets/javascripts/firebase/firebase.js:1:760104
我从Google研究中了解到,firebase-messaging-sw.js不在根目录中,我将其放在public / javascripts /下。我正在为此项目使用播放框架。我的项目hiearchy:
|app(controllers, views)
|public
|conf