Can't install my custom chrome extension crx_magic_number_invalid
google-chrome, google-chrome-extension
Solution
The first thing I see is that your `background_page` isn't formatted properly. It should be
{ ...
"background": {
"page": "index.html"
},
...
}
If you `manifest.json` file isn't formatted correctly, Chrome will reject the extension.
You can read more about the manifest formatting in the Manifest File Format documentation from Google.
Update
Another SO post detailed how Chrome looks for a "magic number" at the top of a .crx file. But, if you're hosting locally, you can install extensions in a simpler manner.
- Save your `manifest.json` and `background.html` to a directory (the name doesn't matter)
- Go to `chrome:extensions`
- Make sure "Developer Mode" is checked at the top
- Click "Load unpacked extension..."
- Select the directory with your `background` and `manifest` files to install on Chrome.
Problem
I made a simple chrome extension: manifest.json: ``` { "name": "Layout VS Design", "version": "1", "description": "Enter the url of a image with your design at 100%", "background_page": "index.html", "browser_action": { "name": "Manipulate DOM", "icons": ["icon.png"], "default_icon": "icon.png" }, "content_scripts": [ { "js": [ "jquery.min.js", "js.js" ], "matches": [ "http://*/*", "https://*/*"] }] } ``` The thing is that chrome won't let me install it: The thing is I have no idea where to set this number, Any idea what can I try?