on 07-06-2017 4:40 AM - last edited on 02-03-2024 10:02 PM by postmig_api_4
I'm trying to host an application on my trial account in HCP Cockpit. and have a requirement to send Web Push Notification to my website users, instead of email etc. for any update on my product.
Currently I've tried the OneSignal as well as Google's FCM, but both require the access to my account domain's root directory to store the service worker javascript file, which i think is not allowed by default.
I'm getting following error while registering the service worker -
FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script. (messaging/failed-serviceworker-registration).
Basically it's asking me to create a firebase-messaging-sw.js file in the root of my domain of hosting. for. e.g. https://yoursite.com/firebase-messaging-sw.js, which is not possible it seems.
I tried to create the sw.js file in root most folder content, but it denies the file creation at the root level.
Please check the snapshot.
Someone who's already worked on Web Push Notification in browser, Any help will be much appreciated!
Thank you,
Prakash Upadhyay
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.