Closed Bug 1659283 Opened 1 year ago Closed 6 months ago

Add-on card in about:addons has update indicator (blue dot) when an unrelated add-on is installed

Categories

(Toolkit :: Add-ons Manager, defect, P3)

78 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
thunderbird_esr68 --- unaffected
thunderbird_esr78 --- wontfix
firefox-esr68 --- unaffected
firefox-esr78 --- wontfix
firefox79 --- wontfix
firefox80 --- wontfix
firefox81 --- wontfix
firefox84 --- wontfix
firefox85 --- wontfix
firefox86 --- fixed

People

(Reporter: public, Assigned: A-NEUN, Mentored)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: good-first-bug, regression, Whiteboard: smoketestb78.2.0-pre)

Attachments

(1 file, 1 obsolete file)

In 78.2.0-pre build1 on Linux x64 (haven't tested other platforms yet), installing an add-on can cause other add-ons to get marked as 'updateable' (blue dot on the three-point button in the add-on tab, and an "Update" option in that menu).

STR:

  1. Install at least one add-on from ATO.
  2. Open the add-on tab in the category Extensions (you see a list of your add-ons).
  3. Use the "Find more add-ons" search bar at the top to search for another add-on in a new tab.
  4. Install another add-on and come back to the add-on tab

Expected:
The new add-on is visible, and no add-on has a blue dot / update menu entry.

Actual:
All add-ons other than the newly installed one have a blue dot / update menu entry. Reloading the add-on tab fixes the issue.

(This is unlikely to be a regression, the issue also occurs with 78.1.1; same STR)

Blocks: tb78found
Whiteboard: smoketestb78.2.0-pre
Status: UNCONFIRMED → NEW
Ever confirmed: true

Confirmed in 78.2.0 pre-build

See this for Firefox too? This code is pretty much shared (with only minor changes injected by Thunderbird)

(In reply to Magnus Melin [:mkmelin] from comment #3)

See this for Firefox too? This code is pretty much shared (with only minor changes injected by Thunderbird)

Confirmed for Firefox 79

Component: Add-Ons: General → Add-ons Manager
Product: Thunderbird → Toolkit
Version: 78 → 78 Branch

Regressed by bug 1525178, specifically https://hg.mozilla.org/mozilla-central/rev/b570c6b5d91d

Before that patch addon install listeners were targeted to specific add-on cards.
After that patch every addon card will respond to every add-on install event, even if unrelated to the add-on.

These should ignore installs if it doesn't match this.addon: https://searchfox.org/mozilla-central/rev/d54210d490ef335b13fc1fcac817525120c8c46b/toolkit/mozapps/extensions/content/aboutaddons.js#3306-3317

Similarly for https://searchfox.org/mozilla-central/rev/d54210d490ef335b13fc1fcac817525120c8c46b/toolkit/mozapps/extensions/content/aboutaddons.js#3319-3322 (but this is after 78, so not in Thunderbird).

Keywords: regression
Regressed by: 1525178
See Also: → 1627495
Summary: Add-on tab offers non-existing add-on updates → Add-on card in about:addons has update indicator (blue dot) when an unrelated add-on is installed
Duplicate of this bug: 1660977

This is relatively easy to fix, so I'll mark this as a good-first-bug and mentor this.
To get started, see comment 5 and https://wiki.mozilla.org/WebExtensions/Contribution_Onramp

Mentor: rob
Severity: -- → S3
Keywords: good-first-bug
Priority: -- → P3

I'll give this a go.

Assignee: nobody → a.neun
Assignee: a.neun → nobody
Assignee: nobody → a.neun
Status: NEW → ASSIGNED

I am pretty new to contributing to firefox and I am having a bit of trouble implementing this.
How should I compare it to this.addon?
I was planning on comparing this.addon.id and install.addon.id, but install.addon is null.

Flags: needinfo?(rob)

When is install.addon null? (how did you test that?)
Have you tried checking .existingAddon, to see if it has the expected value when .addon is null?

The install object is an AddinInstallWrapper, instantiated here: https://searchfox.org/mozilla-central/rev/62c443a7c801ba9672de34c2867ec1665a4bbe67/toolkit/mozapps/extensions/internal/XPIInstall.jsm#1224-1262
and the class itself is declared here: https://searchfox.org/mozilla-central/rev/62c443a7c801ba9672de34c2867ec1665a4bbe67/toolkit/mozapps/extensions/internal/XPIInstall.jsm#2622-2732

Flags: needinfo?(rob)

(In reply to Rob Wu [:robwu] from comment #10)

When is install.addon null? (how did you test that?)

I tested that by placing a breakpoint in the Firefox JS Debugger, and checking if install.addon matched this.addon.

Have you tried checking .existingAddon, to see if it has the expected value when .addon is null?

Thanks for this - it does.

Hey Tilden, Rob has left a review comment asking for a test: https://phabricator.services.mozilla.com/D90286

If you're stuck or unsure how to proceed, feel free to ask here or on Phabricator.

Flags: needinfo?(a.neun)

Thanks! I have just been a bit busy recently.

Flags: needinfo?(a.neun)

The issue appears in Firefox 76+, with the HTML sidebar.

Hey Tilden! It's been a while since we've heard from you - I wanted to check in on how this is going.

Flags: needinfo?(a.neun)

Thanks for checking up! I have had some quite stressful exams at school over the last month, but those are behind me now, so I should be able to commit myself to this again. (Thanks for the NI, I forgot about this for a bit). I think I have a good idea about how to proceed, but will ask for help if I require it.

Flags: needinfo?(a.neun)
Attachment #9185043 - Attachment is obsolete: true
Attachment #9185043 - Attachment is obsolete: false
Attachment #9175828 - Attachment is obsolete: true
Attachment #9185043 - Attachment description: Bug 1659283 - Fix update indicator appearing on all add-on cards when unrelated addon is installed. r=robwu → Bug 1659283 - Fix update indicator appearing on all add-on cards when unrelated addon is installed. r=mstriemer,rpl

Hey Tilden! Just wanted to check in -- it looks like you're close to finishing this one off! Let us know if you'd like to keep working on it. :)

Flags: needinfo?(a.neun)

I will still be working on it. I've just had a period of mock exams, which the revision for prevented me from finishing this. Should be able to get it done pretty soon. Thanks for checking!

Flags: needinfo?(a.neun)
Pushed by rmaries@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bd5c30b77e39
Fix update indicator appearing on all add-on cards when unrelated addon is installed. r=rpl
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch

Tilden, congrats on landing this patch! 🎉 We've added your contribution to our recognition wiki at https://wiki.mozilla.org/Add-ons/Contribute/Recognition.

Hope to see you around the project in the future! 😎

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