Reputation: 224
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"]
}
]
}
Upvotes: 11
Views: 16572
Reputation: 191
In the root folder where your extension is located (or its parent), there is a .pem
file. Simply delete it.
Upvotes: 14
Reputation: 163
When you try to Pack Extension it creates a private key with the extension of .pem. Follow this link:
https://stackoverflow.com/questions/50615890/what-is-the-chrome-extension-pem-file-for
This is because you executed extension, it is located in your parent folder. It will appear once you execute it. You need to delete it.
This can be a one unique key only. So when you execute it again, it will throw again as already a private key exists.
Upvotes: 1
Reputation: 223
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
.
Upvotes: 3
Reputation: 1686
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.
Upvotes: 4