yeoman/generator-chrome-extension

Remove key element from manifest when compressing

Closed this issue · 6 comments

The chrome.identity(https://developer.chrome.com/apps/identity) API needs the key element to exist in the manifest during debugging as well as in release. Since the key is automatically added by the WebStore, it won't accept any package that have it already set.

My proposal is to edit the Gruntfile so that it takes care of deleting the key element from the manifest right before compressing, without touching the original manifest.json used while debugging.

Why do you wanna use a different keys? In my case, I get the key from WebStore and then do work. And I don't understand what is the original manifest.json. manifest.json is only one in the Apps. And this issue would be right to https://github.com/ragingwind/grunt-chrome-manifest

I don't want to use different keys.
I need to explicitly set a key inside my manifest.json in order to have chrome.identity work with OAuth2.
When packaging the app, the key element is still in the manifest.json; if you try and upload that zip to the Chrome Web Store, it will be rejected, since the key already exists in the manifest. After removing the key the extension gets uploaded correctly.

This proposal is would be better to https://github.com/ragingwind/grunt-chrome-manifest . I will make a more generic options (not only key) to remove fields in manifest.json. this Issue will be moved to grunt-chrome-manifest

@ragingwind You must not close this issue, this is a very legit issue, I am also facing the same. and the manifest.json guidelines itself says that "key" is valid property there, but as @frapontillo saying when I upload my zip folder it is yelling at me.

I agree, I'm in the same boat and this thread seems like it might help solve it

@ragingwind You must not close this issue, this is a very legit issue, I am also facing the same. and the manifest.json guidelines itself says that "key" is valid property there, but as @frapontillo saying when I upload my zip folder it is yelling at me.

Have you found a solution?