3

I've deployed PWA on my test server https://wwww.mytestserver.me/dev/pwa/ under 'dev/pwa' folder. The app passed Lighthouse with 100% PWA score. But the app still doesn't work as it's expected. It just doesn't work at all. )) JS console says:

Failed to load ‘https://wwww.mytestserver.me/dev/pwa’. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with ‘Error: Response not Ok (fetchAndCacheOnce): request for https://wwww.mytestserver.me/index.html returned response 404 Not Found’ - ngsw-worker.js:589:31

In my manifest.json I have: "scope": "/" and "start_url": "/". I tried to set them to https://wwww.mytestserver.me/dev/pwa/ and to just /dev/pwa/ but result is the same.

1 Answer 1

6

You just need to change index property in your ngsw-config.json from /index.html to /dev/pwa/index.html.

If this doesn't work, you need to clean browser caches. As for me it started to work only after complete clearing of browser data.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.