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?
If 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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With