The default bug view has changed. See this FAQ.

Opening the Add-ons Manager via the -chrome command line switch doesn't load add-on list correctly

RESOLVED FIXED in mozilla23

Status

()

Toolkit
Add-ons Manager
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Liwen Guo, Assigned: sachin)

Tracking

20 Branch
mozilla23
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0
Build ID: 20130307075451

Steps to reproduce:

Some of us prefer the old way of displaying the addon manager in its own dialog instead of another tab. You can do this by calling Firefox from the command line as follows: "firefox -chrome about:addons"

(alternatively, replace "about:addons" with "chrome://mozapps/content/extensions/extensions.xul" – I guess this is the more correct way, though it doesn't affect this bug)


Actual results:

Firefox will open the addon manager, but the addon list (on the right) will either display a loading indicator or simply stay blank (white) indefinitely. This happens regardless of which category (addons, plugins, themes etc.) is initially selected.

The only way to get the list to show up is by clicking any category label, even the selected one.


Expected results:

Just like when opening the addon manager normally (through the menu or with about:addons), the initially selected category should load the addon list immediately.
(Reporter)

Updated

4 years ago
Summary: Opening Addon Manager chrome view doesn't load addon list correctly → Addon Manager chrome view doesn't load addon list correctly
I can reproduce this with Ubuntu. Loading dialog will be displayed when using "firefox -chrome about:addons" until selecting any category.

Reproducible on Firefox 10 as well.
Status: UNCONFIRMED → NEW
Component: Untriaged → Add-ons Manager
Ever confirmed: true
OS: Windows 8 → All
Product: Firefox → Toolkit
Hardware: x86_64 → All
(Assignee)

Comment 2

4 years ago
I was looking into this.
When I tried the same thing, I got this in my console : 

> JavaScript error: chrome://mozapps/content/extensions/extensions.js, line 103: invalid 'in' operand window.arguments[0]

That was because window.arguments[0] was being null.
So, some necessary arguments are not being passed into the new addons manager window created.

Is an openDialog call bringing the new window up?

If someone can guide me further, I could take this up.
Thanks, Sachin :)

In that case, we just need an additional check on that line to ensure window.arguments[0] is an object, but also isn't null.

I wouldn't worry about tracing where the values of window.arguments is coming from. Opening things via the -chrome command line flag is a bit weird, and ancient code - changing that would likely break other things. Instead, we should just have better checks in the Add-ons Manager to ensure the inputs are what we expect.

I also wouldn't worry about adding an automated test for this, as opening it via the -chrome flag isn't something we support (but it'd still be nice to fix, especially since it looks like it'll be an easy fix).
(Assignee)

Comment 4

4 years ago
Created attachment 740065 [details] [diff] [review]
Verfifies that windows.arguments[0] is not null

It works now.
Assignee: nobody → sachinhosmani2
Status: NEW → ASSIGNED
Attachment #740065 - Flags: review?(bmcbride)
Attachment #740065 - Flags: review?(bmcbride) → review+
Summary: Addon Manager chrome view doesn't load addon list correctly → Opening the Add-ons Manager via the -chrome command line switch doesn't load add-on list correctly
https://hg.mozilla.org/integration/fx-team/rev/80a8d5d7db46
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/80a8d5d7db46
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.