X
Tap here to go to the mobile version of the site.

Support Forum

Preinstalled Extension in FF 68.1.0esr doesn't work

Posted

Hi, I am preparing a firefox enterprise installation on windows server 2019 with a special configuration and a preinstalled extension. This is a single installation that will be used by all users accessing the server.

Here are the steps I followed:

  1. I installed firefox: Firefox_setup_68.1.0-esr.msi
  2. I transferred our policies.json file to C:\Program Files\Mozilla Firefox\distribution
  3. I transferred our autoconfig.js file to C:\Program Files\Mozilla Firefox\browser\defaults\preferences
  4. I transferred ourextName@ourdomain.local.xpi file to C:\Program Files\Mozilla Firefox\browser\extensions.

By running FireFox, I can see that both the policies and the configurations have been correctly considered, while the extension does not work.

After doing various tests I can say that:

  • the extension is correctly loaded and enabled, in autoconfig.json there are these directive:
   pref("extensions.autoDisableScopes", 0);
   pref("extensions.enabledScopes", 15);
 
  • the extension is not signed, but in the autoconfig.json file there is the directive:
   pref ("xpinstall.signatures.required", false);
  • trying to install the extension from the Add-ons Manager using the item: Install Add-on from file ... It works correctly. Unfortunately I can't use this option, because Extension is installed only for current user.

So, given that the extension works, what's wrong with the preparation procedure, is the directory wrong or some configuration are missing?

Do preinstalled extensions need additional files or a different layout?

I also tried without our policies.json file and leaving only the directive that allows xpi file without signature in the autoconfig.json file and autoDisableScopes/enableScopes.

Any help will be greatly appreciated, thanks

Hi, I am preparing a firefox enterprise installation on windows server 2019 with a special configuration and a preinstalled extension. This is a single installation that will be used by all users accessing the server. Here are the steps I followed: # I installed firefox: '''Firefox_setup_68.1.0-esr.msi''' # I transferred our <code>policies.json</code> file to <code>C:\Program Files\Mozilla Firefox\distribution</code> # I transferred our <code>autoconfig.js</code> file to <code>C:\Program Files\Mozilla Firefox\browser\defaults\preferences</code> # I transferred our<code>extName@ourdomain.local.xpi</code> file to <code>C:\Program Files\Mozilla Firefox\browser\extensions</code>. By running FireFox, I can see that both the policies and the configurations have been correctly considered, while the extension does not work. After doing various tests I can say that: * the extension is correctly loaded and enabled, in <code>autoconfig.json</code> there are these directive: pref("extensions.autoDisableScopes", 0); pref("extensions.enabledScopes", 15); * the extension is not signed, but in the <code>autoconfig.json</code> file there is the directive: pref ("xpinstall.signatures.required", false); * trying to install the extension from the Add-ons Manager using the item: '''Install Add-on from file ...''' It works correctly. Unfortunately I can't use this option, because Extension is installed only for current user. So, given that the extension works, what's wrong with the preparation procedure, is the directory wrong or some configuration are missing? Do preinstalled extensions need additional files or a different layout? I also tried without our <code>policies.json</code> file and leaving only the directive that allows xpi file without signature in the <code>autoconfig.json</code> file and autoDisableScopes/enableScopes. Any help will be greatly appreciated, thanks

Modified by letymar2710

Chosen solution

Are you sure that the filename is correct if you check the manifest.json file (id.xpi)?

What ID do you get if you install the extension manually ?

Read this answer in context 0
Quote

Additional System Details

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

More Information

cor-el
  • Top 10 Contributor
  • Moderator
17693 solutions 160087 answers

Chosen Solution

Are you sure that the filename is correct if you check the manifest.json file (id.xpi)?

What ID do you get if you install the extension manually ?

Are you sure that the filename is correct if you check the manifest.json file (id.xpi)? What ID do you get if you install the extension manually ? *https://github.com/mozilla/policy-templates/blob/master/README.md#extensions
Was this helpful to you?
Quote

Question owner

thank you very much! I found a syntax error in the url indicated in the property

    "Extensions": {
         "Install": ["https://addons.mozilla.org/firefox/downloads/somefile.xpi", "//path/to/xpi"],
         "Uninstall": ["bad_addon_id@mozilla.org"],
         "Locked":  ["addon_id@mozilla.org"]
       }

it was not very clear to me what was //path/to/xpi and at the end I saw that using a file url works (like: file:///C:/Program Files/Mozilla Firefox/browser/extensions/extName@ourdomain.local.xpi).

Rereading the indicated page, I also noticed that the ExtensionSettings section was missing, fixing the path and adding this section now the extension is correctly installed and works! Really big thanks!!

thank you very much! I found a syntax error in the url indicated in the property "Extensions": { "Install": ["https://addons.mozilla.org/firefox/downloads/somefile.xpi", "//path/to/xpi"], "Uninstall": ["bad_addon_id@mozilla.org"], "Locked": ["addon_id@mozilla.org"] } it was not very clear to me what was <code>//path/to/xpi</code> and at the end I saw that using a file url works (like: <code>file:///C:/Program Files/Mozilla Firefox/browser/extensions/extName@ourdomain.local.xpi</code>). Rereading the indicated page, I also noticed that the <code>ExtensionSettings</code> section was missing, fixing the path and adding this section now the extension is correctly installed and works! Really big thanks!!

Modified by letymar2710

Was this helpful to you?
Quote
Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.