'manifest icons Line 1 not , column: 1, Unexpected token
manifest icons Line 1 not , column: 1, Unexpected token. This seems to be an old question here in stackflow. But I can't get any mentioned solutions to work.
{
"name": "slangoApp",
"icons": [
{
"src": "\/android-icon-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "\/android-icon-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "\/android-icon-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "\/android-icon-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "\/android-icon-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "\/android-icon-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"
}
]
}
The json validates will in validators, but i keep getting this error. What can be the problem?
Solution 1:[1]
manifest.json should be present in a directory where your index.html is present. Not in any other directory. If you are using react its possible that you might have misplaced it in src directory.
Solution 2:[2]
It's because the browser does not understand the MIME type of the manifest file and thus cannot find it. In Chrome DevTools > Network > Headers > Content-Type, the content-type of the manifest must match the actual manifest file extension (.json or .webmanifest).
In ASP.NET, you need to declare the file type in web.config:
<staticContent>
<mimeMap fileExtension=".json" mimeType="application/json" />
<mimeMap fileExtension=".webmanifest" mimeType="application/manifest+json" />
</staticContent>
Solution 3:[3]
This "name": "slangoApp", shoulb be like this "name": "slangoapp",
Please remember it should not contain uppercase letters of spaces.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jaiganesh |
| Solution 2 | |
| Solution 3 | Mohammad Ayoub Khan |
