Light and Dark themes missing from about:addons and Customize Mode after upgrading to Firefox 82
Categories
(Toolkit :: Add-ons Manager, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox81 | --- | unaffected |
firefox82 | --- | wontfix |
firefox83 | + | wontfix |
firefox84 | --- | fixed |
People
(Reporter: jscher2000, Assigned: mixedpuppy)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0
Steps to reproduce:
Check Themes section of about:addons or Themes button in Customize Mode.
Actual results:
Cannot find Light or Dark themes.
Curiously they are not listed when I execute this in the Browser Console:
var tlist = AddonManager.getAddonsByTypes(["theme"]);
tlist.then((themes) => {console.log(themes.map(t => t.name));});
But they are physically present on
resource://builtin-themes/
Expected results:
Light and Dark themes should be available options. (They are in 83.0b2.)
Reporter | ||
Comment 1•4 years ago
|
||
I notice this doesn't affect my newer test profiles, so it might be caused by some legacy files or preferences.
It came up on Reddit, so more testers might appear here: https://www.reddit.com/r/firefox/comments/jf3xd3/what_happened_to_the_default_themes_firefox_820/
Reporter | ||
Comment 2•4 years ago
|
||
My main profile dates back to Nov. 2017 (Firefox 57) and I have this non-default preference value set:
extensions.update.autoUpdateDefault
= false
I went to about:addons, clicked the gear button, and clicked Check for Updates,. Firefox reported None found.
I exited/restarted Firefox and the Light, Dark and Default themes were back.
I don't know whether those things are causally linked, but I suspect they might be.
Comment 3•4 years ago
|
||
I encountered this issue after upgrading to Firefox 82 (Firefox from ArchLinux's repository). The console errors are consistent, the disappearance of items in about:addons
is not. But I personally witnessed that the default themes were gone, except for Alpenglow.
mozregression
with the STR below (and a custom bisect script) points to bug 1660557 as the likely regressor.
I'm moving this over to the Add-ons Manager component because the fix is probably to fixup the database in some kind of migration.
STR:
- Create profile directory with Firefox 81, e.g.
/tmp/profdir81
- Start Firefox >= 82 with that profile directory,
firefox --no-remote -profile /tmp/profdir81
- Open the global browser console and scroll to the top.
Expected:
- no significant errors.
Actual:
- logs below.
The global JS console (Ctrl-Shift-J) contains the following errors related to this bug:
1603810249736 addons.xpi-utils WARN updateMetadata: Add-on firefox-compact-dark@mozilla.org is invalid: Error: File resource:///modules/themes/dark/ does not contain a valid manifest(resource://gre/modules/addons/XPIInstall.jsm:669:11) JS Stack trace: loadManifest@XPIInstall.jsm:669:11
awaitPromise@XPIProvider.jsm:228:15
syncLoadManifest@XPIInstall.jsm:747:24
updateMetadata@XPIDatabase.jsm:2930:32
updateExistingAddon@XPIDatabase.jsm:3168:23
processFileChanges@XPIDatabase.jsm:3255:31
checkForChanges@XPIProvider.jsm:2999:55
startup@XPIProvider.jsm:2457:12
callProvider@AddonManager.jsm:230:31
_startProvider@AddonManager.jsm:601:17
startup@AddonManager.jsm:825:14
startup@AddonManager.jsm:3530:26
observe@addonManager.js:87:29
1603810249737 addons.xpi-utils WARN updateMetadata: Add-on default-theme@mozilla.org is invalid: Error: File resource://gre/modules/themes/default/ does not contain a valid manifest(resource://gre/modules/addons/XPIInstall.jsm:669:11) JS Stack trace: loadManifest@XPIInstall.jsm:669:11
awaitPromise@XPIProvider.jsm:228:15
syncLoadManifest@XPIInstall.jsm:747:24
updateMetadata@XPIDatabase.jsm:2930:32
updateExistingAddon@XPIDatabase.jsm:3168:23
processFileChanges@XPIDatabase.jsm:3255:31
checkForChanges@XPIProvider.jsm:2999:55
startup@XPIProvider.jsm:2457:12
callProvider@AddonManager.jsm:230:31
_startProvider@AddonManager.jsm:601:17
startup@AddonManager.jsm:825:14
startup@AddonManager.jsm:3530:26
observe@addonManager.js:87:29
1603810249737 addons.xpi-utils WARN updateMetadata: Add-on firefox-compact-light@mozilla.org is invalid: Error: File resource:///modules/themes/light/ does not contain a valid manifest(resource://gre/modules/addons/XPIInstall.jsm:669:11) JS Stack trace: loadManifest@XPIInstall.jsm:669:11
awaitPromise@XPIProvider.jsm:228:15
syncLoadManifest@XPIInstall.jsm:747:24
updateMetadata@XPIDatabase.jsm:2930:32
updateExistingAddon@XPIDatabase.jsm:3168:23
processFileChanges@XPIDatabase.jsm:3255:31
checkForChanges@XPIProvider.jsm:2999:55
startup@XPIProvider.jsm:2457:12
callProvider@AddonManager.jsm:230:31
_startProvider@AddonManager.jsm:601:17
startup@AddonManager.jsm:825:14
startup@AddonManager.jsm:3530:26
observe@addonManager.js:87:29
1603810249791 addons.xpi-utils WARN updateMetadata: Add-on firefox-alpenglow@mozilla.org is invalid: Error: File resource:///modules/themes/alpenglow/ does not contain a valid manifest(resource://gre/modules/addons/XPIInstall.jsm:669:11) JS Stack trace: loadManifest@XPIInstall.jsm:669:11
awaitPromise@XPIProvider.jsm:228:15
syncLoadManifest@XPIInstall.jsm:747:24
updateMetadata@XPIDatabase.jsm:2930:32
updateExistingAddon@XPIDatabase.jsm:3168:23
processFileChanges@XPIDatabase.jsm:3255:31
checkForChanges@XPIProvider.jsm:2999:55
startup@XPIProvider.jsm:2457:12
callProvider@AddonManager.jsm:230:31
_startProvider@AddonManager.jsm:601:17
startup@AddonManager.jsm:825:14
startup@AddonManager.jsm:3530:26
observe@addonManager.js:87:29
and followed shortly by
1603810252318 addons.xpi-utils WARN updateMetadata: Add-on default-theme@mozilla.org is invalid: Error: File resource://gre/modules/themes/default/ does not contain a valid manifest(resource://gre/modules/addons/XPIInstall.jsm:669:11) JS Stack trace: loadManifest@XPIInstall.jsm:669:11
awaitPromise@XPIProvider.jsm:228:15
syncLoadManifest@XPIInstall.jsm:747:24
updateMetadata@XPIDatabase.jsm:2930:32
updateExistingAddon@XPIDatabase.jsm:3168:23
processFileChanges@XPIDatabase.jsm:3255:31
getNewSideloads@XPIProvider.jsm:3035:28
1603810252343 addons.xpi-utils WARN updateMetadata: Add-on firefox-compact-dark@mozilla.org is invalid: Error: File resource:///modules/themes/dark/ does not contain a valid manifest(resource://gre/modules/addons/XPIInstall.jsm:669:11) JS Stack trace: loadManifest@XPIInstall.jsm:669:11
awaitPromise@XPIProvider.jsm:228:15
syncLoadManifest@XPIInstall.jsm:747:24
updateMetadata@XPIDatabase.jsm:2930:32
updateExistingAddon@XPIDatabase.jsm:3168:23
processFileChanges@XPIDatabase.jsm:3255:31
getNewSideloads@XPIProvider.jsm:3035:28
1603810252400 addons.xpi-utils WARN updateMetadata: Add-on firefox-compact-light@mozilla.org is invalid: Error: File resource:///modules/themes/light/ does not contain a valid manifest(resource://gre/modules/addons/XPIInstall.jsm:669:11) JS Stack trace: loadManifest@XPIInstall.jsm:669:11
awaitPromise@XPIProvider.jsm:228:15
syncLoadManifest@XPIInstall.jsm:747:24
updateMetadata@XPIDatabase.jsm:2930:32
updateExistingAddon@XPIDatabase.jsm:3168:23
processFileChanges@XPIDatabase.jsm:3255:31
getNewSideloads@XPIProvider.jsm:3035:28
Updated•4 years ago
|
Updated•4 years ago
|
Comment 4•4 years ago
|
||
From looking at the stack traces, it's obvious that there is no migration to the new extensions from bug 1660557 at startup.
The new extensions are registered too late... at final-ui-startup
, whereas the add-on database migration happens "synchronously" before any UI occurs at all.
The expected migration logic from bug 1660557 could never have worked. I have yet to check for the best solution here. Whether it's a migration of paths of built-in themes in the database, and/or whether we need to (somehow) support the installation/update of a (new) (builtin) (theme) add-on after corruption of the previous install.
Comment 6•4 years ago
|
||
(In reply to Julien Cristau [:jcristau] from comment #5)
Gijs can you look at this regression?
My impression is that Rob is already doing this, and he has a much better understanding of this problemspace than I do.
Comment 7•4 years ago
|
||
Shane said that he's going to look into this.
Comment 9•4 years ago
|
||
Alex,
Can you help with STR here? Some of us are having a harder time reproducing this issue consistently. Thanks!
Comment 10•4 years ago
|
||
Although the STR in comment 3 is able to consistently trigger the console errors, it cannot be used to reproduce the disappeared themes.
I pulled my profile from a recent backup and am able to reproduce the issue. So by removing files from the profile directory, I am able to pinpoint the specific issue further:
baseline: eliminating user data:
- Starting with old profile, last accessed with Firefox 81
- Using a path name different from the original profile directory - no difference
- previous + removing IndexedDB (storage/) and databases (*.sqlite) - no difference
- previous + removing prefs.js - no difference (=baseline for later)
baseline2: without extension files
- baseline + removing *.json (including extensions.json) - no difference
- baseline + removing extensions/*.xpi - no difference
- baseline + remove *.json and extensions/ - no difference (=baseline2 for later)
tests: without userdata and extensions
- baseline2 + removing addonStartup.json.lz4 - themes are back. (also tried with just baseline, same result)
- previous + addonStartup.json.lz4 from backup - reproduced (usually, when Firefox 82 is restarted, the themes are back).
final test:
- empty directory with addonStartup.json.lz4 from backup - reproduced
Now, to reduce it further I use mozlz4a.py to decompress and re-compress the file.
addonStartup.json.lz4 has the following keys:
- app-profile
- app-system-defaults
- app-builtin (this contains the built-in themes)
Reductions:
- Keeping ONLY app-builtin, after removing app-profile and app-system-defaults - can NOT reproduce
- Keeping ONLY app-builtin, but prepending a dummy key such as
"dummy": {},
- REPRODUCED ( why...? I also tried short and long keys, same result) - Keeping ONLY app-builtin, but prepending
"app-profile": {}
- can NOT reproduce (strange, same as dummy key except key name is "known") - Keeping ONLY app-builtin, but prepending
"app-profile": {"addons":{}}
- can NOT reproduce - Keeping ONLY app-builtin, but prepending
"app-profile": {"addons":{"@dummy":{}}}
- REPRODUCED
I will attach a test case to reproduce the disappearing themes AND the console errors from comment 3.
Comment 11•4 years ago
|
||
Minimal reduction, see comment 10.
STR:
- Create empty directory,
profdir
. - Put this file,
addonStartup.json.lz4
in there. - Start Firefox with this directory, e.g.
firefox --no-remote -profile profdir --offline about:addons
- Click on Themes.
Expected (Firefox 81):
about:addons
shows list of default themes (default, dark, alpenglow, light)
Actual (Firefox 82):
about:addons
only shows Alpenglow theme.
Assignee | ||
Comment 12•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 13•4 years ago
|
||
Too late for 82.
Comment 14•4 years ago
|
||
Comment 15•4 years ago
|
||
Backed out for perma failures.
Log: https://treeherder.mozilla.org/logviewer?job_id=320635934&repo=autoland&lineNumber=6223
Backout: https://hg.mozilla.org/integration/autoland/rev/ae62aa6c36f6f88086d2a91a4a252af280760df8
Assignee | ||
Comment 16•4 years ago
|
||
Comment 17•4 years ago
|
||
Comment 18•4 years ago
|
||
bugherder |
Assignee | ||
Comment 19•4 years ago
|
||
@rpl and I ran through any scenarios that would make us want to uplift this and found no reason, so it will ride the train. Any users on 82 are already affected, and a restart fixes the problem. The issue only affects builtin addons if they change the path they are located at. The next ESR will get both the path change and the fix at the same time.
Updated•4 years ago
|
Description
•