1

I have this issue, i'm trying to add my React app to Homescreen.

manifest.json

{
  "short_name": "Ridnois",
  "name": "Ridnois - Amazing store (dev)",
  "icons": [
    {
      "src": "r-ico-144px.png",
      "sizes": "144x144",
      "type": "image/x-ico"
    }
  ],
  "start_url": "./index.html",
  "display": "standalone",
  "theme_color": "#fefefe",
  "background_color": "#fefefe"
}

Doing this, i get this error:

Site cannot be installed: a 144px square PNG icon is required, but no supplied icon meets this requirement

Then i tried to change the type of the icon:

"type":"image/png"

But i get this error:

Site cannot be installed: no matching service worker detected. You may need to reload the page, or check that the service worker for the current page also controls the start URL from the manifest

My icon png image is 144x144px, i created the template of my app with ReactJs, my serviceWorker works fine.

  • To address the "no matching service worker detected" error, try the posted answer in this [SO post](https://stackoverflow.com/a/48078971/6143482) which is to "Site cannot be installed: no matching service worker detected. You may need to reload the page, or check that the service worker for the current page also controls the start URL from the manifest". – ReyAnthonyRenacia Aug 22 '18 at 11:14
  • Can you share your directory structure? Where is the PNG located relative to the manifest.json? – Daniel Bank Aug 24 '18 at 13:45
  • Did you manage to solve it? – Nermin Aug 11 '20 at 08:27

1 Answers1

0

Allow me to share snaps of what worked for me:

manifest.json

enter image description here

public folder contents

enter image description here

index.html

enter image description here

Seems Chrome wanted at least 144x144 maybe someone with more on why this worked could edit this.

Dev Yego
  • 539
  • 2
  • 12