Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtensionSettings - order of force_installed extensions #705

Closed
eMPai-git opened this issue Oct 26, 2020 · 13 comments
Closed

ExtensionSettings - order of force_installed extensions #705

eMPai-git opened this issue Oct 26, 2020 · 13 comments

Comments

@eMPai-git
Copy link

Problem

I had an unexpected behavior with force_installed extensions. It should have installed several extensions but only the first two entries were actually installed. This did work in ESR 68 with the Extensions policy. In ESR 78 with ExtensionSettings the behavior appeared the first time for me.
The policies.json looked like this:

    "ExtensionSettings": {
      "*": {
        "installation_mode": "blocked"
      },
      "jid1-BoFifL9Vbdl2zQ@jetpack": {
        "install_url": "https://addons.mozilla.org/firefox/downloads/latest/decentraleyes/latest.xpi",
        "installation_mode": "force_installed"
      },
      "[email protected]": {
        "install_url": "https://releases.mozilla.org/pub/firefox/releases/78.3.1esr/linux-x86_64/xpi/de.xpi",
        "installation_mode": "force_installed"
      },
      "[email protected]": {
        "install_url": "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi",
        "installation_mode": "force_installed"
      },
      "{33c93ccc-ceed-47d2-9645-805ea58c8a07}": {
        "install_url": "https://addons.mozilla.org/firefox/downloads/latest/first-party-isolation/latest.xpi",
        "installation_mode": "force_installed"
      }
    },

I changed the order and put the languages pack to last place in the list. Now all extensions get installed as expected.

    "ExtensionSettings": {
      "*": {
        "installation_mode": "blocked"
      },
      "jid1-BoFifL9Vbdl2zQ@jetpack": {
        "install_url": "https://addons.mozilla.org/firefox/downloads/latest/decentraleyes/latest.xpi",
        "installation_mode": "force_installed"
      },
      "[email protected]": {
        "install_url": "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi",
        "installation_mode": "force_installed"
      },
      "{33c93ccc-ceed-47d2-9645-805ea58c8a07}": {
        "install_url": "https://addons.mozilla.org/firefox/downloads/latest/first-party-isolation/latest.xpi",
        "installation_mode": "force_installed"
      },
      "[email protected]": {
        "install_url": "https://releases.mozilla.org/pub/firefox/releases/78.3.1esr/linux-x86_64/xpi/de.xpi",
        "installation_mode": "force_installed"
      }
    },

System

  • Debian 10.6
  • Firefox 78.3.1 and 78.4.0 (updated during testing, behavior on both versions)
@mkaply
Copy link
Collaborator

mkaply commented Oct 26, 2020

I'm seeing this error:

https://releases.mozilla.org/pub/firefox/releases/78.3.1esr/linux-x86_64/xpi/de.xpi had unexpected id (got [email protected] expected [email protected])

The ESR doesn't use a different langpack ID, it should be [email protected].

It should have installed the ones after, though. I'll check that.

@eMPai-git
Copy link
Author

Thank you.

I will change the langpack ID. I cannot remember how I obtained the ID in the first place.

@mkaply
Copy link
Collaborator

mkaply commented Oct 26, 2020

Oddly, I'm seeing all three extensions installed in both cases.

@eMPai-git
Copy link
Author

eMPai-git commented Oct 26, 2020

Maybe I should do some further testing.

Any hints on how I can help you? The langpack ID error was not shown in about:policies.

@mkaply
Copy link
Collaborator

mkaply commented Oct 26, 2020

Once you fix the ID, do they all install? Can you check the JS Console and see if there are any errors?

@eMPai-git
Copy link
Author

It does work with the fixed ID.

I'm getting an error OfferToSaveLoginsDefault ignored because OfferToSaveLogins is present.. Probably should have mentioned that in my entry post. I thought this error is unrelated.

@mkaply
Copy link
Collaborator

mkaply commented Oct 26, 2020

That error is definitely unrelated (shouldn't break anything).

If you could try the first one that fails and see if anything comes up on the JS console, that would be great.

@eMPai-git
Copy link
Author

eMPai-git commented Oct 27, 2020

Ok, here are some new findings:

If I delete the policies.json and look into about:debugging#/runtime/this-firefox I can see that it loads [email protected] by default.

The [email protected] is included in the Debian package firefox-esr-l10n-de.

The force_installed [email protected] seems to not fully load on first start. Some texts of the UI are not translated. A second start fixes that.
The [email protected] seems to be there in this configuration but blocked.

So I changed the ExtensionSettings to allow [email protected]. Everything is fine now besides issue #706

If you could try the first one that fails and see if anything comes up on the JS console, that would be great.

With "JS console" do you mean the Browser console?
If so, there is an error TypeError: addon.sourceURI is null in Policies.jsm:2219:1

@mkaply
Copy link
Collaborator

mkaply commented Oct 28, 2020

So it looks like Debian is improperly renaming the language packs. I just checked our official language packs and they are definitely [email protected]

So if you are installing a language pack from AMO, it should not have the -esr. I have no explanation why using the language pack from AMO isn't working on Debian.

I'm checking into this.

As far as that error goes, that theoretically shouldn't happen, but I'm going to add a check just in case.

@mkaply
Copy link
Collaborator

mkaply commented Oct 29, 2020

So interesting issue. Only debian has the -esr on language packs that come from debian.

So because you're installing language packs from AMO, you should NOT have the -esr on the end. Those are not the IDs when the lang packs come from AMO.

If your URLs were pointing to XPIs on Debian servers, you would use the different ID.

@eMPai-git
Copy link
Author

So it was a Debian related issue in combination with a wrong langpack ID on my part.

It did some final tests. Here are my conclusions.
Debian 10.6
Installed packages: firefox-esr, firefox-esr-l10n-de

1. Behavior with force_installed langpack and wrong ID

{
  "policies": {
    "ExtensionSettings": {
      "*": {
        "installation_mode": "blocked",
      },
      "[email protected]": {
        "install_url": "https://releases.mozilla.org/pub/firefox/releases/78.4.0esr/linux-x86_64/xpi/de.xpi",
        "installation_mode": "force_installed"
      },
      "[email protected]": {
        "install_url": "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi",
        "installation_mode": "force_installed"
      }
    }
  }
}
  • [email protected] is the wrong ID for given install_url
  • [email protected] gets activated
  • it throws an error TypeError: addon.sourceURI is null in Policies.jsm:2219:1
  • uBlock Extension (in this example) does not get installed

2. Behavior with force_installed langpack and correct ID

{
  "policies": {
    "ExtensionSettings": {
      "*": {
        "installation_mode": "blocked",
      },
      "[email protected]": {
        "install_url": "https://releases.mozilla.org/pub/firefox/releases/78.4.0esr/linux-x86_64/xpi/de.xpi",
        "installation_mode": "force_installed"
      }
    }
  }
}

2020-10-30_11-03-08-forced

  • on first start some parts of the UI are not translated

2020-10-30_10-59-16-forced

  • closing and starting Firefox for a second time fixes that

2020-10-30_11-07-05-forced-secondstart

3. Behavior with allowed Debian langpack

{
  "policies": {
    "ExtensionSettings": {
      "*": {
        "installation_mode": "blocked",
      },
      "[email protected]": {
        "installation_mode": "allowed"
      }
    }
  }
}

4. Behavior with everything blocked

{
  "policies": {
    "ExtensionSettings": {
      "*": {
        "installation_mode": "blocked",
      }
    }
  }
}

@eMPai-git
Copy link
Author

So for me the issue is resolved.
Currently I'm using 3. Behavior with allowed Debian langpack as that did work best with the pre-installed package firefox-esr-l10n-de on my Debian system.
Though I'm wondering why they are renaming the language packs

@mkaply
Copy link
Collaborator

mkaply commented Oct 30, 2020

Though I'm wondering why they are renaming the language packs

It's historical going back to the days of IceWeasel and they don't want to risk moving them back (just talked to the maintainer)

FYI I did put in a bug fix based on the behavior you were seeing (the Js error). Thanks for reporting that.

@mkaply mkaply closed this as completed Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants