I get the following error when using the Google Lighthouse extension or other similar manifest.json validation services.
"ERROR: file isn't valid JSON: SyntaxError: Unexpected token in JSON at position 0"
The manifest works. I get the "Add to homescreen" prompt and the manifest.json file is found in dev tools (Application / Manifest section) though the parameters of the file aren't shown.
I've checked the format against the Google IO and that the MIME type is correct. I'm lost as to what else to try.
Any ideas?
I get the following error when using the Google Lighthouse extension or other similar manifest.json validation services.
"ERROR: file isn't valid JSON: SyntaxError: Unexpected token in JSON at position 0"
The manifest works. I get the "Add to homescreen" prompt and the manifest.json file is found in dev tools (Application / Manifest section) though the parameters of the file aren't shown.
I've checked the format against the Google IO and that the MIME type is correct. I'm lost as to what else to try.
Any ideas?
Share Improve this question edited Aug 23, 2019 at 11:07 toepoke.co.uk asked Feb 12, 2017 at 11:28 toepoke.co.uktoepoke.co.uk 8271 gold badge7 silver badges19 bronze badges1 Answer
Reset to default 12If you're on Windows the above error may be because you have the manifest.json file saved with a Byte Order Mark (BOM).
Saving without a BOM may fix the problem.
In Visual Studio use Save As, use the dropdown next to Save to select Save with Encoding, then pick Unicode (UTF-8 without signature).
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744330699a4568871.html
评论列表(0条)