Skip to content

Minimal reproduction of @angular/service-worker failing to load routes while offline

Notifications You must be signed in to change notification settings

jackkoppa/service-worker-test

Repository files navigation

ServiceWorkerTest

This is a minimal reproduction of Angular issue #21636 (as well as #22110, a duplicate).

To see the problem for yourself, run:

git clone https://github.com/jackkoppa/service-worker-test.git
cd service-worker-test
git checkout routing-failure-minimal-repro
npm install
ng build --prod
cd dist
http-server -p 8080

Expected: The page also loads, since the index should be cached by the Service Worker, which should load, w/ Angular redirecting to the correct test-route Failure: The page fails to load. In the network tab, the service worker has responded with 504 - Gateway Timeout

Notes

  • Instructions written on 2/10/2018
  • The above assumes you have already installed
    • Node (8.9.4 used) & npm (5.6.0 used)
    • Angular CLI (1.6.8 used) npm install -g @angular/cli
    • http-server (0.11.0 used) npm install -g http-server

Environment

Angular CLI: 1.6.4
Node: 8.9.4
npm: 5.6.0
OS: Windows 10 Home 64-bit, x64
Angular: 5.2.1

Browser:
I've only tested on:
- [x] Chrome (desktop) Version 64.0.3282.140 (Official Build) (64-bit)

About

Minimal reproduction of @angular/service-worker failing to load routes while offline

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published