cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (0)