Web推送服务工作者注册错误-注册失败-无法检索公共密钥? [英] Web push service worker registration error - Registration failed - could not retrieve the public key ?

查看:128
本文介绍了Web推送服务工作者注册错误-注册失败-无法检索公共密钥?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试安装Service Worker(Chrome 55)时,在浏览器控制台中出现此错误.

When trying to install a service worker (Chrome 55), I'm getting this error in the browser console.

Registration failed - could not retrieve the public key

但这仅在其中一台设备的浏览器中发生.在chrome 55的其他设备中,它工作正常.我无法在具有相同Chrome版本的其他设备中复制此问题.因此,我想这不是工作程序或清单文件的问题.我很高兴有人可以在这个问题上有所启迪.

But this is happening only in the browser in one of the devices. In other devices in chrome 55, it's working fine. I'm not able to replicate this issue in other devices with the same chrome version. So I suppose this is not a problem with worker or manifest files. I would be very happy somebody could throw some light on this issue.

推荐答案

我从

I got some advice from service worker discuss group regarding this error. Peter who is part of Chromium project says that

这是一种错误,适合永远不应该发生" 类别.发生这种情况的唯一情况是 磁盘上GCM密钥存储数据库已损坏,并且由于某种原因, 无法恢复."

"This is the sort of error that fits in the "this should never happen" category. The only situation in which this would happen is when the on-disk GCM Key Store database got corrupted and, for some reason, cannot be recovered."

,马特(Matt)向我指出了这一点: https://cs.chromium.org/chromium/src/content/public/common/push_messaging_status.cc ?type = cs& q =%22不能+不能+检索+公钥+%22& sq = package:铬& l = 49

and Matt pointed me to this : https://cs.chromium.org/chromium/src/content/public/common/push_messaging_status.cc?type=cs&q=%22could+not+retrieve+the+public+key%22&sq=package:chromium&l=49

因此,此错误恰好在应永远不会发生"类别中.幸运的是,当我重启机器时,Chrome抛出了此错误,该错误消失了,并且开始正常工作.

So this bug happens to be in "should never happen" category. Luckily when I restarted the machine, in which the chrome was throwing this error, the error disappeared and it started working fine.

在此处详细了解此内容: https://groups.google.com/a/chromium.org/forum/#!topic/service-worker-discuss/gCFxq4fHPVw

Read more about this here : https://groups.google.com/a/chromium.org/forum/#!topic/service-worker-discuss/gCFxq4fHPVw

这篇关于Web推送服务工作者注册错误-注册失败-无法检索公共密钥?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆