Closed Bug 838102 Opened 13 years ago Closed 13 years ago

activities are saved in the manifest with a modified href after an update

Categories

(Core Graveyard :: DOM: Apps, defect)

ARM
Gonk (Firefox OS)
defect
Not set
major

Tracking

(blocking-b2g:tef+, firefox19 wontfix, firefox20 wontfix, firefox21 fixed, b2g18 fixed, b2g18-v1.0.0 fixed, b2g18-v1.0.1 fixed)

VERIFIED FIXED
mozilla21
blocking-b2g tef+
Tracking Status
firefox19 --- wontfix
firefox20 --- wontfix
firefox21 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- fixed
b2g18-v1.0.1 --- fixed

People

(Reporter: julienw, Assigned: fabrice)

References

Details

(Keywords: dataloss)

Attachments

(1 file)

STR: * install app at http://everlong.org/mozilla/activities/ * go to Settings > Device Information and check for an update => the app will automatically update since it is an hosted app without an appcache => the activities href are made absolute * before Bug 834618 is fixed, a reboot would brick the phone. I believe this is what indeed caused Bug 834618. * with Bug 834618 fixed, the activities are wrong and therefore are skipped and not used. To check this is wrong, just check the manifest.webapp file for this app on the phone. I believe this is a very serious bug as this basically breaks activities at update, so nom tef?.
FYI the app will always update as I use the current time as the version property in the manifest.
Keywords: dataloss
I installed and updated you app while having debug logs, and each time I got: I/Gecko (16088): -*-*- Webapps.jsm : _createActivitiesToRegister: http://everlong.org/mozilla/activities/manifest.webapp, activity share, description.href is http://everlong.org/share.html Which looks right.
The logs are ok when you install/update it, but the saved manifest is wrong (as I said in comment 0). You only see this in the logs when you reboot (because we never reload the saved manifest during runtime).
There was no reboot in your STR...
Because this is not necessary to see that the saved manifest.webapp is wrong ! And BTW I _did_ mention a reboot for the "Bug 834618 not fixed" case, maybe this was not clear enough for the "Bug 834618 is fixed" case, sorry for that.
I didn't want to insist on the reboot because I wanted to make it clear that it was wrong after an update, not after a reboot, even if a reboot makes it apparent. Well now you know this.
Summary: activities href are made absolute after an update → activities are saved in the manifest with a modified href after an update
Attached patch patch — — Splinter Review
Assignee: nobody → fabrice
Attachment #710461 - Flags: review?(felash)
Comment on attachment 710461 [details] [diff] [review] patch r=me fixes the bug for me, thanks
Attachment #710461 - Flags: review?(felash) → review+
(In reply to Julien Wajsberg [:julienw] from comment #0) > I believe this is a very serious bug as this basically breaks activities at > update, so nom tef?. Can you better explain the user impact and possible user workarounds?
Well. Say an app has an activity. This app updates. The user reboots. The activity is now invalid and is ignored. The only way to restore it is to uninstall/reinstall the app. But the user doesn't know this as for him nothing appears to be broken. The patch is basically a one liner (the other changes are only to use a var instead of an object property). The error here was that we were updating the activity with its absolute url, but absolute url are invalid for an activity. Instead we're not updating the activity anymore but rather store the absolute url to be used in a local variable. So I believe this patch is very safe.
The impact as Julien says is basically dataloss on the web activity itself, which will impact apps that make use of web activities on marketplace that need to be updated. And I do confirm the fact that we have apps like this on marketplace.
I don't want to insist too much. Still, this is imho a fundamental feature in the FFOS experience.
This absolutely needs to be uplifted.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Keywords: verifyme
QA Contact: jsmith
blocking-b2g: tef? → tef+
Testing with Fabrice's patch on the other packaged app web activities bug he's about to land shows this working fine. Marking as verified.
Status: RESOLVED → VERIFIED
Keywords: verifyme
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: