Closed Bug 826940 Opened 12 years ago Closed 12 years ago

after updating packaged app, starting app shows old version

Categories

(Firefox OS Graveyard :: General, defect)

x86
All
defect
Not set
normal

Tracking

(blocking-basecamp:+, firefox19 wontfix, firefox20 wontfix, firefox21 fixed, b2g18 fixed)

VERIFIED FIXED
B2G C4 (2jan on)
blocking-basecamp +
Tracking Status
firefox19 --- wontfix
firefox20 --- wontfix
firefox21 --- fixed
b2g18 --- fixed

People

(Reporter: myk, Assigned: fabrice)

References

Details

Attachments

(1 file)

When updating a preloaded packaged app, after the update has been downloaded and applied, and its application.zip file has been placed in the appropriate location in the filesystem (i.e. in path-to-Gaia-profile/webapps/APPID/), overwriting the old application.zip file at that location, starting the app should show you the new version of the application; but instead it shows you the old version. I'm seeing this on recently nightly builds of B2G Desktop, and it's a regression from older builds like 12-13, where this didn't happen. jsmith suggested it might be a duplicate of bug 823189. Note that I do start the app before checking for an update; but I quit the app before actually applying the update. And confirm that it isn't running by checking the task list. After a B2G restart, however, starting the app shows you the new version. I'm encountering this while developing stub apps for preloaded third-party apps that check for and download an update and then quit themselves to allow the system to install it. The stubs will be ineffective if the updates, once applied, cannot be used until B2G is restarted, since the whole point is to get users an updated app as soon as they start the stub for the first time. And we want to ship some of these stubs on Basecamp devices, so requesting blocking-basecamp.
Hmm. Actually now that I read this bug it isn't probably a dupe of the issue seen in bug 823189 after hearing about the "restart" workaround. It actually sounds like the preloaded packaged app equivalent of bug 822870. We currently don't update the app's representation until a restart of the respective app process. That bug was blocking- mainly cause hosted app manifest changes are rare. This is a different case to consider, however. I do wonder if this is a core bug or a Gaia bug. It could potentially be a bug in Gaia.
Summary: after updating preloaded packaged app, starting app shows old version → after updating preloaded packaged app, starting app shows old version until the phone is restarted
Assignee: nobody → fabrice
blocking-basecamp: ? → +
Andrea has cycles, reassigning.
Assignee: fabrice → amarchesini
So apparently this now happens instead of bug 823189 with a regular packaged app update. Restart didn't fix the problem for me, however.
Summary: after updating preloaded packaged app, starting app shows old version until the phone is restarted → after updating preloaded or non preloaded packaged app, starting app shows old version
Note: Fabrice asked me to try the patch in this pastebin <http://pastebin.mozilla.org/2043986>, and it does indeed solve the problem! (In reply to Jason Smith [:jsmith] from comment #3) > So apparently this now happens instead of bug 823189 with a regular packaged > app update. > > Restart didn't fix the problem for me, however. That might be a different bug, as a quick skim of the nsIZipReaderCache code suggests it's an in-memory cache, so it wouldn't survive a restart. Perhaps you're experiencing a side-effect of bug 826935, which causes DOMApplicationRegistry to try to update the app, overwriting application.zip, while the app is still running. That's the kind of thing that fails on Windows systems, where you can't overwrite an open file; but it usually works on *nix systems, so I'm not sure why it would fail on B2G. In any case, try retesting after this bug and that one have been merged to the b2g18 branch, and see if you can still reproduce!
Attached patch patchSplinter Review
I wrote the patch while offline, and it works.
Assignee: amarchesini → fabrice
Attachment #698779 - Flags: review?(myk)
Attachment #698779 - Flags: review?(myk) → review+
Ed - Can you land this on b2g18 as soon as you can? This fixes a very important change that fixes a smoketest for a feature, so I'd like to get this patch in a build as soon as possible.
Flags: needinfo?(emorley)
Summary: after updating preloaded or non preloaded packaged app, starting app shows old version → after updating packaged app, starting app shows old version
Status: NEW → RESOLVED
Closed: 12 years ago
Keywords: verifyme
Resolution: --- → FIXED
Verified - I managed to get an update on Thursday that did update the packaged app to the new version successfully.
Status: RESOLVED → VERIFIED
Keywords: verifyme
QA Contact: jsmith
Target Milestone: --- → B2G C4 (2jan on)
No longer blocks: market-packaged-apps
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: