allo- / ffprofile

A tool to create firefox profiles with personalized defaults.
GNU Affero General Public License v3.0
771 stars 56 forks source link

Addons in Enterprise Policy are referred to by bad ID #294

Closed mpeter50 closed 3 weeks ago

mpeter50 commented 1 month ago

When you request certain addons to be preinstalled, some of them will be present with the wrong key in the policies.ExtensionSettings object of the policies.json file. When the browser with a new profile is started, those addons will not get to be installed, and an error will be logged about them that is visible in the Browser Console:

image

The reason for that is that some addons are inserted with a key that looks like it could be the real one, but it isnt, because the addon does not have a readable addon ID. 2 such addons I have found are

mpeter50 commented 1 month ago

By the way, where did you find those readable names? And are they supposed to work?

When I download the XPI files, they have the worse version of the names as ID in the manifest file, but it would be much more readable if I could use the readable names in this config file.

allo- commented 1 month ago

It looks like they have changed the IDs, I wonder how they could do that without breaking things. You can get the IDs from manifest.json in the XPI files (which are just zips).

  "applications": {
    "gecko": {
      "id": "@testpilot-containers",
      "strict_min_version": "67.0"
    }
  },

I was thinking of adding a script for downloading the latest versions of the addons using the /latest.xpi URLs for the zip download, but one still needs the correct IDs to install the addons.

allo- commented 1 month ago

So the containers have @testpilot-containers in browser_specific_settings.gecko.id (I do not know where the other ID was from), but Temporary Containers uses applications.gecko.id. Both have manifest_version: 2 so I do not know why they have different fields for the id.

allo- commented 1 month ago

Does this look correct to you? https://github.com/allo-/ffprofile/compare/master...fix-addon-ids

mpeter50 commented 1 month ago

Yes, it looks good. The addon IDs are also correct. Maybe delete latest.xpi at the end of each for cycle in get_addons.sh. Probably not needed, but could help in avoiding obscure problems.

At the same time, I am surprised that no one has reported this yet. It must have worked in the past..

allo- commented 3 weeks ago

implemented