firebase / firebase/quickstart-js

Including service worker file "firebase-messaging-sw.js"

Open
#440 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5.4k
Forks
3.7k
Avg merge
2d 13h
Merged PRs (30d)
6

Description

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.

![image](https://user-images.githubusercontent.com/23085950/78683629-ea1ed100-78c5-11ea-9768-484342c047ce.png)

In my angular.json i have this:

![image](https://user-images.githubusercontent.com/23085950/78683793-1d616000-78c6-11ea-88dc-ef448c66d616.png)

The file existis in my src folder:

![image](https://user-images.githubusercontent.com/23085950/78683967-513c8580-78c6-11ea-8d81-1232d7a82c71.png)

And when i run **ng build --prod** the file appears in the dist folder:

![image](https://user-images.githubusercontent.com/23085950/78684119-7af5ac80-78c6-11ea-8f73-2771559eb25b.png)

I dont know what to do !.
Can anyone help me?

Thanks (sorry my english, i speak spanish)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.