1

I have finished developing an extension for chrome, but when I tried to upload it on chrome web store, I run into a wierd issue.

So, my extension work perfectly on my machine, developer mode, no error, nothing.

But when i am trying to upload it, i get this error :

Error chrome web store

Yet, I've search in my manifest and no, the is no missing }.

When I add one, it just stop working on my machine.

Here the manifest (changed some info for confidentiality):

{
  "name": "Name",
  "description": "Description",
  "version": "0.1",
  "options_page": "options/options.html",
  "content_scripts": [
    {
      "matches": ["http://*.facebook.com/*", "https://*.facebook.com/*",
        "http://*.twitter.com/*", "https://*.twitter.com/*"],
      "js": ["jquery.js", "script.js"]
    }
  ],
  "permissions": [
    "webRequest",
    "storage",
    "tabs",
    "http://*.facebook.com/*", "https://*.facebook.com/*",
    "http://*.twitter.com/*", "https://*.twitter.com/*"
  ],
  "browser_action": {
    "default_icon": {                    // optional
      "19": "eye_inv.png",           // optional
      "38": "eye_inv.png"            // optional
    },
    "default_title": "Name",      // optional; shown in tooltip
    "default_popup": "popup/popup.html"        // optional
  },
  "background": {
    "scripts": ["eventPage.js"],
    "persistent": true
  },
  "manifest_version": 2
}

Thank for any help.

Karl-André Gagnon
  • 33,662
  • 5
  • 50
  • 75

1 Answers1

3

Can comments be used in JSON?

You can't include comments in JSON.

Raw JSON must be strictly data and contain no // comments.

I pasted your code into a JSONLint validator, and as expected, it throws a hissy fit.

Parse error on line 30:
...con": {            //optional"19": "eye
----------------------^
Expecting 'STRING', '}'
Community
  • 1
  • 1
Brad M
  • 7,857
  • 1
  • 23
  • 40