我尝试使用Polymer实现推送通知。我跟着this link并且能够让服务工作者注册。我得到了以下Javascript控制台的评论。
Service Worker is ready :^) ServiceWorkerRegistration
但我也收到了这个错误。
Uncaught (in promise) DOMException: Registration failed - manifest empty or missing
注意:
<link rel="manifest" href="manifest.json">
已经在我的index.html中。由于我使用的是Google App Engine,在我的app.yaml中我还添加了以下内容
url: /manifest.json
static_files: templates/manifest.json
upload: templates/manifest.json
如果我尝试localhost:8080/manifest.json
,我的清单json会显示在浏览器上。我无法让它工作。请提供一些帮助,建议检查我的index.html中是否可以实际访问manifest.json