ungoogled-chromium icon indicating copy to clipboard operation
ungoogled-chromium copied to clipboard

Update extensions via manifest update URL

Open xaye opened this issue 7 years ago • 10 comments

I installed 55.0.2883.87-1 on my 64 bit Windows 10.

When I installed extension NOT from the store in the Chrome extension section I see like the extension is from the store.

If I installed extension, which IS from the store I see Not from Chrome Web Store for this extension.

Could somebody explain, why is like that?

xaye avatar Nov 20 '17 11:11 xaye

How are you installing them?

Eloston avatar Nov 22 '17 11:11 Eloston

I can also confirm the following: If I have downloaded crx file directly from the store and drag and drop in the extensions or I go in chrome store and installed from there, then the extension is "not from the store" in the chromium extensions section.

ribatamu avatar Nov 22 '17 12:11 ribatamu

Hm, I can confirm the behavior. Can these extensions still be updated via the Update extensions now from Developer mode?

Eloston avatar Jan 13 '18 06:01 Eloston

No, they are not updated via the Update extensions now from Developer mode

perfect7gentleman avatar Sep 24 '18 00:09 perfect7gentleman

Hm, that's interesting. It would be nice if we could use the update URL defined in the manifest file to check for extension updates.

Eloston avatar Sep 24 '18 20:09 Eloston

I know this will not solve this problem for everyone, but I've written an external solution for Linux. It's written in Python 3, installing is trivial on all distributions. You also need pip for Python 3. Then, to install the needed libraries, run sudo python3 -m pip install requests bs4

My script can be found here. It needs to be run with sudo. As a parameter, it takes a text file containing one ID or URL per line. The final command should look like this sudo ./installextensions.py extensions.txt On running, all uninstalled extensions get installed, and all installed extensions on an older version than in the store get updated. So running this regularly should solve this issue (one may use a cronjob, just make sure to run it as root)

WisdomCode avatar May 28 '19 18:05 WisdomCode

@WisdomCode Thanks, but let's keep this on-topic. There are other threads for posting custom solutions.

Eloston avatar Jun 04 '19 05:06 Eloston

I made an extension that checks for updates using this method. I wish I could attempt to solve this issue but I don't currently have the time to learn the codebase and skills needed to create a patch. However, I can provide an outline of the update process which I believe will be helpful to anyone who attempts to implement this in the future:

In each extension's manifest.json, updateUrl defines the url used to check for updates.
If updateUrl is https://clients2.google.com/service/update2/crx this extension is from the chrome web store. (In Ungoogled Chromium these can appear as Not from Chrome Web Store despite having this value set for updateUrl in manifest.json)
For these extensions, you can check for updates all at once using the chrome api. Begin with this url:
https://clients2.google.com/service/update2/crx?response=updatecheck&acceptformat=crx2,crx3&prodversion=CHROMIUM_VERSION
Then append this fragment once for each extension you wish to check: &x=id%3DEXTENSION_ID%26uc For example: https://clients2.google.com/service/update2/crx?response=updatecheck&acceptformat=crx2,crx3&prodversion=76.0.3809.100&x=id%3Dogfcmafjalglgifnmanfmnieipoejdcf%26uc&x=id%3Dgcbommkclmclpchllfjekcdonpmejbdp%26uc If updateUrl is not https://clients2.google.com/service/update2/crx:
This is a non-webstore extension, the updateUrl should link directly to the XML file for the particular extension. Obviously, non-webstore extensions must be checked individually.
Web store or not, the XML file should obey this format: https://developer.chrome.com/apps/autoupdate#update_manifest
The relevant elements/attributes are:

  • Exactly one <gupdate> element with children <app> element(s).
  • Each <app> has an appid attribute that can be used to match it with the correct extension
  • Each <app> has a child <updatecheck> with a version attribute which can be used to determine if an update is required. <updatecheck> also has a codebase attribute which should contain a direct link to the .crx file

Also, I feel the need to state the obvious: updating web store extensions via this method means contacting google. Not only that, checking for updates provides a large amount of telemetry and potentially personally identifiable information. This includes: request headers, chromium version, and a list of all currently installed extensions. For users with a lot of extensions installed, this may be enough to uniquely identify your browser. Because of this I believe auto updating should be opt-in only. As an addendum to that, it appears to me that 99% of extensions out there do not use a custom updateUrl (I was unable to find even one that does). Thus, a truly ungoogled way of auto-updating extensions is not practical without a third-party mirror of the web store to handle the vast majority of extensions.

NeverDecaf avatar Sep 01 '19 02:09 NeverDecaf

@NeverDecaf A few months late to the party, but your extension is pretty cool! I've taken a look through your repo and gave your extension a try, and so far I like what I see. I'll add this to the Wiki to increase exposure a bit more.

Eloston avatar Dec 25 '19 02:12 Eloston

Also, I feel the need to state the obvious: updating web store extensions via this method means contacting google. Not only that, checking for updates provides a large amount of telemetry and potentially personally identifiable information. This includes: request headers, chromium version, and a list of all currently installed extensions. For users with a lot of extensions installed, this may be enough to uniquely identify your browser. Because of this I believe auto updating should be opt-in only. As an addendum to that, it appears to me that 99% of extensions out there do not use a custom updateUrl (I was unable to find even one that does). Thus, a truly ungoogled way of auto-updating extensions is not practical without a third-party mirror of the web store to handle the vast majority of extensions.

Since this extension is crucial for regular UG usage, I wonder if there's a way to randomize that telemetry data it is sharing...

dm17 avatar Aug 03 '23 01:08 dm17