21

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.

Don Rhummy
  • 24,730
  • 42
  • 175
  • 330

4 Answers4

13

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

Adam l
  • 131
  • 2
  • 4
  • Worth noting that Adam's P.S. can be important: I was trying to install Postman on an offline machine using their own FAQ as a guide but it would not work unless I renamed the `_metadata` folder to just `metadata`. – Steve Pettifer Apr 20 '16 at 08:45
12

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.

Rob W
  • 341,306
  • 83
  • 791
  • 678
  • And by "complain" by no means complain in the bug comments. This will lead to swift locking of comments as it is extremely annoying (everyone who starred it will get notified) – Xan May 28 '14 at 18:23
  • @Xan Yes, courtesy is still required, obviously. By complaining, I was referring to getting our voices heard, e.g. by adding some significant real-world use cases/scenarios to the [bug report](https://code.google.com/p/chromium/issues/detail?id=377278) or the mailing lists ([chromium-apps](https://groups.google.com/a/chromium.org/d/forum/chromium-apps) and [chromium-extensions](https://groups.google.com/a/chromium.org/d/forum/chromium-extensions)). – Rob W May 28 '14 at 19:15
  • @RobW Thanks. In my experience, this means it will never be fixed. Google probably wants to force people into updating to the latest Chrome versions, but to do this, they at least should have the web store notify them that the web store extensions require a newer version instead of a cryptic error message. – Don Rhummy May 28 '14 at 19:47
  • 1
    @DonRhummy Actually, that is a great suggestion! I suggest to put that one on the bug instead of your "Yeah me to"-comment. The bug has two aspects: compatibility and communication. Currently, extension developers are being blamed for the incompatibilit, while in reality it is a bug of the CWS. A clear message would let the user know that it's not the extension author's fault, and that their browser is too old. – Rob W May 28 '14 at 19:49
  • FYI, we will be disabling install from the webstore for older unsupported clients, and including a message stating this with a recommendation that users upgrade to a newer version of chrome. – Antony Sargent May 29 '14 at 20:34
  • @AntonySargent Thanks for the progress update. Let me know (via the bug report) when the fix has landed. – Rob W May 29 '14 at 20:35
5

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.

Xan
  • 74,770
  • 16
  • 179
  • 206
0

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.

George
  • 121
  • 7