最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Firebase notification are not working in chrome incognito mode - Stack Overflow

programmeradmin1浏览0评论

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
Add a comment  | 

2 Answers 2

Reset to default 10

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

发布评论

评论列表(0)

  1. 暂无评论