Closed Bug 1616566 Opened 5 years ago Closed 5 years ago

chrome_settings_overrides.search_provider.is_default manifest key is ignored on extension update

Categories

(WebExtensions :: Frontend, enhancement)

73 Branch
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: private.face, Unassigned)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Attached file test-extensions.zip

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:73.0) Gecko/20100101 Firefox/73.0

Steps to reproduce:

  • Unpack attached archive.
  • Install WebExtension from file "search-v1.0.zip" (it does not have any functionality).
  • Update it by installing the new version of extension from file "search-v2.0.zip". This extension has chrome_settings_overrides and search_provider with is_default: true specified in the manifest.

Actual results:

When extension updates no "set default search engine" doorhanger is shown.

Expected results:

When extension updates for the first time to the version with search_provider override with is_default: true in the manifest, "set default search engine" dialog should be shown.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Product: Firefox → WebExtensions

This was a deliberate decision, see https://bugzilla.mozilla.org/show_bug.cgi?id=1397975#c21
Perhaps it needs to be documented in the chrome_settings_overrides documentation...

I see, this is some kind of protection against abuse of is_default setting and harassing users with "change default search engine" popup on every second update.

I wonder though if both things can be achieved. For example, when the doorhanger shows for the first time (even on extension update) remember that and don't show it again no matter how many times you flip is_default property. How does that sound?

I will confirm this bug per comment 2, but I will set it as an enhancement per comment 3. Also, I'll set its component as Frontend since it's related to the apparition of the "set default search engine" door-hanger.

@reporter: Did this issue occur on Firefox Release v73.0? Did you see this behavior on the Mac OS 10.12 operating system?
Please "need info" me if manual testing is required. Thank you for your contribution!

Status: UNCONFIRMED → NEW
Type: defect → enhancement
Component: Untriaged → Frontend
Ever confirmed: true
Flags: needinfo?(private.face)

I can reproduce this issue on the macOS 10.12.6, on Firefox Release v73.0.1, as well as on Developer Edition v74.0b7 and Nightly v75.0a1.
Let me know if you need any additional info!

Flags: needinfo?(private.face)

This is by design, but lets make sure this behavior is documented on mdn.

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/chrome_settings_overrides

Status: NEW → RESOLVED
Closed: 5 years ago
Keywords: dev-doc-needed
Resolution: --- → INVALID

(In reply to Shane Caraveo (:mixedpuppy) from comment #6)

This is by design, but lets make sure this behavior is documented on mdn.

Are there any other reasons for it to be designed this way other than the one described in https://bugzilla.mozilla.org/show_bug.cgi?id=1397975#c21?

The main goal is to try to prevent addons from figuring out a way to keep harassing the user, which they might do by alternating releases with and without is_default.

I believe it is possible not to show default search engine dialog more than once, even on ADDON_UPGRADE.

Are there any other reasons for it to be designed this way other than the one described in https://bugzilla.mozilla.org/show_bug.cgi?id=1397975#c21?

Extensions shouldn't be adding search engines after the fact. That was the reason.

We couldn't come up with legitimate reasons for doing this (which is why we made sure the API was in the initial release of WebExtensions).

If you want to have a search engine, just create a separate extension and encourage that to be installed.

I've changed the text to this:

Boolean: True if the search engine should be the default choice. On Firefox, this is opt-in and the user will only be asked the first time the extension is installed. They will not be asked again if a search engine is added later.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: