[Django]-Manifest: Line: 1, column: 1, Syntax error on Chrome browser

30👍

I had the same problem when I moved my Codesandbox project to local. In my case, there was no manifest.json file in the public folder.
I solved it by adding the default manifest.json that create-react-app generates:

{
  "short_name": "CloseWeUI",
  "name": "The front-end UI for CloseWe",
  "icons": [
    {
      "src": "favicon.ico",
      "sizes": "64x64 32x32 24x24 16x16",
      "type": "image/x-icon"
    }
  ],
  "start_url": ".",
  "display": "standalone",
  "theme_color": "#000000",
  "background_color": "#ffffff"
}

18👍

As I added password protection to a developer-only page of mine, I suddenly started getting "manifest line 1 column 1 syntax error" (manifest.json) errors.

I am also using AWS Amplify as well as Create React App to build my app. I tried all of the solutions above, but nothing helped.

The one thing that did help was adding one property to the link to my manifest.json in my index.html.

To solve this, I added crossorigin="use-credentials"*, like below:

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

15👍

I had the same problem (“Manifest: Line: 1, column: 1, Syntax error”) while running my app (react app with react-router, published with AWS Amplify).

My problem was fixed by doing the following:
In “Rewrites and redirects” make sure you have “json” in the following line:

Source address:
</^[^.]+$|\.(?!(css|gif|ico|json|jpg|js|png|txt|svg|woff|ttf)$)([^.]+$)/>

Target address:
/index.html

Type:
200 (Rewrite)

The above solution also fixed problem with non-working react-router links in production as it was reported in the following thread:
React Router DOM not working correctly on Amplify Console AWS

Here is to my personal project with fixed manifest.json issue, as well as non-working react-router issue (a link to some random code snippet – fibonacci memoization in this case):

https://everhint.com/hintlink/algorithms/javascript/codesnippet/fibonacci/memoization/fibonacci-memoization/d01f275b-6acf-4f26-9448-e99939c9d4b7.html

6👍

VladS answer solved my problem.
I was also using AWS Amplify Console for my Angular App.

You can also have a look at the Content-Type in the response headers of your manifest file. It should NOT be text/html. If it is, you have to change your server configuration to serve the file in the right Content-Type. More info

Angular names the Manifest-File “manifest.webmanifest”.
So I also had to go to the “Rewrites and redirects” Page in the Amplify Console and edited the existing entry like so:

Source address
</^[^.]+$|\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|json|webmanifest)$)([^.]+$)/>

(I added json|webmanifest)

6👍

React create app

If you got this error while working with React Create App you should go to:
public/index.html find <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> and remove it.

2👍

you should put

 "homepage": "",

on your packaje.json.
it worked for me.

2👍

in line 7 of index.html just delete this

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

the error is coming from this line cause you delete manifest.json but you forget this line so you have an error in your console

0👍

i put the manifest.json on the public file with the index.html enter image description here

0👍

This error message seems to be a catchall error for a lot of issues. For me the issue was using http-server to load the page. When I switched to the project root directory and ran npm start , the project loaded without issues and any changes.

0👍

I deleted this line from my index.html file in the public directory

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

Leave a comment