Error:
Issue: The default service worker registration has failed. ServiceWorker script at https://xxxxxx/firebase-messaging-sw.js for scope https://xxxxxxxx/firebase-cloud-messaging-push-scope encountered an error during installation. (messaging/failed-service-worker-registration).
Firebase functions normally on localhost, however, upon uploading the build to the server, the above error message appears.
Directory Structure:
src
app
assets
environments
favicon.io
firebase-messaging-sw.js
index.html
main.ts
manifest.json
polyfills.ts
styles.scss
test.ts