Closed Bug 862894 Opened 11 years ago Closed 9 years ago

Installing older version Maintenance Service makes control panel information display with the older version

Categories

(Toolkit :: Application Update, defect)

23 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: tanstaafl, Assigned: bbondy)

References

Details

Attachments

(1 file, 3 obsolete files)

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:20.0) Gecko/20100101 Firefox/20.0
Build ID: 20130409194949

Steps to reproduce:

1. Install Release version of Firefox (20.0.1)

Note that Maintenance Service version is 20.0.1

2. Install Thunderbird ESR 17.0.5

Note that Maintenance Service is downgraded to 17.0.5


Actual results:

Maintenance Service was downgraded


Expected results:

If the Maintenance Service is intended to be shared, an older version should never replace a newer version.

Thunderbird installer should have seen that there was a newer version of the Maintenance Service already installed and just registered itself with it rather than replacing the newer version with an older version.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
I think this should be investigated because it sounds like a bug unrelated to bug 720527. The service should never be downgraded.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: DUPLICATE → ---
This is probably not critical though because the service has hardly been touched since it was originally launched. But definitely we should look into it.
Component: Installer → Application Update
Product: Thunderbird → Toolkit
Version: 17 → 23 Branch
(In reply to Brian R. Bondy [:bbondy] from comment #3)
> This is probably not critical though because the service has hardly been
> touched since it was originally launched. But definitely we should look into
> it.

Also, just because the maintenance service hasn't been touched in a while doesn't mean it won't be in the future, and *that* is when this bug will go from being 'non-critical' to 'deal-breaker'.

Please don't just let this go until it gets to that point... it isn't like it should be that hard to fix.
Agreed, thanks for the input.
How are you determining the version of the service? Which file are you checking?
You should be checking the file version of : "C:\Program Files (x86)\Mozilla Maintenance Service\maintenanceservice.exe"

I just tried with the original steps and it does not replace that file. It seems to be working correctly for me. 

Could you give me the exact installers that can reproduce this that you used?
Hmmm...

Admittedly all I was checking was the version reported in Add/Remove Programs (and/or Programs & Features on Win 7)...

I'll check the version of the actual file tomorrow when I have more time to test it...
Sounds like this is just a problem with reporting in add/remove programs reporting incorrectly.  Thanks for checking into it!

To give you a bit more info the way it works is that the installer (whether older or newer than current) is executed.  That installer copies a new file to maintenanceservice_tmp.exe.  Then a version compare happens between the maintenanceservice.exe and maintenanceservice_tmp files.  If maintenanceservice_tmp.exe is newer it gets renamed to maintenanceservice.exe overwrittinng the other one.  Otherwise the _tmp file is removed on next reboot.

Likely everything is working correct but when executing the installer it shouldn't update the control panel information unless it's newer.
Summary: Installing older version of Thunderbird overwrites newer version of Maintenance Service with older version → Installing older version Maintenance Service makes control panel information display with the older version
(In reply to Brian R. Bondy [:bbondy] from comment #6)
> How are you determining the version of the service? Which file are you
> checking?
> You should be checking the file version of : "C:\Program Files (x86)\Mozilla
> Maintenance Service\maintenanceservice.exe"
> 
> I just tried with the original steps and it does not replace that file. It
> seems to be working correctly for me. 

Ok, right-click > Properties on that file does not give me a way to see the version info.

What I can say is that the maintenanceservice.exe file is dated 4/10/13, and there is still a _tmp.exe file in there that is dated 3/28/13...

So, it appears that you are correct, if these are the correct date/time stamps for the files in question.
(In reply to Charles from comment #9)
> What I can say is that the maintenanceservice.exe file is dated 4/10/13, and
> there is still a _tmp.exe file in there that is dated 3/28/13...

Sorry, that was not clear...

This was after uninstalling both, then installing Firefox 20.1 release and Thunderbird 17.0.5 ESR in that order...

So, the dates of these files isn't the date they were installed, so I presume these are the dates the files were created?
I think this is just a control panel issue, I'm not sure about the dates.
Why can't the file version be obtained?

Right click on maintenanceservice.exe
Go to Properties
Go to the details tab
Check the File version field
Wow... I must have been blind, I swear  there wasn't a Details tab before...

Anyway, yes, confirmed, the version is correct on the file, just not in the Control Panel.

This still needs to be fixed, because it caused me a lot of extra work, uninstalling previous (and now I know good) installs, to change the order of installing (Thunderbird ESR first, then Firefox Release)...

Definitely will confuse people, and since it is a cosmetic issue, hopefully easy to fix (and should be available in a minor point release since it has basically no chance of causing a problem)...

Thanks for nailing this down Brian...
No problem, and agreed, it will be fixed.
Thanks for your help and for the original report.
Confirmed the code blindly updates the registry for control panel version with the version attempted by the way.
This really should be a brain-dead simple fix, no?
It shouldn't be too hard, but I think maybe version numbers can also contain things like b1 or b2 suffixes for beta 1 and beta 2.  So handling for that type may be needed if so.

I'm tempted to think we should just remove the version string from the registry completely, and the source of truth should be the file version itself.
Assignee: nobody → netzen
Attached patch Patch rev1 (obsolete) — Splinter Review
This patch makes it so upon successful upgrades where the binary is actually replaced, we will also now update the registry uninstall key.  This will make it less confusing on the uninstall screen where it displays the wrong version.

Also this got worse in mozilla ~30 from a security issue because we stopped executing the maintenance service installer. So everyone's control panel info is currently out of date.
Attachment #8440226 - Flags: review?(robert.strong.bugs)
Attached patch Patch rev2. (obsolete) — Splinter Review
uninstall app comment update
Attachment #8440226 - Attachment is obsolete: true
Attachment #8440226 - Flags: review?(robert.strong.bugs)
Attachment #8440397 - Flags: review?(robert.strong.bugs)
Attached patch Patch rev2' (obsolete) — Splinter Review
Attachment #8440397 - Attachment is obsolete: true
Attachment #8440397 - Flags: review?(robert.strong.bugs)
Attachment #8440399 - Flags: review?(robert.strong.bugs)
re-ping on this review Robert.

I think it is ready to go. I'll re-push to try / test it before landing after review, since it's been a while, but as I remember it was ready to land.
Comment on attachment 8440399 [details] [diff] [review]
Patch rev2'

+jimm for a review.

Fixes control panel showing wrong info for installed maintenance service version.
This is a visual issue only, there is no problem with the wrong version of the service being installed.
Attachment #8440399 - Flags: review?(jmathies)
(In reply to Brian R. Bondy [:bbondy] from comment #22)
> This is a visual issue only, there is no problem with the wrong version of
> the service being installed.

My understanding is different.

Isn't it actually that, yes, this is a display issue, but it isn't that the wrong/different/older version is installed. My understanding is the old version is not actually installed, but the data in Control Panel is wrongly updated to reflect the older version that, again, was not installed.
(In reply to Charles from comment #23)
> (In reply to Brian R. Bondy [:bbondy] from comment #22)
> > This is a visual issue only, there is no problem with the wrong version of
> > the service being installed.
> 
> My understanding is different.
> 
> Isn't it actually that, yes, this is a display issue, but it isn't that the
> wrong/different/older version is installed.

We actually agree on both of these points, as the message says that you quoted.

> My understanding is the old
> version is not actually installed, but the data in Control Panel is wrongly
> updated to reflect the older version that, again, was not installed.

Correct.
Comment on attachment 8440399 [details] [diff] [review]
Patch rev2'

Review of attachment 8440399 [details] [diff] [review]:
-----------------------------------------------------------------

Can't really test this but Windows bits look clean to me.
Attachment #8440399 - Flags: review?(jmathies) → review+
I'll have a chance to review this tonight as well if that is ok with you
yep np sounds good. Thanks Jim and Robert.
Attachment #8440399 - Flags: review?(robert.strong.bugs) → review+
Attached patch Patch rev3Splinter Review
Carrying forward r+.
Found that the patch only worked on win32 when testing on Oak Nightlies. Win64 wasn't updating the version info.

Uninstall info is always stored in the 32bit registry for us.


1 line change from last patch:

    if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
    1.11                      MAINT_UNINSTALL_KEY, 0,
    1.12 -                    KEY_WRITE,
    1.13 +                    KEY_WRITE | KEY_WOW64_32KEY,
    1.14                      &uninstallKey) != ERROR_SUCCESS) {
    1.15      return FALSE;
    1.16    }
    1.17
Attachment #8440399 - Attachment is obsolete: true
Attachment #8594562 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/5a6154abc833
Status: REOPENED → RESOLVED
Closed: 11 years ago9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
I just noticed that this bug is still present (although it has been set to "resolved fixed"). Maybe it has something to do with the new 64-bit versions of Firefox. Here are the Details:

System: Windows 8.1 (64-bit)
Previously installed:
- Firefox 43.0.2 (64-bit)
- Mozilla Maintenance Service 43.0.2
- Thunderbird 38.5.0

1.) After over-installing Thunderbird 38.5.1, also Mozilla Maintenance Service reports itself as "38.5.1" in the Control Panel. => BUG!

2.) After over-installing Firefox 43.0.4 (64-bit), Mozilla Maintenance Service reports itself as "43.0.4" in the Control Panel.
Please file a new bug.
Done --> see bug 1237858
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: