angular: service worker fails to load css file
🐞 bug report
Affected Package
The issue is caused by package @angular/service-workerIs this a regression?
I have not seen a version where this doesn't happenDescription
Followed getting started steps:
- npm install -g @angular/cli
- ng new my-app (selected no to router, used scss)
- ng add @angular/pwa --project my-app
- the only update i made to the code was to the styles.scss file adding: body { background-color: yellow; }
- ng build --prod
- run with http-server
- create short cut with chrome on desktop version (Version 70.0.3538.110 (Official Build) (64-bit))
🔬 Minimal Reproduction
🔥 Exception or Error
The FetchEvent for "https://mmciodev.mge.com/styles.f37e128c6af9ca929fb7.css" resulted in a network error response: the promise was rejected.
ngsw-worker.js:1 Uncaught (in promise) DOMException: Entry already exists.
🌍 Your Environment
Angular Version:
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.11.2
@angular-devkit/build-angular 0.11.2
@angular-devkit/build-optimizer 0.11.2
@angular-devkit/build-webpack 0.11.2
@angular-devkit/core 7.1.2
@angular-devkit/schematics 7.1.2
@angular/pwa 0.11.2
@ngtools/webpack 7.1.2
@schematics/angular 7.1.2
@schematics/update 0.11.2
rxjs 6.3.3
typescript 3.1.6
webpack 4.23.1
Anything else relevant?
Chrome Version 70.0.3538.110 (Official Build) (64-bit)
It is very difficult to reproduces this error consistently, almost like it is a race condition. But having a chrome shortcut on my desktop seems to reproduce it the most often, when chrome is not currently open.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 17 (2 by maintainers)
I found a website which produce randomly the same bug: https://deanhume.github.io/beer/ The error in console: