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" />
- [Django]-Django: Validate file type of uploaded file
- [Django]-Can't install via pip because of egg_info error
- [Django]-How do I pass template context information when using HttpResponseRedirect in Django?
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):
- [Django]-Missing Table When Running Django Unittest with Sqlite3
- [Django]-How can I check database connection to mysql in django
- [Django]-Install mysql-python (Windows)
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)
- [Django]-IOS app with Django
- [Django]-Django ORM and locking table
- [Django]-How to recreate a deleted table with Django Migrations?
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.
- [Django]-Apache or Nginx to serve Django applications?
- [Django]-CSRF validation does not work on Django using HTTPS
- [Django]-Datetime.datetime.now() + 1
- [Django]-Simple Log to File example for django 1.3+
- [Django]-How do I extend the Django Group model?
- [Django]-Multithreading for Python Django
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
- [Django]-Django's ModelForm unique_together validation
- [Django]-Get request body as string in Django
- [Django]-Get virtualenv's bin folder path from script
- [Django]-How do I restart celery workers gracefully?
- [Django]-Django: how to annotate queryset with count of filtered ForeignKey field?
- [Django]-Django get a random object
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.
- [Django]-How can I set a default value for a field in a Django model?
- [Django]-Creating email templates with Django
- [Django]-Django Rest Framework – Missing Static Directory
0
I deleted this line from my index.html file in the public directory
<link rel="manifest" href="/manifest.json">
- [Django]-Pylint "unresolved import" error in Visual Studio Code
- [Django]-Best Fabric scripts for Django
- [Django]-Log in user using either email address or username in Django