Web 推送服务工作者注册错误 - 注册失败 - 无法检索 public 密钥?

Web push service worker registration error - Registration failed - could not retrieve the public key ?

尝试安装 Service Worker (Chrome 55) 时,我在浏览器控制台中收到此错误。

Registration failed - could not retrieve the public key

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

我从 service worker discuss group 那里得到了一些关于这个错误的建议。 Chromium 项目的 Peter 说

"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=%22could+not+retrieve+the+public+key%22&sq=package:chromium&l=49

所以这个错误恰好属于 "should never happen" 类别。幸运的是,当我重新启动机器时,chrome 抛出了这个错误,错误消失了,它开始正常工作。

在此处阅读更多相关信息:https://groups.google.com/a/chromium.org/forum/#!topic/service-worker-discuss/gCFxq4fHPVw