Closed Bug 1521418 Opened 6 years ago Closed 6 years ago

Unnecessary duplicate update check for system addons

Categories

(Toolkit :: Add-ons Manager, enhancement, P5)

64 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: trishul.goel, Assigned: trishul.goel)

References

Details

Attachments

(2 files)

While performing backgroundUpdateCheck for normal extensions, the function also checks updates for system addon ie, fetches update URL
https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/AddonManager.jsm#1286

which eventually it do not install because of
https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/AddonManager.jsm#1294

The system addons are updated only by updateSystemAddons method
https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/AddonManager.jsm#1315

So this results in unnecessary request to update URLs of system addons.

We never actually get to checking for the CAN_UPGRADE permission since system addons don't have update URLs. We have a separate bug about avoiding warning about that (bug 1353934)

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID

Hi @aswan,

Thanks for your review.
I think I may not have been able to explain correctly.

There are GET request to versioncheck-bg.addons.mozilla.org for system addons (due to update check), which is of no use as we update system addons with different process and eventually leads to warnings mentioned in #1353934.

Please see the attachment. There are Requests to update system addons for example.

https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=2&id=webcompat-reporter@mozilla.org&version=1.1.0&maxAppVersion=null&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}&appVersion=66.0a1&appOS=Darwin&appABI=x86_64-gcc3&locale=en-US&currentAppVersion=66.0a1&updateType=112&compatMode=normal

Since there is no update URL in webcompat-reporter@mozilla.org it request update from URL in extensions.update.background.url pref.
This return a blank object and hence the warning is generated as mentioned in #1353934.

The fix for this would be as simple as adding
if (addon.signedState === AddonManager.SIGNEDSTATE_SYSTEM) continue;
just when loop starts at https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/AddonManager.jsm#1286

Status: RESOLVED → REOPENED
Resolution: INVALID → ---

Thanks for the clarification

Priority: -- → P5

Remove system addons from update check of notmal addons

Assignee: nobody → trishul.goel
Attachment #9038467 - Attachment description: Bug 1521418 - Remove system addons from update check of normal extensions r:aswan → Bug 1521418 - Remove system addons from update check of normal extensions. r=aswan
Keywords: checkin-needed
Whiteboard: checkin-needed

Pushed by nbeleuzu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bca8ef2bc43f
Remove system addons from update check of normal extensions. r=aswan

Keywords: checkin-needed
Whiteboard: checkin-needed
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: