5

I am having an issue once the react app site is deployed with the manifest being blank. When running on localhost, it displays normally under the Chrome dev console under Application. Here is my line with reference to it on my index.html.

<link rel="manifest" href="/manifest.json"/>

Here is my manifest.json

{
  "short_name": "Test",
  "name": "Test React App",
  "icons": [
    {
      "src": "example-192x192.png",
      "type": "image/png",
      "sizes": "192x192"
    },
    {
      "src": "example-512x512.png",
      "type": "image/png",
      "sizes": "512x512"
    }
  ],
  "start_url": "/",
  "display": "fullscreen",
  "theme_color": "#ffffff",
  "background_color": "#ffffff"
}

I have spent a ton of time trying to understand why the manifest is completely blank when deployed but does not have any errors when running locally. From the docs, it seems it should work. Am I missing something? If it helps, I am deploying over AWS. Any information would be helpful.

Also, I adjusted my index.html to look like href="manifest.json" as well

2 Answers 2

3

I needed to add crossorigin="use-credentials" to get rid of the error. My manifest.json is located in the public folder.

<link rel="manifest" crossorigin="use-credentials" href="%PUBLIC_URL%/manifest.json" />

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

Comments

0

If you used create-react-app and then used some tool to generate your favicon and html meta tags then becareful not to make a duplicate of <link rel="manifest" href="/manifest.json"/>. For me, this is what cause the error.

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.