The default bug view has changed. See this FAQ.

Implement management.get and getAll

NEW
Unassigned

Status

()

Toolkit
WebExtensions: Untriaged
P5
normal
9 months ago
2 months ago

People

(Reporter: mattw, Unassigned)

Tracking

(Depends on: 1 bug, Blocks: 4 bugs)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [management] triaged)

(Reporter)

Description

9 months ago
Chrome documentation: https://developer.chrome.com/extensions/management#method-getAll
(Reporter)

Updated

9 months ago
Blocks: 1282855
(Reporter)

Updated

9 months ago
Duplicate of this bug: 1283279

Comment 2

9 months ago
The last time that we talked about this, there was some question about whether we actually wanted to implement it. As I recall, we decided we wouldn't implement it until we had some idea of what extensions are actually using it for.
Summary: Implement chrome.management.getAll for WebExtensions → Implement management.getAll
(Reporter)

Updated

9 months ago
Blocks: 1282856
No longer blocks: 1282855
(Reporter)

Updated

9 months ago
Blocks: 1282895
(Reporter)

Updated

9 months ago
Blocks: 1283654
(Reporter)

Updated

9 months ago
Blocks: 1283660
Blocks: 1281815
No longer blocks: 1282593
No longer blocks: 1282856
Some examples of usage from "popular chrome extensions":

- Video Downloader Pro is using it to look for a particular extension (Google Cast) to see if it is installed and/or enabled. If both are true then it uses it for playback. If it is not installed the user is asked to install it, and if it is not enabled then the user is asked to enable it.

- Adblock uses it in a number of ways:
    - It gathers a list of all installed extensions which is then provided to a bug report which can be submitted.
    - It gathers a list of all installed extensions for display on a screen to help diagnose problems.
    - It has a feature that allows a user to disable all other extensions, for which it uses getAll to get the list of those
      extensions. I assume that this is also for troubleshooting purposes.

- Flash Video Downloader uses it in a similar manner to Video Downloader Pro in that it looks for specific extensions to see if they are installed, and if they are it enables features of itself that are only available if said extensions are installed.

Do these seem like valid enough use cases to implement the method? We have flagged it for implementation as part of the project to enable more Chrome extensions to run in Firefox.
Flags: needinfo?(kmaglione+bmo)

Updated

9 months ago
Duplicate of this bug: 1283687

Comment 5

9 months ago
should also implement chrome.management.get at same time - putting on one bug (closed bug 1283687 as dupe to this one)

Chrome documentation: https://developer.chrome.com/extensions/management#method-get

Comment 6

9 months ago
(In reply to Bob Silverberg [:bsilverberg] from comment #3)
> - Video Downloader Pro is using it to look for a particular extension
> (Google Cast) to see if it is installed and/or enabled. If both are true
> then it uses it for playback. If it is not installed the user is asked to
> install it, and if it is not enabled then the user is asked to enable it.

Does Google Cast even work in Firefox? Is it even possible for it to?

> - Adblock uses it in a number of ways:
>     - It gathers a list of all installed extensions which is then provided
> to a bug report which can be submitted.
>     - It gathers a list of all installed extensions for display on a screen
> to help diagnose problems.

We have about:support for this.

>     - It has a feature that allows a user to disable all other extensions,
> for which it uses getAll to get the list of those
>       extensions. I assume that this is also for troubleshooting purposes.

This would require us to also implement that functionality for it to be
useful.

Either way, the lack of this feature doesn't seem like it should prevent
significant parts of the add-on from working.

> - Flash Video Downloader uses it in a similar manner to Video Downloader Pro
> in that it looks for specific extensions to see if they are installed, and
> if they are it enables features of itself that are only available if said
> extensions are installed.

Are any of these extensions relevant to Firefox?

Maybe we should consider initially implementing this as a stub that just
returns the entry for the add-on itself, and decide later how we want to
handle the full implementation.
Flags: needinfo?(kmaglione+bmo)
Assignee: nobody → bob.silverberg
Status: NEW → ASSIGNED
Summary: Implement management.getAll → Implement management.get and getAll
Version: 34 Branch → unspecified
Depends on: 1287892

Updated

8 months ago
Whiteboard: [management] → [management] triaged
We are going to hold off on implementing this API method until some compelling use cases are presented by the developer community.
Assignee: bob.silverberg → nobody
No longer blocks: 1282979
Status: ASSIGNED → NEW
Priority: P2 → P5

Comment 8

8 months ago
Here is another use case (it's not in the current Chromium extension yet, but I'll implement it in the future if Firefox also supports it):

Retrieving a list of installed addons so that their source code can be viewed with my Extension Source Viewer (https://github.com/Rob--W/crxviewer). For this I would need management.getAll + the following of ExtensionInfo (https://developer.chrome.com/extensions/management#type-ExtensionInfo):
- id (to find the listing on AMO)
- name
- version (to select a specific listing on AMO)
- icons (optional, to make the list of extensions prettier)
- installType (to see whether it's probably installed via the addon gallery - e.g. "development" if loaded via about:debugging and "normal" otherwise).
Blocks: 1303905

Comment 9

6 months ago
Here is our use case for this feature:

We are an international market research company that recruits volunteers to install software (including a Firefox extension) that automatically reports on their media consumption and web usage. We would like to get information about other installed extensions so that we can report statistics such as marketshare and install base to our clients.

We currently report this information for Firefox using a legacy extension, but will lose this data when switching to WebExtensions. There is a potential for Firefox extension authors and Mozilla to be impacted by this if they happen to be clients as well.

Comment 10

5 months ago
This is a use case that I'm already using in Chrome & Opera.

I have an extension for OGame, a browser game, called UniverseView.
There are also a lot of other extensions and this API helps me to detect which extensions are installed.
When a certain extension is installed my extension doesn't execute certain code to avoid conflicts.

Comment 11

4 months ago
One more use case for this: the weh toolkit (https://github.com/mi-g/weh) is a set of tools to help developing WebExtensions add-ons. It contains an extension, weh-inspector, able to monitor messages, preferences and storage from weh-based installed extensions. The lack of browser.management.getAll API prevents weh-inspector to discover automatically what other add-ons can be inspected.

Note that the lack of runtime.messageExternal support (bug#1258360) is even more critical for weh-inspector to run on Firefox.

Comment 12

2 months ago
Another case here: in Adnauseam(https://github.com/dhowe/AdNauseam), we use management.getAll to check for enabled extensions that may conflict (other adblockers making modifications to request headers, etc), and then warn the user that only one should probably be used at the same time.

Updated

2 months ago
Duplicate of this bug: 1336689

Comment 14

2 months ago
I have a use case for this bug: Persona Switcher (https://github.com/drsjb80/personaswitcher) is an add-on that lets you easily switch between personas/themes in Mozilla Firefox, Thunderbird, and SeaMonkey.  Currently we are working on migrating this add-on to a WebExtension, however, we will lose the functionality and be unable to switch between personas once we do this. The management API would help us access the themes and switch between them in Firefox with the getAll() and setEnabled() functions

Updated

2 months ago
Duplicate of this bug: 1336908
You need to log in before you can comment on or make changes to this bug.