Closed Bug 1358336 Opened 7 years ago Closed 7 years ago

Updater reports that 52.0.2 must be installed even though running 53.0

Categories

(Toolkit :: Application Update, defect)

53 Branch
x86_64
macOS
defect
Not set
blocker

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox-esr52 54+ fixed
firefox53 + wontfix
firefox54 --- fixed
firefox55 --- fixed

People

(Reporter: kbrussel, Assigned: robert.strong.bugs)

Details

Attachments

(9 files, 4 obsolete files)

68.55 KB, image/png
Details
94.26 KB, image/png
Details
7.26 KB, patch
molly
: review+
Details | Diff | Splinter Review
3.94 KB, patch
molly
: review+
Details | Diff | Splinter Review
1.38 KB, patch
robert.strong.bugs
: review+
Details | Diff | Splinter Review
4.27 KB, patch
robert.strong.bugs
: review+
Details | Diff | Splinter Review
7.28 KB, patch
robert.strong.bugs
: review+
Details | Diff | Splinter Review
4.27 KB, patch
robert.strong.bugs
: review+
Details | Diff | Splinter Review
7.56 KB, patch
robert.strong.bugs
: review+
Details | Diff | Splinter Review
My Firefox installation on macOS is busted. Every time I launch the browser it prompts me to upgrade to 52.0.2, even though I have upgraded to 53.0. I have deleted the following directories:

/Applications/Firefox.app
~/Library/Application Support/Firefox
~/Library/Application Support/Mozilla
/Library/Application Support/Mozilla

and done a clean re-install of the application. It still prompts for updates every time.

Attached is a screenshot of the Update History preferences pane.

Where is this state stored so that I can delete it?
[Tracking Requested - why for this release]:
Updater failure.
Severity: major → blocker
Component: Installer → Application Update
Product: Firefox → Toolkit
Can you attach a screenshot of the prompt? Thanks!
Flags: needinfo?(kbrussel)
Flags: needinfo?(kbrussel)
I'm on 10.12.4 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0) and I don't see this problem when I restart Firefox 53. 

Andrei can your team try to replicate this issue?
Flags: needinfo?(andrei.vaida)
I'm 99% sure I'm the only user seeing this.

Note that I hadn't launched Firefox in a long time -- possibly not at all during the duration the Firefox 52 release was live.

My main question is where on disk the updater's state is stored so I can manually clean it up. Afterward, I can confirm that this fixed the issue.
I see what the problem is and this has existed for quite some time. It should be fairly easy to fix.

Kenneth, to resolve this issue on your system please remove the files under
~/Library/Caches/Mozilla/updates/<absolute path to Firefox install>
Assignee: nobody → robert.strong.bugs
Status: NEW → ASSIGNED
Flags: needinfo?(andrei.vaida)
Thanks Robert. Confirmed that moving aside that directory works around the problem.

Happy to try to test fixes by moving that directory back in place.
I already have tests for this so local testing shouldn't be necessary.
Attached patch client patch rev1 (obsolete) — Splinter Review
Attached patch test patch rev2 (obsolete) — Splinter Review
Missed an eslint error in the test
Attachment #8862236 - Attachment is obsolete: true
Comment on attachment 8862235 [details] [diff] [review]
client patch rev1

Linux tests are passing... requesting review before the rest finish.
Attachment #8862235 - Flags: review?(mhowell)
Attachment #8862237 - Flags: review?(mhowell)
Comment on attachment 8862235 [details] [diff] [review]
client patch rev1

Going to add a couple of more checks
Attachment #8862235 - Attachment is obsolete: true
Attachment #8862235 - Flags: review?(mhowell)
Attached patch patch rev1 (obsolete) — Splinter Review
Since these are likely to be uplifted I added some checks to be more conservative.
Attachment #8862237 - Attachment is obsolete: true
Attachment #8862237 - Flags: review?(mhowell)
Comment on attachment 8862265 [details] [diff] [review]
patch rev1

Matt, I think this first hunk should also check for STATE_PENDING_ELEVATE
Attached patch patch rev1Splinter Review
I went ahead and added STATE_PENDING_ELEVATE as well.
Attachment #8862265 - Attachment is obsolete: true
Attachment #8862287 - Flags: review?(mhowell)
Attachment #8862266 - Flags: review?(mhowell)
Comment on attachment 8862287 [details] [diff] [review]
patch rev1

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

::: toolkit/mozapps/update/nsUpdateService.js
@@ +1849,5 @@
> +         status == STATE_APPLIED || status == STATE_APPLIED_SERVICE ||
> +         status == STATE_PENDING_ELEVATE)) {
> +      if (Services.vc.compare(update.appVersion, Services.appinfo.version) < 0 ||
> +          Services.vc.compare(update.appVersion, Services.appinfo.version) == 0 &&
> +          update.buildID == Services.appinfo.appBuildID) {

Shouldn't this be <= for the buildID?
Attachment #8862287 - Flags: review?(mhowell) → review+
Attachment #8862266 - Flags: review?(mhowell) → review+
(In reply to Matt Howell [:mhowell] from comment #18)
> Comment on attachment 8862287 [details] [diff] [review]
> patch rev1
> 
> Review of attachment 8862287 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: toolkit/mozapps/update/nsUpdateService.js
> @@ +1849,5 @@
> > +         status == STATE_APPLIED || status == STATE_APPLIED_SERVICE ||
> > +         status == STATE_PENDING_ELEVATE)) {
> > +      if (Services.vc.compare(update.appVersion, Services.appinfo.version) < 0 ||
> > +          Services.vc.compare(update.appVersion, Services.appinfo.version) == 0 &&
> > +          update.buildID == Services.appinfo.appBuildID) {
> 
> Shouldn't this be <= for the buildID?
The format of the Build ID has changed in the past (iirc without it being communicated prior to the change) and there has been discussion as recently as last week of changing it again for dev edition. Because of this I think the risk of a breaking change abandoning clients isn't worth the value it might provide so I only use it for equality checks.
(In reply to Robert Strong [:rstrong] (use needinfo to contact me) from comment #19)
> The format of the Build ID has changed in the past (iirc without it being
> communicated prior to the change) and there has been discussion as recently
> as last week of changing it again for dev edition. Because of this I think
> the risk of a breaking change abandoning clients isn't worth the value it
> might provide so I only use it for equality checks.

Okay, fair enough.
Pushed by rstrong@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d9df81790143
Client code - Bug 1358336 - app update tries to install staged updates for older versions. r=mhowell
https://hg.mozilla.org/integration/mozilla-inbound/rev/2c6d94e3cabd
Test code - Bug 1358336 - app update tries to install staged updates for older versions. r=mhowell
Pushed by rstrong@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8e48a8ed30e7
followup test only fix to handle the different staging location on OS X. r=me
The test needed to account for the different staging location on OS X.
Attachment #8863082 - Flags: review+
Flags: in-testsuite+
Approval Request Comment
[Feature/Bug causing the regression]:
Update staging
[User impact if declined]:
They can end up in a state where they are repeatedly prompted to update if they have an update stage and they manually install a newer version.
[Is this code covered by automated tests?]:
Yes
[Has the fix been verified in Nightly?]:
I have verified it on Nightly
[Needs manual test from QE? If yes, steps to reproduce]: 
No
[List of other uplifts needed for the feature/fix]:
None
[Is the change risky?]:
Not very much.
[Why is the change risky/not risky?]:
It uses the same checks as used for regular updates which has been around a very long time for staged updates.
[String changes made/needed]:
None
Attachment #8863552 - Flags: review+
Attachment #8863552 - Flags: approval-mozilla-beta?
This also needs the test changes from bug 1354850
Attachment #8863553 - Flags: review+
I have also built beta with this patch and all update tests pass.
[Approval Request Comment]
If this is not a sec:{high,crit} bug, please state case for ESR consideration:
Updates can be broken in a state where they are unable to update.
User impact if declined: 
They can end up in a state where they are repeatedly prompted to update if they have an update stage and they manually install a newer version.
[Is this code covered by automated tests?]:
Yes
Fix Landed on Version:
55
Risk to taking this patch (and alternatives if risky): 
Not very much. It uses the same checks as used for regular updates which has been around a very long time for staged updates.
String or UUID changes made by this patch: 
None

I have also built esr52 with this patch and all update tests pass.
Attachment #8863554 - Flags: review+
Attachment #8863554 - Flags: approval-mozilla-esr52?
This also needs the test changes from bug 1354850
Attachment #8863555 - Flags: review+
Comment on attachment 8863552 [details] [diff] [review]
client patch for beta - rstrong will land this with other patches

Fix a repeatedly prompted to update issue. Beta54+. Should be in 54 beta 5.
Attachment #8863552 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment on attachment 8863552 [details] [diff] [review]
client patch for beta - rstrong will land this with other patches

I will land this with other patches
Attachment #8863552 - Attachment description: client patch for beta → client patch for beta - rstrong will land this with other patches
Comment on attachment 8863554 [details] [diff] [review]
client patch for esr52

Fixes a problem in the update logic, a core scenario for us, ESR52.2+
Attachment #8863554 - Flags: approval-mozilla-esr52? → approval-mozilla-esr52+
(In reply to Robert Strong PTO 5/5 [:rstrong] (use needinfo to contact me) from comment #25)
> [Is this code covered by automated tests?]:
> Yes
> [Has the fix been verified in Nightly?]:
> I have verified it on Nightly
> [Needs manual test from QE? If yes, steps to reproduce]: 
> No

Setting qe-verify- based on Robert's assessment on manual testing needs and the fact that this fix has automated coverage.
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: