尝试加载时服务工人获取错误---我的网站? [英] Service Worker Fetch Error When Trying to Load --- My Website?
问题描述
我最近将Cloudfront添加到了我的Web应用程序中.我正在使用WorkBox服务工作者并收到错误消息:
VM7 workbox-strategies.prod.js:1未捕获(已承诺)TypeError:无法获取
我从
将域加载到浏览器中就可以了.服务人员为什么会抛出此提取错误?
您看到的是由于 (Chrome DevTools小组意识到这可能会造成一些混乱,并且正在努力改善向开发人员报告的方式.) I've recently added Cloudfront to my web app. I'm using a WorkBox service worker and getting the error: VM7 workbox-strategies.prod.js:1 Uncaught (in promise) TypeError: Failed to fetch I found out from this SO post to watch the Network tab to find out what resource was causing the problem. I checked and found out -- it's trying to load my own domain! The domain loads in the browser just fine. Why would the service worker be throwing this fetch error? What you're seeing is due to the new offline support detection in Chrome 89+. If your site has a web app manifest and a service worker, Chrome will automatically simulate an offline connection and then make a request for the If your service worker uses a network-first strategy for responding to navigation requests, then there may be a failed network request logged in the Network panel, even if the check ultimately succeeds because of a response from the cache. (The Chrome DevTools team is aware that this can be a bit confusing, and is working on improving how this is reported to developers.) 这篇关于尝试加载时服务工人获取错误---我的网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
start_url
listed in your web app manifest.