Firebase Push notification not working in quasar framework n Vue.js
udaylal2007 last edited by
I am using firebase to send push notification inside quasar framework. Its working fine locally.
But when we deploy code to dev server .
Then it gives error:-Failed to register a ServiceWorker: A bad HTTP res…code (404) was received when fetching the script.
Because after building quasar app it generate its own service-worker.js file when we want to add code or add our own service woker then it dosenot work.
1.Please tell me how to use our own firease-messaging-sw.js in place of quasar generated service-worker.js.
Becouse for firebase push notification search service worker file with name of " firease-messaging-sw.js"
2.Even i add my code to service-worker.js then also it dont reflect in code.
Thanks in advance
kiani last edited by
Hi, I’m having a similar problem, I can’t find a way to use firebase-messaging-sw.js instead of custom-service-worker.js (or additionally). Did you solve the problem? Thanks!
jitendra16 last edited by
You will find index.esm.js, index.cjs.js.map and index.esm.js.map also at above location.Total 4 files.
var DEFAULT_SW_PATH = ‘/service-worker.js’;
var DEFAULT_SW_SCOPE = ‘/’;
Do above two changes wherever you find DEFAULT_SW_PATH and DEFAULT_SW_SCOPE
then build again, everything will work fine.