tapio / live-server

A simple development http server with live reload capability.
http://tapiov.net/live-server/
4.43k stars 484 forks source link

The Server has conflict with Service Worker of the angular 2(6) #255

Open lllbllllb opened 6 years ago

lllbllllb commented 6 years ago

Issue description

Hi! If you will follow the angular official step-by-step description (but change their http-server to your live-server), after switching to offline page will not reload successfully (in chrome and edge; ff reload page fine).

Software details

This error arises anyway with any servers and browsers (for example, the http-server has this error too, but reload offline page successfully; live-server in ff has this error, but works correct):

request to: ngsw.json?ngsw-cache-bust=0.8024849320621168 
status (filed) 
type: fetch
initiator: ngsw-worker.js:2607

(seems like this Angular bug).

dcarabott commented 5 years ago

Any updates related to this issue? Looks like I'm experiencing this same issue where the request for ngsw.json? is failing due to an unknown error (haven't figured this one out yet and its not easy to replicate. Might be the offline scenario mentioned here) happening before. A hard reload and clear cache solves the problem. It does look like the service worker is in an incorrect state and it doesn't know how to recover.