Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Guidance on updating a self-hosted extension

177 views
Skip to first unread message

Mitchell

unread,
Jan 15, 2025, 5:06:44 PMJan 15
to Chromium Extensions
I am trying to distribute and install an extension (crx file) to clients. We are using the force install gpo as part of this setup where we specify the file location of the update.xml. We've noticed that when updating an extension on a client's machine, that chrome doesn't update the extension even though we've updated the update file with a new version and/or path to the crx file.

I am looking for a way to reliably update the extension. Has anyone experienced this and found a solution?

Currently, we noticed that we can force chrome to re-pull the extension if we delete our the extension id's node in the Preferences file. But I'm not sure that this is the recommended route. 

All advice appreciated. Thank you. 

Don Schmitt

unread,
Jan 15, 2025, 5:15:00 PMJan 15
to Mitchell, Chromium Extensions
What you may be missing is that the update path is hardcoded into the
extension manifest.

A common mistake is to change the path you are using in the
ExtensionInstallForcelist policy, but you have to realise that any CRX
that was already installed with that extension ID is going to look at
the previous path (the one in the manifest). In my opinion, this is a
bad design, but this is the way it's been for...oh...a decade.

By deleting the extension you force Chrome to re-read the policy and
use the new path.

Another trick for this is to create a new extension ID for your
extension, that way you can use the new ID and any path you want,
regardless of what has been installed, because Chrome will remove the
old extension and install the new one with the new ID and path.
> --
> You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
> To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/97d7035b-913b-49d9-a67a-6a114b945666n%40chromium.org.

Mitchell

unread,
Jan 15, 2025, 5:50:35 PMJan 15
to Chromium Extensions, Don Schmitt, Chromium Extensions, Mitchell
Thanks for taking the time to reply.

So, right now, we query the extension force install key and edit the update.xml file with the new version. We're definitely steering away from trying to edit any registry keys that are GPO controlled. Once the key is setup, we don't touch it again.

Our update cadence is often around every 3-4 weeks which makes updating the extension id kind of an ugly solution for us. But it's definitely something worth looking into on my end. I fear we'd have to keep a database of extension id's so our installers would know what ids to look for when uninstalling.

One other idea that we had, was to perform a series of steps on update:
1. Uninstall (remove the update.xml file)
2. Open the browser (chrome removes the extension)
3. Close browser
3. Install (re-add the update.xml file)
4. Open browser (chrome re-adds the extension)

But as you can imagine... I think this is a pretty clunky install process and we'd have to do this for every chrome profile.

We're really just finding it very difficult to update the extension without opening the browser and was wondering if there was a more "natural" way of forcing chrome to re-check the update.xml file on the machine and update the extension. The enterprise guide only has recommendations for self-hosted extensions that are hosted on a web server. And Chrome seems to have a mechanism to periodically check the server for updated versions...but that doesn't seem to be the case for a self-hosted with a local update.xml file...

Don Schmitt

unread,
Jan 15, 2025, 8:00:37 PMJan 15
to Mitchell, Chromium Extensions
Well, as long as you have the correct update.xml path in the currently
installed extension and you aren't changing it then this should be no
problem. I believe Chrome checks for extension updates every 5
hours(?), this has been fine for loads of our customers. How quickly
are you expecting it to update?

Mitchell

unread,
Jan 16, 2025, 2:59:21 PMJan 16
to Chromium Extensions, Don Schmitt, Chromium Extensions, Mitchell
It never updates when it's a local update.xml file defined in the registry. I'm a little stumped.

Mitchell

unread,
Jan 16, 2025, 3:07:36 PMJan 16
to Chromium Extensions, Mitchell, Don Schmitt, Chromium Extensions, olive...@google.com
+Oliver

Would you know this bit about the chrome updating force list extensions for local files?

For example I might have this entry defined for force list like below:

...\Software\Policies\Google\Chrome\ExtensionInstallForcelist\
1 = iodegoertdeabbyuiopfdifcghijihb;file:///C:/Program Files (x86)/BrowserExtensions/Chrome/update.xml

Is it valid to expect Chrome to update the extension (at some point) when the update.xml is updated?

Don Schmitt

unread,
Jan 16, 2025, 3:32:58 PMJan 16
to Don Schmitt, Mitchell, Chromium Extensions
Yes, it works for local files, we've done it for many customers.

But I feel I have to reiterate this because you don't seem to have acknowledged checking, so I'm not sure you're getting it:  Chrome uses the update_url of the extension's manifest to determine where to look for updates to the update.xml file, regardless of what is in your group policy.  The group policy value is only used to install the extension.



On Thu, Jan 16, 2025 at 12:24 PM Don Schmitt <do...@blackfishsoftware.com> wrote:
Perhaps you have Chrome auto-updates turned off  (via the "Auto-update check period override" policy), because as long as chrome updates are enabled and the update_url is correct in the currently installed version of the extension, then Chrome should be periodically reading the update.xml file that is specified by the update_url.


Mitchell

unread,
Jan 17, 2025, 1:19:47 PMJan 17
to Chromium Extensions, Don Schmitt, Mitchell, Chromium Extensions, Don Schmitt
Ahh, you're spot on. We don't have update_url defined in the manifest. We had the misunderstanding that the extension would update purely based on the registry key value. And after your suggestion, I see the docs explaining your point: https://developer.chrome.com/docs/apps/autoupdate/#update_url

This was really helpful. Thank you for pointing that out. I'll give it a try now and update on what I find.

Reply all
Reply to author
Forward
0 new messages