question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NG6 - ngsw doesn't work offline

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Win 10 Angular CLI: 6.2.2 Node: 8.11.2 npm: 5.6.0 OS: win32 x64 Angular: 6.1.7 … animations, common, compiler, compiler-cli, core, forms … http, language-service, platform-browser … platform-browser-dynamic, router, service-worker

Package Version

@angular-devkit/architect 0.8.2 @angular-devkit/build-angular 0.8.2 @angular-devkit/build-optimizer 0.8.2 @angular-devkit/build-webpack 0.8.2 @angular-devkit/core 0.8.2 @angular-devkit/schematics 0.8.2 @angular/cdk 6.4.7 @angular/cli 6.2.2 @angular/material 6.4.7 @angular/pwa 0.8.2 @ngtools/webpack 6.2.2 @schematics/angular 0.8.2 @schematics/update 0.8.2 rxjs 6.2.2 typescript 2.9.2 webpack 4.19.0

Repro steps

To reproduce this bug you can:

I did some lazy load but I think it doesn’t matter…

The log given by the failure

When I refresh the browser on offline mode, none of my files stay on cache. The service worker ngsw-worker.js get registered normally online andit seems that cache some of my *.js and *.css files, but not my main.js or index.html. And then, again, offline it caches nothing.

I would like to solve this by not creating my own sw.js, but I am new at angular and I think it is the only way for now.

onlinemode

offlinemode

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
srikanthweviocommented, Jul 29, 2019

I have also same issue with offline mode I am using angular 7 project in to pwa .in offline mode only works with /index.html

0reactions
angular-automatic-lock-bot[bot]commented, Sep 9, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

angular/service-worker not working when offline
When I set the chrome devtools options to Offline and Disable cache the service worker doesn't load content anymore. A good example of...
Read more >
Angular Service Worker - Step-By-Step Guide
Having the complete web application downloaded and installed on the user browser is also the first step for enabling application offline mode, ...
Read more >
angular/angular - Gitter
Morning all, this isn't strictly an Angular question, I have been asked to scope an application that will work offline (initial thoughts is ......
Read more >
How to Build Websites that work without Internet Using ... - Atila
Coding tutorial on how to make website that work without internet using Angular, Firebase and Service Workers. The theory of how service workers...
Read more >
Angular Service Worker With @Angular/Pwa Package ...
To make your application work offline you need to pull the request from the cache if it is available. Update your fetch event...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found