workbox on https://localhost:<port> fails to fetch random assets
Asked Answered
M

0

7

I've got an express server with a self-signed SSL which just serves assets for SPA frontend. When i visit https://localhost:8433 application stats up and successfully fetches all requried assets. However at the same time app's service worker (workbox) also sends its requests to cache the same assets. And those requests randomly fail with a TypeError: Failed to fetch Workbox fetch error

Network tab: enter image description here

Seems like some requests are randomly being canceled by service worker.

I've tried to search for similar issues, but to no awail. Some recommend playing around with CORS, that didn't help, swapping localhost for 127.0.0.1 or changing caching strategies had the same effect, in the end i had the very minimal configuration with precaching only (no runtime caching), unfortunatelly nothing really helped.

I'm pretty sure it should be a common issue, i'm just missing it :) Does anyone have any thoughts?

By the way, when app is served from insecure http - no errors at all.

Mylohyoid answered 15/7, 2018 at 19:36 Comment(2)
I also have this issue. However, for me it exhibits on HTTP as well and if I've loaded a huge amount of data (~14.5 MB).Devisor
Are you still able to reproduce this with a recent version of Workbox? Which browsers do you see it in? It may also be possible to capture some relevant info using chrome://net-export/Goosy

© 2022 - 2024 — McMap. All rights reserved.