I am trying to make an app i wrote progressive.
I am getting an error pointing to my manifest.json file...
The error says, Line: 1, Column: 1, Unexpected Token
.
Here is my manifest file
{
"manifest_version": 2,
"name": "Blah Blah Blah",
"short_name": "Analysis App",
"theme_color": "#fddb2f",
"background_color": "#fddb2f",
"display": "standalone",
"Scope": "/",
"start_url": "/",
"version": "1",
"icons": [
{
"src": "images/icons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "images/icons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "images/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "images/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "images/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png"
},
{
"src": "images/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "images/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "images/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"splash_pages": null
}
And this is how i am referencing it in my html
<link rel="manifest" href="/manifest.json">
I have no idea why i am getting this error??
Can anybody help??
Thanks a lot
Try to use href="./manifest.json" with the "." before /
I got same problem but it is solved 50%.
I tested it google tutorial from https://developers.google.com/web/fundamentals/codelabs/your-first-pwapp/
When I setup it on web server for chrome with root folder (Choose folder = Current/pwa_weather ) It works 100%. I can access it like https://localhost:8888 .
However, when I set it up to my Azure with accessing like https://xxxx.azurewebsites.net/pwa_weather , it doesn't work.
I conclude menifest.json must be in web root folder. I failed even modifying manifest.json with utf8bom file format. Also, modifying index.html with absolute path like , .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.