user5606034
user5606034

Reputation: 123

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"
  }
}

Upvotes: 12

Views: 2003

Answers (2)

Luis Felipe de Melo
Luis Felipe de Melo

Reputation: 369

You cant have any comments in manifest.json file when publising.

Upvotes: 0

Andrew Flynn
Andrew Flynn

Reputation: 1516

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

Upvotes: 16

Related Questions