I am trying to find my Chrome extension's App ID so that I can get User Authentication. I have installed my extension and when I go to chrome://extensions/ I can see the ID:
However, in the Developer's Dashboard, the url is showing a different App ID:
I know that I somehow have to sync them so that they are the same. The Google tutorial for getting user authentication says that I should go to the user data directory to find my installed extension and copy the key from the manifest there to the manifest in my source directory. However, I can't find my extension in the user data directory under google-chrome/Default/Extensions.
your manifest will always be at: chrome-extension://myId/manifest.json
When you create an extension on the store, Google will pick a random id and assign it to your extension.
When you install an extension(from your computer to your computer) to chrome, your computer will assign it an id.
Only once in a billion lifetimes will those two be the same.
always use the id you see in the chrome://extensions page to find the manifest.
Related
I've written an extension for Google Chrome that will be released with the next version of our product. I want to understand what properties, paths for extraction, registry entries, etc. should I provide the installer of my product so that the end user doesn't have to install the extension on their own manually, and the installer does the complete job of installing the extension, and also notifies the user that the extension has been installed. As of now, the code that I have written is placed in a folder, and I use the "Load Unpackaged Extension" to load the extension. What should I do to achieve the aforementioned task?
Google's current policy on installing extensions via the registry (for Windows machines) is this:
Only extensions from the Google Extension Gallery (or Chrome Web Store - CWS) can be installed via the registry.
See this link - https://developer.chrome.com/extensions/external_extensions - for information on how this can be done. Keep in mind the following:
-This technique will still pop-up a msgbox to the user. its not completely silent.
-When using this technique, if the user subsequently removes the extension from her Chrome, the extension gets "blacklisted" on that chrome and will not re-auto-install until the user re-install it
manually. refer to Auto-installing a google chrome extension won't work ! for details.
Chrome has a couple ways of installing extensions programmatically:
http://www.chromium.org/administrators/pre-installed-extensions
Edit: yes, this policy has changed by now, as FuzzyAmi points out.
If you're using GNU/Linux, this is how you pre-install an extension from the chrome web store for all users:
/etc/chromium/policies/managed/yourextension_policy.json
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
{
"ExtensionInstallForcelist": [
"yourextensionuniqueidentifiersup;https://clients2.google.com/service/update2/crx",
"yourextensionuniqueidentifiersup"
]
}
Reference
metamask-chrome - AUR
I have my own extension which I want to install without user interaction. I packed it into a .crx file and entered these values in the registry:
HKEY_CURRENT_USER\SOFTWARE\Google\Chrome\Extensions\[ID]
"version"="1.0"
"path"="[crx Path]"
I tried both current user and local machine without success.
This was working before. My extension can be installed by using developer mode and dragging and dropping the crx file into chrome extensions. But I want to install without user interaction.
Is registry installation not allowed anymore?
even though you create a registry entry, Chrome will not use the local crx file for installation.
you need to supply: update_url with string value set to "https://clients2.google.com/service/update2/crx".
Upon chrome launch, Google will fetch the extension from web-store and show notification that'd let user install the extension.
Back in old days you'd side-load extensions. Those days are long gone.
Now you need to publish extension in webstore, and point update_url to store.
There are some exceptions (specifically for enterprise users with group policy settings) as mentioned in comments.
I have developed a Chrome extension and I have packed it.
I sent my extension to some people to try it, but Chrome started to block extensions that it does not find in the store.
Is there any way to install my extension without getting blocked by Chrome?
EDIT
Is there any way to install extension as developer mode? I read that only extensions that installed in developer mode will not blocked.
For regular Windows users who are not skilled with computers, it is practically not possible to install and use extensions from outside the Chrome Web Store.
Users of other operating systems (Linux, Mac, Chrome OS) can easily install unpacked extensions (in developer mode).
Windows users can also load an unpacked extension, but they will always see an information bubble with "Disable developer mode extensions" when they start Chrome or open a new incognito window, which is really annoying. The only way for Windows users to use unpacked extensions without such dialogs is to switch to Chrome on the developer channel, by installing https://www.google.com/chrome/browser/index.html?extra=devchannel#eula.
Extensions can be loaded in unpacked mode by following the following steps:
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.
If you have a crx file, then it needs to be extracted first. CRX files are zip files with a different header. Any capable zip program should be able to open it. If you don't have such a program, I recommend 7-zip.
These steps will work for almost every extension, except extensions that rely on their extension ID. If you use the previous method, you will get an extension with a random extension ID. If it is important to preserve the extension ID, then you need to know the public key of your CRX file and insert this in your manifest.json. I have previously given a detailed explanation on how to get and use this key at https://stackoverflow.com/a/21500707.
For Windows, you can also whitelist your extension through Windows policies. The full steps are details in this answer, but there are quicker steps:
Create the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallAllowlist.
For each extension you want to whitelist, add a string value whose name should be a sequence number (starting at 1) and value is the extension ID.
For instance, in order to whitelist 2 extensions with ID aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa and bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, create a string value with name 1 and value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, and a second value with name 2 and value bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb. This can be sum up by this registry file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallAllowlist]
"1"="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
"2"="bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
EDIT: actually, Chromium docs also indicate how to do it for other OS.
EDIT (06/05/2022): ExtensionInstallWhitelist is deprecated since Chrome 100, it has been renamed to ExtensionInstallAllowlist (answer updated)
I have an extension that I used to host on my server.
I have an update url pointing to my server where updates are automatically published to the users.
The newest chrome version does not allow installation of extensions over 3rd party urls, they need to be hosted in the webstore.
If I do that, do all users need to re-add the extension, or can they somehow migrate seemlessly to recieve future updates from the webstore?
Publish to the webstore, with the same id, by importing your existing key:
Put your private key as 'key.pem' in the root yof your extension directory and zip it along the extension. It will be removed upon upload.
Republish the old crx with update_url set to:
http://clients2.google.com/service/update2/crx
This way it will be seamless.
(Source:
https://groups.google.com/forum/?fromgroups#!topic/chromium-extensions/3vvygtEajMQ%5B1-25%5D
https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-apps/qZ5PXH2KzPs%5B1-25%5D )
You can still use 3rd party .crx extensions, themes, apps, etc.
But the file must be downloaded to a local folder and then dragged into the extensions manager (chrome://chrome/extensions/).
I have uploaded a chrome extension on webstore but lost the local from my desktop. Is there any way to download the extension back either from webstore or developer dashboard such that I get all my files?
Just install it and then go to your User Data directory.....
http://www.chromium.org/user-experience/user-data-directory
..then into the directory of the profile you installed it under, then the extensions directory and then the directory with the key of your extension, then the directory with the latest version and youll find all your files. You can find the key listed on the extension page in chrome in developer mode. Dont forget to edit the manifest, remove the update url and such.
Or if your on windows (I know it works in XP, never tested vista/7) you can use my convenience tool ExtensionOpener.....
http://forum.valorsolo.com/viewtopic.php?f=35&t=269&p=1163