在Chrome中调试服务人员“尝试安装" [英] Debugging service worker 'trying to install' in Chrome

查看:77
本文介绍了在Chrome中调试服务人员“尝试安装"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我假设我是 http://www.espruino上的标准服务人员网页 http://www.espruino.com/ide的.com/ide/serviceworker.js

I have what I assumed was a pretty standard service worker at http://www.espruino.com/ide/serviceworker.js for the page http://www.espruino.com/ide

但是最近,当我在Chrome开发者控制台中为Service Workers设置了重新加载时更新"时,网站保持加载指示器亮着,并且状态显示新的Service Worker是正在尝试安装".

However recently, when I have "Update on reload" set in the Chrome dev console for Service Workers the website stays with its loading indicator on, and the status shows a new service worker is "Trying to Install".

最终,我看到新服务人员显示一个红色的"x",并显示一个带有链接的"1",但这没有任何作用或提供任何工具提示.单击serviceworker.js会将我带到源文件,第一行以黄色突出显示,但没有突出显示错误.

Eventually I see a red 'x' by the new service worker and a '1' with a link, but that doesn't do anything or provide any tooltip. Clicking on serviceworker.js brings me to the source file with the first line highlighted in yellow, but there are no errors highlighted.

我已经照常进行了检查,并检查了Service Worker引用的所有文件是否都存在并且它们确实存在,并且我不知道接下来要看什么.

I've done the usual and checked that all files referenced by the service worker exist and they do, and I have no idea what to look at next.

有人知道如何进一步调试吗?

Does anyone have any clues how to debug this further?

谢谢!

推荐答案

我正在使用Chrome Beta.

I'm on Chrome Beta.

我将最新版本更新为神奇,一切正常.所以我想这是Chrome或devtools中的错误,而不是我的代码.

I updated to the newest release a magically everything works. So I guess it was a bug in Chrome or the devtools, not my code.

这篇关于在Chrome中调试服务人员“尝试安装"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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