Skip to Content

Why is my Push Notification not working in SAP Servers (using OneSignal or FCM/GCM service)?

Jul 06, 2017 at 03:40 AM


avatar image

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., 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

account-error.png (29.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers