Which file under Chrome's Extension directory gives details about the name and version of the Extension - google-chrome

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

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.

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.

How to locate Google Chrome extension dir

Hi i'm installing extensions by programmatically by a little c# program.
I just did see the software doesn't work on my friend.
i did see his chrome directory is not at %appdata% folder its at program files?
so how to find the real latest version of chrome directory for install plugins?
Google says
Windows:
chrome_root\Application\chrome_version\Extensions\
Example: c:\Users\Me\AppData\Local\Google\Chrome\Application\6.0.422.0\Extensions\
but how to find the chrome_root?
Visit chrome://version.
Look at Profile Path.
Extensions can be found in the Extensions subdirectory of the path you found at the previous step.
You can also load the extension using the --load-extension flag:
chrome.exe --load-extension=path/to/extension
The recommended mechanism for installing extensions programmatically is external extensions. It has the advantage of not depending on Chrome paths that might change, instead you can use a stable registry key or JSON file.

Where does google chrome store unpacked extensions?

I just lost all my changes to my google chrome plugin. However, the plugin is still running within the browser.
Where does Google Chrome store its cached copy of unpacked extensions?
I was able to find luck in:
Non-windows 7:
C:\Documents and Settings\<username>\Local Settings\Application Data\Google\Chrome\User Data\<profile>\Extensions
-or-
Windows 7:
C:\Users\<username>\AppData\Local\Google\Chrome\User Data\<profile>\Extensions
EDIT: You can go to "chrome://version/" (like a url) and it shows your "Profile Path". There you can find an "Extensions" folder which is the one you're looking for.
Turns out that unpacked extensions are left in their original locations. Only packed extension get extracted to the places Alex.Piechowski mentioned.
On Linux (OpenSuse 12.3), I managed to find all my installed extensions here:
~/.config/google-chrome/Default/Extensions/
It's important to first take note of the extension ID in case u wish to just copy a particular extension. For this, open chrome://extensions/ in your browser, copy the id of the extension of interest, and find it's directory under the extensions directory given above.
Being able to locally save copies of extensions like this has helped me to continue using (and even modifying / hacking) on extension that were eventually removed from the Chrome Store by either their owners or Google.
So I was debugging an extension I am building on Mac OS X and couldn't find the SQLite database in any of the standard locations. It doesn't store the DB in the path where the extension files live.
Here's where I found my database when running an unpacked extension:
~/Library/Application Support/Google/Chrome/Default/databases/http_foobar.com_0/XX
-Eric
User profiles are stored in User Data Directory and it vary depending on the operating system.
The easiest way is to navigate to chrome://version and look for the Profile Path field.
Example (Windows):
[Profile Path] C:\Users\Alice\AppData\Local\Google\Chrome\User Data\Default
[User Data Dir] C:\Users\Alice\AppData\Local\Google\Chrome\User Data
Then Extensions are located under Extensions/ folder.
In windows:
Path: C:\Users\yourusername\AppData\Local\Google\Chrome\User Data\Profile 1\Extensions
(Here, you will not able to see extensions by name but it will be by extensions by Id. Extension Id you can get it from chrome→extension→Developer modes)
Or
Path: C:\Documents and Settings\yourusername\Local Settings\Application Data\Google\Chrome\User Data\Default\Extensions
Or
Download Extension Source Locator. Give your username. It will list out all the extension with path details.