Opened on 03/13/2018 at 07:42:13 PM

Closed on 03/17/2018 at 06:48:00 PM

Last modified on 05/22/2018 at 01:33:34 PM

#6474 closed change (fixed)

Enable pre-configured preferences through managed storage on Firefox

Reported by: sebastian Assignee: sebastian
Priority: P3 Milestone: Adblock-Plus-3.1-for-Chrome-Opera-Firefox
Module: Platform Keywords:
Cc: josue.mouco, Ross Blocked By:
Blocking: Platform: Firefox
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29721777

Description (last modified by sebastian)

Background

With Adblock Plus 2.6.10 for Firefox we started to allow suppressing the first run page through external configuration. This mechanism was specific to legacy Gecko extension, and when we migrated to WebExtensions with Adblock Plus 3.0, we had to leave that feature behind.

Now, Firefox 57 and above provides a mechanism to pre-configure WebExtensions, similar to Chrome. However, despite Adblock Plus for Chrome and Firefox being based on the same code, now, we still specifically use that mechanism only on Chromium-based browsers.

I verified that removing this check, and saving following file in the resprective location (e.g. ~/.mozilla/managed-storage/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.json), successfully suppresses the first run page, on Firefox 57 and above:

{
  "name": "{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}",
  "description": "Managed storage manifest for Adblock Plus",
  "type": "storage",
  "data": {
    "suppress_first_run_page": true
  }
}

Similarly, this change allows pre-configuration of additional default subscriptions (#3801):

{
  "name": "{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}",
  "description": "Managed storage manifest for Adblock Plus",
  "type": "storage",
  "data": {
    "additional_subscriptions": [
      "https://easylist-downloads.adblockplus.org/easyprivacy.txt"
    ]
  }
}

What to change

Read pre-configurable preferences from storage.managed on all platforms that support it.

Attachments (0)

Change History (20)

comment:1 Changed on 03/13/2018 at 07:45:26 PM by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed on 03/13/2018 at 08:09:11 PM by sebastian

  • Description modified (diff)

comment:3 Changed on 03/13/2018 at 08:10:20 PM by sebastian

  • Description modified (diff)

comment:4 Changed on 03/13/2018 at 08:10:52 PM by sebastian

  • Description modified (diff)

comment:5 follow-up: Changed on 03/15/2018 at 02:19:37 PM by josue.mouco

Hi all,

I created the file:

{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.json

with that content:

{

"name": "{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}",
"description": "Managed storage manifest for Adblock Plus",
"type": "storage",
"data": {

"suppress_first_run_page": true

}

}
{

"name": "{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}",
"description": "Managed storage manifest for Adblock Plus",
"type": "storage",
"data": {

"additional_subscriptions": [

"https://easylist-downloads.adblockplus.org/easyprivacy.txt"

]

}

}

under:

C:\Program Files\Mozilla Firefox\managed-storage

and generated the reg key (export to .reg):

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\ManagedStorage]
@=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\ManagedStorage\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}]
@="\"\"C:
Program Files
Mozilla Firefox
managed-storage
{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.json\"\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts]
@=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}]
@="\"\"C:
Program Files
Mozilla Firefox
managed-storage
{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.json\"\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\PKCS11Modules]
@=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\PKCS11Modules\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}]
@="\"\"C:
Program Files
Mozilla Firefox
managed-storage
{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.json\"\""

but it doesn't work with FF 59.0. Is there something wrong I didn't understand?

comment:6 in reply to: ↑ 5 Changed on 03/16/2018 at 10:59:51 PM by sebastian

  • Cc josue.mouco added

Replying to josue.mouco:

I created the file:

{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.json

with that content:

{

"name": "{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}",
"description": "Managed storage manifest for Adblock Plus",
"type": "storage",
"data": {

"suppress_first_run_page": true

}

}
{

"name": "{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}",
"description": "Managed storage manifest for Adblock Plus",
"type": "storage",
"data": {

"additional_subscriptions": [

"https://easylist-downloads.adblockplus.org/easyprivacy.txt"

]

}

}

You cannot have two JSON objects in the manifest. If you want to use both, suppress_first_run_page and additional_subscriptions you have to combine them like this:

{
  "name": "{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}",
  "description": "Managed storage manifest for Adblock Plus",
  "type": "storage",
  "data": {
    "suppress_first_run_page": true,
    "additional_subscriptions": [
      "https://easylist-downloads.adblockplus.org/easyprivacy.txt"
    ]
  }
}


but it doesn't work with FF 59.0. Is there something wrong I didn't understand?

Regardless of the above mistake, this change hasn't been landed yet. It will probably be shipped with Adblock Plus 3.0.4.

comment:7 Changed on 03/17/2018 at 06:47:14 PM by abpbot

comment:8 Changed on 03/17/2018 at 06:48:00 PM by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Firefox-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:9 Changed on 03/19/2018 at 09:33:34 AM by josue.mouco

Bad comment. can be ignored

Last edited on 03/19/2018 at 01:39:57 PM by josue.mouco

comment:10 follow-up: Changed on 05/10/2018 at 07:27:35 PM by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Done. Both the suppress first run page and additional subscription settings work as expected in Chrome and now Firefox. Could not get this to work with windows, but believe this is due to needing group policy from active directory, instead of "just" a windows machine with regedit.

Firefox 59 / Ubuntu 16.04
Chrome 66 / Ubuntu 16.04

comment:11 in reply to: ↑ 10 Changed on 05/10/2018 at 07:37:36 PM by sebastian

  • Cc Ross added

As far as I understand, on Firefox (unlike Chrome), you don't need to deploy a group policy through Active Directory, but just editing the registry should be sufficient. However, if you tested it on Linux that is good enough, as far as I'm concerned. If it works there but not on Windows, then its either a configuration issue or a bug in Firefox, either way nothing we can address in Adblock Plus.

comment:12 Changed on 05/17/2018 at 11:57:18 AM by josue.mouco

Hi,
AdblockPlus 3.1 has been released and in my case I still have the first run page in Firefox using either the setting lockPref("extensions.adblockplus.suppress_first_run_page", true); in cck2.cfg file or using the managestorage file.

comment:13 Changed on 05/17/2018 at 02:44:09 PM by sebastian

You had it working before with the devbuild, right? Did you adapt the extension ID in the managed storage manifest, its filename and the respective registry entry for the release version?

See the announcement for more details.

If its still not working, can you show the contents of your manged storage manifest?

comment:14 Changed on 05/18/2018 at 12:00:31 PM by josue.mouco

Hi,
"You had it working before with the devbuild, right?" Don't have any devbuild.
"Did you adapt the extension ID in the managed storage manifest, its filename and the respective registry entry for the release version?" My filename is still {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.json which seems to be the same extension ID equivalent. What do you mean with "respective registry entry for the release version"? Here is the content of my file:
{

"name": "{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}",
"description": "Managed storage manifest for Adblock Plus",
"type": "storage",
"data": {

"suppress_first_run_page": true

}

}

comment:15 follow-up: Changed on 05/18/2018 at 04:31:57 PM by sebastian

On Windows, you also have to create a registry key, pointing to the location of your managed storage manifest.

Also just to be sure, you don't happen to be on a version of Firefox older than 57, and the version of Adblock Plus you are using is 3.1?

Last edited on 05/18/2018 at 04:33:24 PM by sebastian

comment:16 in reply to: ↑ 15 Changed on 05/22/2018 at 06:02:50 AM by josue.mouco

Replying to sebastian:

On Windows, you also have to create a registry key, pointing to the location of your managed storage manifest.

Also just to be sure, you don't happen to be on a version of Firefox older than 57, and the version of Adblock Plus you are using is 3.1?

Correct, FF 60.0.1 and AdblockPlus 3.1

And yes, I import the following reg file after the setup:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\ManagedStorage]
@=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\ManagedStorage\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}]
@="C:
Program Files
Mozilla Firefox
ManagedStorage"

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts]
@=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}]
@="C:
Program Files
Mozilla Firefox
ManagedStorage"

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\PKCS11Modules]
@=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\PKCS11Modules\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}]
@="C:
Program Files
Mozilla Firefox
ManagedStorage"

Last edited on 05/22/2018 at 06:04:27 AM by josue.mouco

comment:17 Changed on 05/22/2018 at 10:37:11 AM by sebastian

As far as I understand, Mozilla's documentation, you have to set the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\ManagedStorage\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d} to the full path to your managed storage manifest file.

Last edited on 05/22/2018 at 11:17:52 AM by sebastian

comment:18 Changed on 05/22/2018 at 11:08:42 AM by josue.mouco

Thank you.
Even with full path, I still get the first run page:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\ManagedStorage]
@=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\ManagedStorage\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}]
@="C:
Program Files
Mozilla Firefox
ManagedStorage
{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.json"

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts]
@=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}]
@="C:
Program Files
Mozilla Firefox
ManagedStorage
{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.json"

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\PKCS11Modules]
@=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\PKCS11Modules\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}]
@="C:
Program Files
Mozilla Firefox
ManagedStorage
{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.json"

comment:19 Changed on 05/22/2018 at 12:56:55 PM by tschuster

I tried to reproduce this problem under these conditions and it works for me.

I have this registry entry.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\ManagedStorage\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}]
@="C:\\Program Files\\Mozilla Firefox\\ManagedStorage\\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.json"

And this manifest:

{
  "name": "{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}",
  "description": "Managed storage manifest for Adblock Plus",
  "type": "storage",
  "data": {
    "suppress_first_run_page": true,
    "additional_subscriptions": [
      "https://easylist-downloads.adblockplus.org/easyprivacy.txt"
    ]
  }
}

When installing ABP, the first run page doesn't show up and the additional subscription is there.

comment:20 Changed on 05/22/2018 at 01:33:34 PM by josue.mouco

OK it works with you proposal.
Thanks

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from sebastian.
 
Note: See TracTickets for help on using tickets.