Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unexpected char. error when uploading Chrome extension

I have developed a Chrome extension which works perfectly fine when I load it as an unpacked extension in Chrome. However, when I attempt to upload the zip to the Chrome Web Store, I receive the following manifest.json error:

An error occurred: Failed to process your item. manifest.json:8:4: unexpected char.

I have already removed all comments from the JSON file. I even tested my JSON at http://jsonlint.com and it came back valid. Does anyone have any clue as to what the issue could be?

Here is my manifest.json:

{
  "manifest_version": 2,
  "name": "My Extension",
  "version": "0.0.0.1",
  "description": "Description goes here",
  "content_scripts": [
      {
          "matches": ["https://example.com"],
          "css": ["css/style.css"],
          "js": [
              "lib/jquery-2.1.4.min.js",
              "scripts/main.js"
          ],
          "run_at": "document_idle"
      }
  ],
  "icons": {
      "16": "icons/16.png",
      "48": "icons/48.png",
      "128": "icons/128.png"
  }
}
like image 279
user5606034 Avatar asked Nov 25 '15 21:11

user5606034


1 Answers

In case someone else comes across this question with a different problem (that I just had), it's because I had stray comments left in my manifest which of course I pulled from the example one, which aren't allowed in JSON

like image 177
Andrew Flynn Avatar answered Oct 21 '22 11:10

Andrew Flynn