Open dmantelli opened 4 years ago
Hi,
I had the same problem.
See if this helps:
in angular.json file add "src/firebase-messaging-sw.js"
"assets": [
"src/favicon.ico",
"src/assets",
"src/firebase-messaging-sw.js"
],
Hope it helps as it did in my case.
Stay safe!
Rodolfo
Hi guys!.
I have a very real strange issue. When I deploy my project to a firebase hosting i've not problem. But when I deploy de SAME EXACT code in my public server i got the famous error code:
If I try to open the file in the firebase hosting, it opens succesfully: https://XXXXX.firebaseapp.com/firebase-messaging-sw.js
But when I try to open in my public server, automatically redirects to the login page and it seems the file doesnt exist.
In my angular.json i have this:
The file existis in my src folder:
And when i run ng build --prod the file appears in the dist folder:
I dont know what to do !. Can anyone help me?
Thanks (sorry my english, i speak spanish)