4

I have a strange error, I recently published a chrome extension to chrome web store which is published to testers only and anyone who tries to install it is getting the following error

There was a problem with the download. Please contact the developer or try again later.

Invalid manifest

enter image description here

Where my Manifest seems fine, I can test the extension in Developers Mode -

My manifest looks like the following

{
  "manifest_version": 2,
  "name": "my chrome chrome",
  "description": "the Chrome Extension",
  "version": "0.1",
  "permissions": [
    "tabs",
    "activeTab",
    "http://*/*",
    "https://*/*",
    "storage",
    "webNavigation",
    "cookies"
  ],
  "icons": [
    {
      "128": "app/images/icon-128.png",
      "16": "app/images/icon-16.png",
      "48": "app/images/icon-48.png"
    }
  ],
  "background": {
    "scripts": [ "app/js/api.js", "app/js/auth.js", "app/js/shared.js", "app/js/common.js", "background.js" ],
    "persistent": false
  },
  "content_scripts": [
    {
      "run_at": "document_end",
      "matches": [
        "https://*/*",
        "http://*/*"
      ],
      "js": [ "Scripts/jquery-1.10.2.min.js", "content-script.js" ]
    }
  ],
  "browser_action": {
    "default_icon": {
      "19": "app/images/browser-action-icon-19.png",
      "38": "app/images/browser-action-icon-38.png"
    }    
  },
  "content_security_policy": "script-src 'self' https://ssl.google-analytics.com; object-src 'self'",
  "web_accessible_resources": [
    "app/images/icon-128.png",
    "popup.html",
    "popup.js"
  ]
}

what am I doing wrong?

FYI, my browser is up to date

Ali
  • 2,702
  • 3
  • 32
  • 54
  • Make sure `Scripts` folder starts with a capital letter. Your testers are Linux-based, it seems, while you develop in Windows, which has case-insensitive filesystem path resolution. – wOxxOm Feb 06 '18 at 12:52
  • 1
    There should be no brackets `[ ]` around `icons`, verify your manifest file. – holmberd Feb 06 '18 at 15:10
  • @wOxxOm Yes it is capital – Ali Feb 07 '18 at 01:22
  • @holmberd I added ` [ ] ` because without these I was getting error when uploading the extension (in my developer's panel) that the ICONS should be in an `array` and it was not letting me even upload the extension so I added `[]` to make it `array` - is that incorrect? – Ali Feb 07 '18 at 01:24
  • @holmberdI changed the manifest and removed `[]` and it seems to be uploading without any error now (not sure what happened previously) - I will check once it has finished publishing – Ali Feb 07 '18 at 01:33
  • @holmberd it worked thanks – Ali Feb 07 '18 at 11:11
  • Is there a manifiest checker that we can use, before publishing? – Nikos Jan 14 '19 at 22:30

1 Answers1

2

This is caused by manifest.json format mismatch

Chrome says: Invalid value for 'icons'

In manifest.json just replace:

"icons": [
    {
      "128": "app/images/icon-128.png",
      "16": "app/images/icon-16.png",
      "48": "app/images/icon-48.png"
    }
  ],

to:

"icons":
    {
      "128": "app/images/icon-128.png",
      "16": "app/images/icon-16.png",
      "48": "app/images/icon-48.png"
    },
Drapaster
  • 99
  • 4