Can't re-install an extension when the add-ons manager is open in a tab

VERIFIED FIXED in mozilla1.9.3a5

Status

()

Toolkit
Add-ons Manager
--
major
VERIFIED FIXED
8 years ago
7 years ago

People

(Reporter: Shadow912, Assigned: mossop)

Tracking

Trunk
mozilla1.9.3a5
Points:
---
Bug Flags:
in-testsuite +
in-litmus -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [rewrite])

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100511 Minefield/3.7a5pre BuildID: 20100511040317

When drag & drop .xpi file to Minefield's add-ons manager tab or Shredder's window, Software Installation dialog isn't shown.
Thus can't install extension.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100511 Minefield/3.7a5pre BuildID: 20100511040317
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100511 Shredder/3.2a1pre BuildID: 20100511035848 

Reproducible: Always

Steps to Reproduce:
1. select Tools > Add-ons, to open Add-ons Manager.
2. drag & drop .xpi file to Add-ons Manager tab/window
3.
Actual Results:  
do nothing...

Expected Results:  
show Software Installation dialog
(Reporter)

Updated

8 years ago
Version: unspecified → Trunk
Works fine for me with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a5pre) Gecko/20100511 Minefield/3.7a5pre ID:20100511030640

Which extension are you trying to install? Is it compatible with recent Minefield builds?
Blocks: 550048
Whiteboard: [rewrite]

Comment 2

8 years ago
Tested with current 3.7a5pre build (though not hourly).

If I drag an Adblock Plus .xpi file to about:addons (I already have Adblock Plus installation) it marked Adblock Plus wit ha red border and says it's ready to update and I may restart now. (At this point I do miss a possibility to abort the update...)

Therefore: Could not reproduce.

Comment 3

8 years ago
I can confirm it partially.
I can not drag&drop .xpi file to Add-ons Manager window of Shredder/3.2a1pre.

However, The installation succeeded with the following procedure.
drag&drop .xpi file to Message pane, Message tab and/or Message window of Shredder/3.2a1pre and content area and Add-ons Manager of Minefield/3.7a5pre.

Mozilla/5.0 (Windows; U; Windows NT 6.1; WOW64; en-US; rv:1.9.3a5pre) Gecko/20100511 Minefield/3.7a5pre ID:20100511040317

Mozilla/5.0 (Windows; U; Windows NT 6.1; WOW64; en-US; rv:1.9.3a5pre) Gecko/20100511 Shredder/3.2a1pre ID:20100511035848
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

8 years ago
Summary: [Addons] Can't install extension .xpi file by drag & drop to add-ons manager tab/window. → [Addons] Can't install extension .xpi file by drag & drop to add-ons manager window of Shredder
(Reporter)

Comment 4

8 years ago
sorry for less information.
plz try to re-install existing extension of new version.
(e.g. version 0.1 is installed, then DnD version 0.2 to Add-ons Manager.)
then press restart button.
new version extension is not installed.
(Reporter)

Updated

8 years ago
Summary: [Addons] Can't install extension .xpi file by drag & drop to add-ons manager window of Shredder → [Addons] Can't re-install extension .xpi file by drag & drop to add-ons manager tab/window
Blocks: 461973
No longer blocks: 550048
(Assignee)

Comment 5

8 years ago
This happens for any kind of re-install when the add-ons manager is open in a tab. Blair this seems to be because the UI is trying to start the install here: http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/content/extensions.xml#1048

What is that there for?
Summary: [Addons] Can't re-install extension .xpi file by drag & drop to add-ons manager tab/window → Can't re-install an extension when the add-ons manager is open in a tab
Hmm, at one point, I'm sure that was needed. I'm guessing not now. So removing that .install() call fixes it?

Comment 8

8 years ago
Some debug output I see when I try this:

Warning: WARN addons.manager: InstallListener threw exception when calling onInstallEnded: TypeError: this.mControl.onInstallCompleted is not a function

Error: [Exception... "'Error: Cannot start installing from this state' when calling method: [amIWebInstallListener::onWebInstallRequested]"  nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "JS frame :: file:///C:/mozilla/firefox/firefox-3.7a5pre.en-US.win32/firefox/modules/AddonManager.jsm :: AMI_installAddonsFromWebpage :: line 508"  data: no]
Source File: file:///C:/mozilla/firefox/firefox-3.7a5pre.en-US.win32/firefox/modules/AddonManager.jsm
Line: 508

Warning: WARN addons.manager: Failure calling web installer: [Exception... "'Error: Cannot start installing from this state' when calling method: [amIWebInstallListener::onWebInstallRequested]"  nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "JS frame :: file:///C:/mozilla/firefox/firefox-3.7a5pre.en-US.win32/firefox/modules/AddonManager.jsm :: AMI_installAddonsFromWebpage :: line 508"  data: no]

Same results if I try to install from D&D, File->Open, or a bookmark pointing to a local file.
(Assignee)

Comment 9

8 years ago
(In reply to comment #6)
> Hmm, at one point, I'm sure that was needed. I'm guessing not now. So removing
> that .install() call fixes it?

Yeah the code handling install fires onNewInstall and then attempts to start the install itself, by which time the UI has already started it so it fails and cancels the install.

I'll put together a patch to remove the call from the UI side.
(Assignee)

Comment 10

8 years ago
(In reply to comment #8)
> Some debug output I see when I try this:
> 
> Warning: WARN addons.manager: InstallListener threw exception when calling
> onInstallEnded: TypeError: this.mControl.onInstallCompleted is not a function

Incidentally Blair I've seen this error in a few places and appears to be on the UI side though I haven't seen it actually causing any problems yet.
(Assignee)

Comment 11

8 years ago
Created attachment 444907 [details] [diff] [review]
patch rev 1

This probably would have been required back before we had web installs working properly as it is now it is unnecessary.
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #444907 - Flags: review?(bmcbride)
Attachment #444907 - Flags: review?(bmcbride) → review+
(In reply to comment #10)
> (In reply to comment #8)
> > Some debug output I see when I try this:
> > 
> > Warning: WARN addons.manager: InstallListener threw exception when calling
> > onInstallEnded: TypeError: this.mControl.onInstallCompleted is not a function
> 
> Incidentally Blair I've seen this error in a few places and appears to be on
> the UI side though I haven't seen it actually causing any problems yet.

This is interesting - spun it off into bug 565562.
(Assignee)

Comment 13

8 years ago
http://hg.mozilla.org/mozilla-central/rev/5d0c740f9408
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
(Reporter)

Comment 14

8 years ago
I've confirmed this issue was fixed on the Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100514 Minefield/3.7a5pre BuildID: 20100514040039.

Thanks all.
Verified fixed with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100517 Minefield/3.7a5pre (.NET CLR 3.5.30729) ID:20100517035949

What can be covered by automated tests? Do we need any manual test?
Status: RESOLVED → VERIFIED
Flags: in-testsuite?
Flags: in-litmus?
Flags: in-litmus? → in-litmus?(vlad.maniac)
Dave, any chance for an automated test? If not I will have to create a manual one.
(Assignee)

Comment 17

7 years ago
We test installs by drag and drop into the add-ons manager in http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/test/browser/browser_dragdrop.js so I think this is covered already
Flags: in-testsuite? → in-testsuite+
Based on the automated test I don't think we need a manual one.
Flags: in-litmus?(vlad.maniac) → in-litmus-
You need to log in before you can comment on or make changes to this bug.