Closed
Bug 1477328
Opened 6 years ago
Closed 6 years ago
mozAddonManager does not appear to enable static themes when installed via createInstall
Categories
(Toolkit :: Add-ons Manager, defect, P1)
Toolkit
Add-ons Manager
Tracking
()
VERIFIED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | verified |
People
(Reporter: scolville, Assigned: aswan)
Details
Attachments
(4 files)
If you install a static theme with mozAddonManager the static theme is not enabled after being downloaded and installed. Using nightly set-up to consume add-ons from amo-dev run: window.navigator.mozAddonManager.createInstall({url: 'https://addons-dev.allizom.org/firefox/downloads/file/255202/tigers_matter-1.0-fx.xpi?src=discovery-promo'}).then((obj) => obj.install()); Note the static theme is installed but not enabled. It looks like until this is fixed that the old installTrigger.install() API might provide a workaround since this appears to work: InstallTrigger.install({URL: 'https://addons-dev.allizom.org/firefox/downloads/file/255202/tigers_matter-1.0-fx.xpi?src=discovery-promo'}); Thanks to :rebm for discovering this issue and providing the test-case code examples.
Comment 1•6 years ago
|
||
Sending to aswan in case this is related to bug 1465938, though that checked out in 62.
Flags: needinfo?(aswan)
Priority: -- → P1
Reporter | ||
Comment 2•6 years ago
|
||
Pre-requisite steps: * Create the xpinstall.signatures.dev-root pref in about:config as a Boolean and set it to true. * Create/set extensions.webapi.testing as a Boolean to true * go to about:preferences#privacy Permissions heading and add an exception for dev (https://addons-dev.allizom.org) (See the "Exceptions" button next to "Warn you when websites try to install add-ons"). Issue reproduced running the examples in the OP in 63.0a1 (2018-07-20) (64-bit) on OSX. See Attached logs for events following running the examples. Note that installating via mozAddonManager does not fire onEnabled.
It looks we can also do the following workaround too: mozAddonManager.getAddonByID(guid).then((addon) => addon.setEnabled(true)) Here is a log with a bit more info: https://irccloud.mozilla.com/pastebin/3r22a3sk/
Assignee | ||
Comment 4•6 years ago
|
||
Ugh, themes are a rats nest of special cases. I'm trying to untangle this a bit, though depending on time, I may end up just throwing another special case onto the pile. Stay tuned...
Assignee: nobody → aswan
Flags: needinfo?(aswan)
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Attachment #8997604 -
Flags: review?(kmaglione+bmo)
Comment 6•6 years ago
|
||
mozreview-review |
Comment on attachment 8997604 [details] Bug 1477328 Ensure that themes installed via mozAddonManager are enabled https://reviewboard.mozilla.org/r/261298/#review268392 ::: toolkit/mozapps/extensions/test/browser/browser_webapi_theme.js:1 (Diff revision 1) > + "use strict";
Attachment #8997604 -
Flags: review?(kmaglione+bmo) → review+
Comment hidden (mozreview-request) |
Pushed by aswan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dba533b5af6a Ensure that themes installed via mozAddonManager are enabled r=kmag
Backout by apavel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0e42959ec73e Backed out changeset dba533b5af6a for failing browser/components/extensions/test/browser/test-oop-extensions/browser_ext_browserAction_popup_preload.js
Comment 10•6 years ago
|
||
Backed out for perma-failing bug 1352668 Push that started the failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=dba533b5af6a8531489c7a3f3cb25645ea1c882d Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=192001399&repo=autoland&lineNumber=4818 Backout: https://hg.mozilla.org/integration/autoland/rev/0e42959ec73e8e22889ff3a19d4e8cabf1e2f331
Flags: needinfo?(aswan)
Comment 11•6 years ago
|
||
Pushed by apavel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ebcc9ed3dcd2 Ensure that themes installed via mozAddonManager are enabled r=kmag
Comment 12•6 years ago
|
||
:aswan relanded this because the failures appeared on the backout too, even if retriggers indicated your push was the cause. I apologize for the confusion.
Comment 13•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ebcc9ed3dcd2
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Assignee | ||
Updated•6 years ago
|
Flags: needinfo?(aswan)
Comment 14•6 years ago
|
||
Verfified as fixed in Firefox 63. I will attach a postfix video.
Status: RESOLVED → VERIFIED
Comment 15•6 years ago
|
||
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•