Manifest Issue in Chrome Store - json

I've been working on a chrome extension for several weeks now and just recently uploaded my extension to the chrome web store.
When I try to install it from the store, it gives me an error saying "Invalid Manifest" and nothing more.
Is there a way to figure out what is wrong with my manifest file that the chrome store doesn't like? My browser installs the extension fine (and it works) when I load it in via developer mode.
Since I can't copy it to the code tag and it preview well, I've linked the Manifest file below: Manifest file on Github
I've read the manifest v2 documentation and have looked on several google groups for assistance. Any help is greatly appreciated, thanks!

Turns out "Tabs" can not go under permissions, it MUST be an optional permission. AND you must encode the manifest file as UTF-8 rather than ANSI.

Related

Chrome Extension No manifest found in package

Currently trying to add a new extension via the Chrome developer dashboard but getting the below error when I try to upload the zipped folder.
No manifest found in package. Please make sure to put manifest.json at
the root directory of the zip package.
This is what's inside the zipped folder, which as you can see, has the manifest in it's root.
The manifest is v3 and everything works fine unpacked in the extensions developer mode when I'm testing it.
Any ideas what I'm missing here?
It turns out it was as simple as the name of the manifest being Manifest and not manifest... the capitalised M made all the difference...
there's a day of my life I'm not getting back.

How to test local changes to Chrome Extension

I am trying to fix a bug in a Chrome extension. I installed the extension from the web store. I found the error. I opened the installed files and made changes that may or may not fix the problem locally. I saved the changes. Now Chrome complains and says "This extension may have been corrupted."
I have no idea if the change will work. I do not want to go through the build process and upload the modified extension to the web store just to test a three line change.
How do I get Chrome to just use the modified extension? Or can I just ignore the "This extension may have been corrupted" error?
I think I figured it out. I was seeing the "This extension may have been corrupted" error because I made the changes in place, meaning directly in "${LOCALAPPDATA}\Google\Chrome\User Data\Default\Extensions${extension_dir}". When I instead made the changes to my Perforce workspace directory and used the "Load Unpacked" feature to install the extension from there it worked.

Extension installed from Chrome Webstore throws error "Package is invalid. Details: 'Cannot load extension with file or directory name _metadata...'

When a CRX is added to the Chrome web store, Google adds a directory _metadata to the crx. Older versions of Chrome do not know about this directory (tested on Chrome 27) and throw this error:
Package is invalid. Details: 'Cannot load extension with file or directory name
_metadata. Filenames starting with "_" are reserved for use by the system.'.
You can see this error if you try to install this extension on an older version of Chrome: https://chrome.google.com/webstore/detail/allcast-receiver/hjbljnpdahefgnopeohlaeohgkiidnoe
A good explanation: https://groups.google.com/a/chromium.org/d/msg/chromium-apps/huDqSeaQx3Q/Z5GOMxA7lQIJ
Is there a workaround for this? This makes it impossible to support older versions of Chrome.
You can try to unzip the CRX (change the suffix name to ".zip" if needed) and then in chrome: Settings -> Extensions check "Developer mode", choose "load unpacked extension.." and select the extracted folder.
P.S.
I had to rename the folders starting with "_" (underscore) and remove the line
"default_locale":"en",
from the manifest JSON in order for that to work
You -as an extension developer- cannot work-around this bug, because the directory is added by the Chrome Web Store (CWS). You could work-around the bug by not using the CWS to distribute the extension, but then the extension cannot be used by the majority of Chrome users, because Google has actively tried to stop users from getting extensions from outside the CWS.
The CWS team are the only ones who can fix the bug. They should serve crx files without a _metadata directory if the user agent does not support the directory (Chrome 30-). This bug is being tracked on https://code.google.com/p/chromium/issues/detail?id=377278. So far, the response is:
We can't fix old versions of Chrome. Webstore side tracked at b/15176392, but extending support back to Chrome 30 is unlikely.
Star the issue to get notified of updates and to signal that you really want the bug to be fixed. If enough users/developers complain, then Google might fix the bug.
This answer applies to CRX files that you:
Downloaded from Chrome Web Store
Are trying to load unpacked
_locales folder should not pose problems. As long as the manifest contains default_locale key, Chrome will load the unpacked extension as expected.
_metadata is the problematic folder. It contains cryptographic hashes of all extension files to protect against tampering with those files, and is automatically added by CWS. This does not make sense in the context of an unpacked extension, and has no other use, so this folder simply needs to be deleted.
Some people found resetting works. Some found emptying the recycle bin works. None worked for me. I re-installed chrome also didn't work.
Instead this worked for me (same as what Xan said): I download the .crx file, unzip it, erase the folder
_metadata
Then install it manually. This worked for me.

Mac Chrome "Package Invalid Details: Could not load extension icon"

I'm running into an issue with my Chrome extension on OSX computers only. It used to work fine, but with my latest release, I have a lot of files that I organized into folders (css, js, and img). The extension installs just fine on Windows computers (which is the OS I created the extension on, Windows 7) but when I attempt to install on a Mac I get the message outlined below:
"Package is invalid. Details: 'Could not load extension icon 'img\icon_16.png'.'.
I know the image is there, but my guess is that because I did this on Windows, OSX doesn't like the pathing options. Any ideas how I can rectify this and still keep the folder organization?
Late, I'm aware, but the solution to this was the slash in img\, reversed it and it worked fine.
In my case the problem was that Google Play allows zip with .crx file.
So on first attempt it said me to zip my crx (after crx upload try), then it said that it needs manifest file inside the zip file.
After that everything was fine except of extension installation - it threw out error like "Could not load extension icon".
So the solution is to compress src directory (in which manifest file lays) without packing extension into crx.

Deploying chrome extensions that are not in chrome webstore

I found that the chrome webbrowser recently disabled the ability to deploy extensions that are not from the chrome webstore. I tried opening my extension.crx directly intro chrome and it wont work anymore, it just download the file.
I know I could use the "load unpacked extension", but I need to do it in about 50 computers, so it's not a very practical way.
Does anyone knows any other ways to deploy an extension that is not in the webstore?
Maybe "loading an unpacked extension" programmatically from an .exe or something like that.
Have you tried dragging it over to Chrome, either from the download bar or the file browser on your operating system? I seem to remember this has been an issue earlier...
There is more information about how to complete this on the Chrome Dev site:
https://developer.chrome.com/extensions/crx
It looks as if you need to create a zip file, then add additional headers to the beginning of that file, then change the file extension from ".zip" to ".crx"
If serving this file from a web-server, you should use the header "application/x-chrome-extension" to make the Chrome browser understand this is an installable theme/app/extension.