next-pwa icon indicating copy to clipboard operation
next-pwa copied to clipboard

Page does not work offline -> Manifest Installability Error

Open mayurc137 opened this issue 2 years ago • 5 comments

Summary

I am facing PWA install issues with next-pwa

For my root app location, it works fine and I can see the install button in the address bar. Once I navigate to another page and the URL changes. After that, if I hit refresh the error shows in the manifest.

Any ideas on how to tackle this?

CleanShot 2022-01-11 at 23 28 50

Versions

  • next-pwa: 5.4.0
  • next: 10.2.3

How To Reproduce

Here is my manifest file

{ "theme_color": "#01805E", "background_color": "#F6F6F7", "display": "standalone", "start_url": "/", "name": "WhatsApp Inbox", "short_name": "WhatsApp Inbox", "icons": [ { "src": "/icon-192x192.png", "sizes": "192x192", "type": "image/png", "purpose": "any" }, { "src": "/icon-256x256.png", "sizes": "256x256", "type": "image/png", "purpose": "any" }, { "src": "/icon-384x384.png", "sizes": "384x384", "type": "image/png", "purpose": "any" }, { "src": "/icon-512x512.png", "sizes": "512x512", "type": "image/png", "purpose": "any" } ] }

And the next.config.js -> https://gist.github.com/mayurc137/2ee7a2003da8c480332e91526b080ba6

Expected Behaviors

No matter which sub URL I visit for my app eg. https://app.com/workspace or https://app.com/account or https://app.com the install button should work and the manifest should not throw an error

Additional Context

I have also enabled offline support by adding _offline.tsx file to the pages directory

mayurc137 avatar Jan 11 '22 19:01 mayurc137

The config is fine, are using running it under next dev or next start?

shadowwalker avatar Apr 09 '22 22:04 shadowwalker

Having a similar issue that said "Page does not work offline". But for me, I don't see the install button in any page. I am using next 12.1.6 and next-pwa 5.5.4. I did run it under next start. It would be great if anyone can point me to some direction. Thanks in advance!

lichenglu avatar Jun 28 '22 04:06 lichenglu

Also having this issue "Page does not work offline" at the moment but for all pages with same configs and setup, hoping to get a fix for this asap

JHNLWHD avatar Aug 05 '22 06:08 JHNLWHD

I also encountered this bug. Chrome's lighthouse told me that the page does not work offline and thus it was no longer a valid PWA and could not be installed anymore.

I simply fixed the issue by installing a previous version, specifically 5.5.4 =>npm install [email protected]

Hadjimina avatar Aug 13 '22 14:08 Hadjimina

same problem

"next": "12.1.6", "next-pwa": "^5.6.0",

igor-peregudov avatar Sep 17 '22 01:09 igor-peregudov