Closed Bug 445710 Opened 16 years ago Closed 16 years ago

Add-on upgrade dialog progressbar shows old version number during upgrade

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: thomanie, Assigned: mossop)

References

Details

(Keywords: polish)

Attachments

(4 files)

User-Agent:       Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.8.1.14) Gecko/20080417 Firefox/2.0.0.14
Build Identifier: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.8.1.14) Gecko/20080417 Firefox/2.0.0.14

Happens on multiple later 2.0.0.x versions, as well as Firefox 3.0, on both windows and solaris:

Whenever Firefox detects a newer version of a installed plugin on startup, it will display the upgrade dialog telling you a newer verision exists for <whateverplugin> and you have an older version installed. When you then proceed with the install, the progressbar will display the old(!) version number when installing the upgrade.

Reproducible: Always

Steps to Reproduce:
Example:
MyPlugin 1.0 installed. 
MyPlugin 2.0 detected at startup. 
Upgrade add-on dialog appears - "version 2.0 exists, do you want to upgrade?"
Proceed with upgrade
=> Progress bar now says installing "version 1.0" during upgrade to "version 2.0"
Actual Results:  
The upgraded add-on "version 2.0" is installed correctly, it's only the displayed information that is wrong.

Expected Results:  
It should say installing "version 2.0"
The bug has been fixed in the latest Firefox build, cannot reproduced under following environment:
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9) Gecko/2008052423 Firefox/3.0,
So changing status of the bug to Fixed 
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
If you cannot reproduce it, it is WFM not FIXED.

Reporter, if you still see this problem, can you give a detail reproduce step?
Thanks!

Close as WFM for now since Pei Hu can't reproduce it.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago16 years ago
OS: SunOS → All
Resolution: --- → WORKSFORME
Product: Firefox → Toolkit
First screen shows correctly identified old and new versions of the add-on plugin
Second upgrade dialog shows the incorrect version number during install.
Completion dialog shows new version number correctly
I'm taking the liberty to reopen this bug, as it is still visible with the latest Firefox 3.x. Using the NoScript add-on to reproduce.

Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.0.3) Gecko/2008101514 Firefox/3.0.3

Attaching three screenshots from the upgrade process:
*_1.png shows the old and new versions correctly identified before upgrade.
*_2.png shows the old version number while upgrading to the new version (in the download phase?). This is where the presented info is flawed IMHO.
*_3.png shows the new version number once the upgrade is complete.

My apologies if this turns out the be bug in the add-on plugin, and not in FF.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
Attached patch patch rev 1Splinter Review
Simple patch sets newVersion in the datasource for downloads in the case where the url to download is the detected updated xpi url.
Assignee: nobody → dtownsend
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #353783 - Flags: review?(robert.bugzilla)
Keywords: polish
Comment on attachment 353783 [details] [diff] [review]
patch rev 1

>diff --git a/toolkit/mozapps/extensions/src/nsExtensionManager.js.in b/toolkit/mozapps/extensions/src/nsExtensionManager.js.in
>--- a/toolkit/mozapps/extensions/src/nsExtensionManager.js.in
>+++ b/toolkit/mozapps/extensions/src/nsExtensionManager.js.in
>@@ -5777,22 +5777,27 @@ ExtensionManager.prototype = {
> 
>       txn.addDownload(currItem);
>       urls.push(currItem.xpiURL);
>       hashes.push(currItem.xpiHash ? currItem.xpiHash : null);
>       // if this is an update remove the update metadata to prevent it from
>       // being updated during an install.
>       if (!manager) {
>         var id = currItem.id
>-        ds.setItemProperties(id, {
>+        var props = {
>           availableUpdateURL: null,
>           availableUpdateHash: null,
>           availableUpdateVersion: null,
>           availableUpdateInfo: null
>-        });
>+        };
>+        var updateVersion = ds.getItemProperty(id, "availableUpdateVersion");
>+        var updateURL = ds.getItemProperty(id, "availableUpdateURL");
>+        if (updateURL && (updateURL == currItem.xpiURL) && updateVersion)
nit: does this really need to check updateURL with the updateURL == currItem.xpiURL check?

r=me with that fixed or an explanation
Attachment #353783 - Flags: review?(robert.bugzilla) → review+
(In reply to comment #8)
> >+        };
> >+        var updateVersion = ds.getItemProperty(id, "availableUpdateVersion");
> >+        var updateURL = ds.getItemProperty(id, "availableUpdateURL");
> >+        if (updateURL && (updateURL == currItem.xpiURL) && updateVersion)
> nit: does this really need to check updateURL with the updateURL ==
> currItem.xpiURL check?
> 
> r=me with that fixed or an explanation

No good point.
Pushed: http://hg.mozilla.org/mozilla-central/rev/4063402109f2
Status: ASSIGNED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: