Google Chrome Extension
I have two files. manifest.json and conten开发者_运维问答t.js. I have compressed the both files in Zip format and conver into CRX format.
Then just drag and drop the .crx file in Google chrome browser and continue to install the crx file. But it shows a alert message as "CRX_MAGIC_NUMBER_INVALID".
How to i resolve this issue?
You need to be signed into your Google account in order to download extensions from the Web Store now. It's stupid, but this is the best way. Source.
My friend had the same problem with installing a homebrew extension too. This should be the solution to your issue.
Well there is a pack extension option in Chrome. Go to manage extension and there you will see that option. They will make the .crx
file for you.
Else you can do that using a batch file
cd /d C:\Documents and Settings\[username]\Local Settings\Application Data\Google\Chrome\Application
chrome --pack-extension="[path of extensionfolder]" --no-message-box
It's a problem with the format of your CRX file. The code
http://src.chromium.org/svn/trunk/src/chrome/browser/extensions/sandboxed_extension_unpacker.cc
looks for a "magic number" at the start of the file, as detailed here
http://code.google.com/chrome/extensions/crx.html
It appears that it isn't (always) possible to zip your extension and rename it to crx. Perhaps something to do with the zip tool used? Anyway this thread discusses a very similar problem and solutions.
http://groups.google.com/a/chromium.org/group/chromium-apps/browse_thread/thread/1785b46c2998af2c
精彩评论