Im trying to add a new extension for google chrome.(im new to this).
I keep getting the error message "A Private key for specified extension already exists. Reuse that key or delete it first".
{
"manifest_version": 2,
"description": "test",
"name": "test",
"version": "2.1",
"content_scripts": [
{
"matches": ["*://www.google.com*"],
"js": ["script.js"]
}
]
}
Locate the folder that has the same ID and copy it to your Desktop. Now, go back to the Extensions menu and click the Pack extension button on the top-left corner of the menu. When the new window appears, select Browse, choose the folder that you've moved to the desktop and click OK. Select the Pack Extension button.
It means your manifest. json is missing the "key" entry or the hashsum in crx header doesn't match that key. – wOxxOm. Jul 8, 2019 at 7:49. I created the package with chrome pack extension itself.
Visit chrome://extensions (via omnibox or menu -> Tools -> Extensions). Enable Developer mode by ticking the checkbox in the upper-right corner. Click on the "Load unpacked extension..." button. Select the directory containing your unpacked extension.
I was dealing with that issue too. I changed the root folder name (that contained my manifest and js files) from "extension" to something else like "chromeext" and I was able to pack the extension successfully.
Bumping this thread with a (possible) fix for others : the extension folder name must not contain spaces. E.g. change My Extension Folder
to MyExtensionFolder
.
In the root folder where your extension is located, there is a .pem
file. Simply delete it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With