I believe this is a Chromium bug that has been reported here. Hopefully it will be fixed soon or some more information about the issue will be published.
Paul Irish implemented a temporary work around, which is as follows:
if (e.request.cache === 'only-if-cached' && e.request.mode !== 'same-origin') {
return;
}
I ran it inside the callback for the service worker install
and fetch
listeners and it prevented the error.
You can see the full commit of Paul's code here.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…