When I open the chrome browser in incognito mode then service worker file execute then get an error.
Getting Following error
messaging/permission-blocked"
message:"Messaging: The required permissions were not granted and blocked instead. (messaging/permission-blocked)."
stack:"FirebaseError: Messaging: The required permissions were not granted and blocked instead. (messaging/permission-blocked).↵ at d (.6.2/firebase-messaging.js:30:200)"
When I open the chrome browser in incognito mode then service worker file execute then get an error.
Getting Following error
messaging/permission-blocked"
message:"Messaging: The required permissions were not granted and blocked instead. (messaging/permission-blocked)."
stack:"FirebaseError: Messaging: The required permissions were not granted and blocked instead. (messaging/permission-blocked).↵ at d (https://www.gstatic.com/firebasejs/3.6.2/firebase-messaging.js:30:200)"
Share
Improve this question
edited Jan 21, 2017 at 15:17
Frank van Puffelen
599k85 gold badges888 silver badges858 bronze badges
asked Jan 21, 2017 at 9:24
Rohit ShelhalkarRohit Shelhalkar
7661 gold badge9 silver badges15 bronze badges
2 Answers
Reset to default 10Notifications to Chrome using Firebase Cloud Messaging are disabled in incognito mode.
Interestingly enough, the best link I can find for it is in the OneSignal documentation: https://documentation.onesignal.com/docs/web-push-setup
This is largely dependent on the browser.
The reasoning from the Chrome side is that the expectation is unclear from the users point of view. If you enable push in an incognito window and then close it, should you still receive push messages?
In Firefox I had a number of problems diagnosing an unusual setting I had on where Firefox would not write any files to disk, this lead to service workers not being install-able, even though the API was there, took a while to learn it was the security setting that was the issue.