You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of AngularFire integration, the service worker is not created by just following the default steps as discussed in the guide.
I have to add the code:
platformBrowserDynamic().bootstrapModule(AppModule).then(() => {
if ('serviceWorker' in navigator && environment.production) {
navigator.serviceWorker.register('/ngsw-worker.js');
}
}).catch(err => console.log(err));
as described in this thread: #8779
When deploying to production, then the service worker is created as it should be.
Observed behavior
The next time I deploy a new version of the code, the site refuses to load and the following error is displayed in the console:
If I delete the service worker through chrome devtools and refresh, the site loads normally.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this issue. This issue was originally reported a long time ago and since then we've had many releases, one of which might have addressed this problem. Please update to the most recent Angular CLI version.
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
Versions
angular: 5.2.8
angular-cli: 6.0.0-beta.5
Repro steps
Because of AngularFire integration, the service worker is not created by just following the default steps as discussed in the guide.
I have to add the code:
platformBrowserDynamic().bootstrapModule(AppModule).then(() => {
if ('serviceWorker' in navigator && environment.production) {
navigator.serviceWorker.register('/ngsw-worker.js');
}
}).catch(err => console.log(err));
as described in this thread:
#8779
When deploying to production, then the service worker is created as it should be.
Observed behavior
The next time I deploy a new version of the code, the site refuses to load and the following error is displayed in the console:

If I delete the service worker through chrome devtools and refresh, the site loads normally.
The text was updated successfully, but these errors were encountered: