[英]Firebase notification are not working in chrome incognito mode
When I open the chrome browser in incognito mode then service worker file execute then get an error. 当我以隐身模式打开Chrome浏览器时,服务工作文件执行然后出错。
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)"
Notifications to Chrome using Firebase Cloud Messaging are disabled in incognito mode. 使用Firebase云消息传递的Chrome通知在隐身模式下被禁用。
Interestingly enough, the best link I can find for it is in the OneSignal documentation: https://documentation.onesignal.com/docs/web-push-setup 有趣的是,我能找到的最佳链接是在OneSignal文档中: 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. Chrome方面的推理是,从用户的角度来看,预期尚不清楚。 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. 在Firefox中,我遇到了一些问题,诊断出我在Firefox上不会将任何文件写入磁盘的异常设置,这导致服务工作者无法安装,即使API在那里,需要一段时间才能学习它问题的安全设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.