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.
Related
I'm building an internal extension for my company. Since it's an internal tool, I don't want to publish it on the Chrome Web Store.
To be able to self-host the browser extension, I'm doing the following steps:
(before): I created a .pem to sign the extension (+ keep a constant extension id across updates)
I'm building the source code
I'm packing and signing the extension with chrome using chromium --pack-extension=./build_dir/ --pack-extension-key=./key.pem
I'm updating the update.xml file to reflect the new version number
I uploaded the signed .crx and update.xml
I have a website with a link pointing to the .crx file. The issue is the following: when clicking on it, the file is downloaded and chrome understands it's a browser extension. Then: I'm getting "Package is invalid crx_required_proof_missing".
What am I missing?
What can I do to be able to install a self-hosted extension after downloading the extension?
Notes:
I am aware that I can extract the .crx content and load the extension as "unpacked", but that's not what I'm looking for: deployment will be more complex (more manual steps) and updates will not be automatic.
The .crx file seems to be served with the right headers and is publically accessible. The update file is also correct and accessible.
Info:
Yes, the manifest contains properties key and update_url.
When dragging/dropping the .crx file in chrome://extensions (in dev mode): the extension is installed but I'm getting a red warning on the extension card: "This extension is not listed in the Chrome Web Store and may have been added without your knowledge"
When dragging/dropping the .crx file in chrome://extensions (without dev mode):
The extension is not installed and I'm getting: "Package is invalid crx_required_proof_missing".
When dragging/dropping the .crx file in chrome://extensions (with CHROMIUM and dev mode):
The extension is properly installed and working.
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.
I had gone through the below post on StackOverflow and I know where the chrome extensions are saved in the directory path, in MAC
Where to find extensions installed folder for Google Chrome on Mac?
But my question was, the directory path usually ends into the directory (which has several files and subdirectories)
Which file under this gives me the actual name of the Extension and its version?
For example say jifpbeccnghkjeaalbbjmodiffmgedin is the extension id folder under /Users/$USER/Library/Application\ Support/Google/Chrome/Default/Extensions/. Which exact file should I look inside here to know the name and version of the extension ?
I need this to write a script , so please don't give GUI based solution. I need it on CLI
You are looking for manifest.json in that file you will find all information about chrome extension
/Users/$USER/Library/Application\ Support/Google/Chrome/Default/Extensions/hash_of_your_selected_extenstion/manifest.json
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.
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.