60

I have just created a very simple chrome extension and it works fine. But when I converted to .crx file and try to open it with chrome, nothing happens. my chrome browser version is 19.0.1081.2 dev-m. My extension uses jquery-1.4.2.min. I could not understand whats the problem?

5
  • 2
    You packed the crx on chrome://extensions?
    – abraham
    Mar 29, 2012 at 19:33
  • yes, but not working with crx file. It works fine when unpacking. Mar 29, 2012 at 20:56
  • When you say open it with chrome, how do you open it? Its just that you use to be able to drag a crx onto Chrome to open it and that doesnt seem to work anymore, now I have to double click the extension in Explorer for it to install.
    – PAEz
    Mar 30, 2012 at 8:06
  • I have tried with both way, but got same result. Mar 30, 2012 at 9:19
  • 1
    This may be of interest: code.google.com/p/chromium/issues/detail?id=128748
    – artlung
    Jun 11, 2012 at 5:01

7 Answers 7

148

Update: appears to have stopped working since Chrome 80

Drag & Drop the '.crx' file on to the 'Extensions' page

  1. Settings - icon > Tools > Extensions
    ( the 'hamburger' icon in the top-right corner )

  2. Enable Developer Mode ( toggle button in top-right corner )

  3. Drag and drop the '.crx' extension file onto the Extensions page from step 1
    ( crx file should likely be in your Downloads directory )

  4. Install

Source: Chrome YouTube Downloader - install instructions

11
  • 3
    Thanks :) this works even with Chrome's new policy of not accepting extensions other than those from Chrome Web Store. ("Extensions, apps, and user scripts can only be added from the Chrome Web Store.")
    – Igor Popov
    Sep 8, 2012 at 9:54
  • 3
    Note that you have to first download the crx from within a window of chrome just before trying to drag & drop it as described. If you have a previous copy of the crx, downloaded who knows when & who knows how, you won't be able to simply drag & drop it. Mar 6, 2013 at 13:36
  • 1
    doh, obvious but who would have thought! +1
    – naumcho
    Mar 15, 2013 at 21:46
  • 6
    @user1269964, seems like they advertise it on their help page, but it also looks like they have closed the "loophole". My thoughts are that if you've deliberately dragged-dropped into the extensions pane you're probably trying to install it, knowing the consequences. (since most people may have found this out from Google's Help article, outlining the dangers: support.google.com/chrome_webstore/answer/… )
    – Swivel
    Jun 23, 2013 at 2:43
  • 2
    Doesn't seem to work anymore. Chrome blocks extensions installed this way.
    – laike9m
    Feb 9, 2020 at 23:53
18

In case Chrome tells you "This can only be added from the Chrome Web Store", you can try the following:

  • Go to the webstore and try to add the extension
  • It will fail and give you a download instead
  • Rename the downloaded file to .zip and unpack it to a directory (you might get a warning about a corrupt zip header, but most unpacker will continue anyway)
  • Go to Settings -> Tools -> Extensions
  • Enable developer mode
  • Click "Load unpacked extention"
  • Browse to the unpacked folder and install your extention
3
  • 5
    This is the only way it works on most recent chrome builds.
    – Irfan
    Jan 21, 2016 at 8:09
  • thanks, it works for me now, drag and drop don't works for chromium 65.0. but it need the unpacked folder always exists.
    – netawater
    Apr 6, 2018 at 6:06
  • Trying to unpack the .zip file, generates a .cpgz file instead, which cannot be loaded into Extensions page. Sep 13, 2018 at 4:13
12

I had a similar issue where I was not able to either install a CRX file into Chrome.

It turns out that since I had my Downloads folder set to a network mapped drive, it would not allow Chrome to install any extensions and would either do nothing (drag and drop on Chrome) or ask me to download the extension (if I clicked a link from the Web Store).

Setting the Downloads folder to a local disk directory instead of a network directory allowed extensions to be installed.

Running: 20.0.1132.57 m

1
  • I changed the downloads location from a network drive to my external drive and now add-ons install correctly! No more fake "This is not a CRX" error! Thank you. Jan 24, 2013 at 13:50
3

I arrived to this question looking for the same but for Chromium (actually I'm using https://ungoogled-software.github.io). So in case anyone else is looking for the same:

  1. Go to chrome://flags/
  2. Search for Handling of extension MIME type requests
  3. Select Always prompt for install
  4. Search for an extension and copy its URL (something like https://chrome.google.com/webstore/detail/...)
  5. Paste the URL in https://crxextractor.com/ and download the .CRX
  6. Voilà, Chromium will prompt for installation
1
  • 2
    This flag is specific to Ungoogled Chromium and doesn't exist in the stock Chromium or any other Chromium fork.
    – tomasz86
    Oct 29, 2021 at 2:15
2

Opening the debug console in Chrome, or even looking at the html source file (after it is loaded in the browser), make sure that all the paths there are valid (i.e. when you follow a link you get to it's content, and not an error). When something is not valid, fix the path (e.g. get rid of the server specific part and make sure you only refer to files that are part of your extension through paths like /js/jquery-123-min.js).

1

File format
This tool parses .CRX version 2 format documented by Google. In general, .CRX file format consist of few parts:

Magic header
Version of file format
Public Key information and a package signature Zipped contents of the extension source code Magic header is a signature of the file telling that this file is Chrome Extension. Using this header the operating system can determine the actual type of the file (MIME type is application/x-chrome-extension), and how should it be treaten (is it executable? is it a text file?). Then the window system can show beautiful icon to the user.

In .CRX files the magic header has a constant value Cr24 or 0x43723234.

The version is provided by vendor. The version bytes are 0x02000000.

The next part of the file contains the length of the public key information and the length of a digital signature.

All .CRX packages distributed via Chrome WebStore should have public key information and digital signature in order to make possible for browser to check that the package has been transmitted without modifications and that no additions or replacements were made.

After all of the header stuff, typically ending up on 307'th byte, comes the code of extension, stored as zip-archive. So the remainder of the .crx file is the well-known .zip archive.

.crx file opened in the hex editor called HexFiend (on Mac) The header part of a .crx file selected on the picture above. Obviously, you can extract the remaining .zip archive "by hand" using any simple hex editor. In this example, we use handy HexFiend editor on Mac.

The CRX Extractor loads a file provided, checks a magic header, version and trims the file, so only .zip archive remains. Then it returns obtained .zip archive to user.

ref:
https://crxextractor.com/about.html

https://github.com/vladignatyev/crx-extractor

0

As stated in Chrome documentation

Windows and Mac installs must come from Chrome Web Store

So installation of CRX files which aren't listed in Chrome web store is no longer supported, unless computer where Chrome is installed belongs to a domain using Microsoft Active Directory and automatically install Chrome apps and extensions through a Group Policy

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.