As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact bugzilla-admin@mozilla.org
Last Comment Bug 769545 - Reinstalling an app previously installed that preloads the appcache uninstalls the app
: Reinstalling an app previously installed that preloads the appcache uninstall...
Status: VERIFIED FIXED
[qa!]
: dataloss
Product: Firefox Graveyard
Classification: Graveyard
Component: Web Apps (show other bugs)
: unspecified
: All Windows 7
: -- normal
: Firefox 16
Assigned To: :Felipe Gomes (needinfo me!)
: Jason Smith [:jsmith]
:
Mentors:
: 770321 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-28 23:01 PDT by Jason Smith [:jsmith]
Modified: 2016-02-04 15:00 PST (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch (865 bytes, patch)
2012-07-03 17:56 PDT, :Felipe Gomes (needinfo me!)
mcastelluccio: review+
Details | Diff | Splinter Review

Description User image Jason Smith [:jsmith] 2012-06-28 23:01:11 PDT
Steps:

1. Install the app with appcache here - http://people.mozilla.com/~fdesre/openwebapps/test.html
2. Cut your internet connection
3. Reinstall the app with appcache here - http://people.mozilla.com/~fdesre/openwebapps/test.html

Expected:

Without a network connection, I'd expect app installation to fail.

Actual:

The app ends up being uninstalled from the user's machine.
Comment 1 User image Jason Smith [:jsmith] 2012-06-28 23:05:58 PDT
Note - this does not happen with an app that is installed from the same hosted origin that does not use appcache preloading.
Comment 2 User image Jason Smith [:jsmith] 2012-07-02 11:21:01 PDT
Change that - this happens also when an internet connection is present.
Comment 3 User image Jason Smith [:jsmith] 2012-07-02 11:23:48 PDT
k9o nomination - We're heavily advocating app cache with web apps, especially with app cache preloading. Having incorrect reinstall behavior isn't a good thing.
Comment 4 User image [:fabrice] Fabrice Desré 2012-07-02 12:04:27 PDT
When you say it uninstalls the app, does it remove it from the DOM registry, or just clears the offline cache?
Comment 5 User image Jason Smith [:jsmith] 2012-07-02 12:40:29 PDT
(In reply to Fabrice Desré [:fabrice] from comment #4)
> When you say it uninstalls the app, does it remove it from the DOM registry,
> or just clears the offline cache?

Uninstall app in this case implies:

- Uninstalling the app natively from the machine (e.g. equilvalent to removing through add or remove programs)

I'm currently digging into if this affects the DOMRegistry as well (e.g. removing it from there on reinstall).
Comment 6 User image Marco Castelluccio [:marco] 2012-07-03 11:00:57 PDT
Jason, does it remove the profile directory?
Comment 7 User image Jason Smith [:jsmith] 2012-07-03 16:46:17 PDT
(In reply to Marco Castelluccio from comment #6)
> Jason, does it remove the profile directory?

Yup. It removes the entire application folder actually, including the profile folder. Marking for re-triage, as we now know this involves data loss, including the app profile.
Comment 8 User image Marco Castelluccio [:marco] 2012-07-03 17:00:38 PDT
In the installer, the only case in which we remove the profile directory is when there is an error during installation. Do you see anything in the error console?
Comment 9 User image Jason Smith [:jsmith] 2012-07-03 17:02:21 PDT
(In reply to Marco Castelluccio from comment #8)
> In the installer, the only case in which we remove the profile directory is
> when there is an error during installation. Do you see anything in the error
> console?

Indeed I do! Here's the error I got:

Timestamp: 7/3/2012 5:01:56 PM
Error: Error installing app: ReferenceError: Cr is not defined
Source File: resource:///modules/WebappsInstaller.jsm
Line: 36
Comment 10 User image :Felipe Gomes (needinfo me!) 2012-07-03 17:56:13 PDT
Created attachment 638928 [details] [diff] [review]
Patch

Thanks Jason and Marco for figuring out the problem
Comment 11 User image :Felipe Gomes (needinfo me!) 2012-07-03 17:59:59 PDT
try build to show up here: http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/felipc@gmail.com-cbf852638a63

(the build also includes the fix for bug 769955)
Comment 12 User image Jason Smith [:jsmith] 2012-07-03 18:05:07 PDT
(In reply to Felipe Gomes (:felipe) from comment #11)
> try build to show up here:
> http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/felipc@gmail.com-
> cbf852638a63
> 
> (the build also includes the fix for bug 769955)

Will this patch fix bug 770321 also? I know this error in the error console also reproduces on Mac as well.
Comment 13 User image Marco Castelluccio [:marco] 2012-07-04 02:33:56 PDT
(In reply to Jason Smith [:jsmith] from comment #12)
> Will this patch fix bug 770321 also? I know this error in the error console
> also reproduces on Mac as well.

Most probably it will fix bug 770321. And it could fix also bug 753660.
Comment 14 User image :Felipe Gomes (needinfo me!) 2012-07-05 15:09:51 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/66a21d10cc58
Comment 15 User image Jason Smith [:jsmith] 2012-07-05 16:47:58 PDT
*** Bug 770321 has been marked as a duplicate of this bug. ***
Comment 17 User image Jason Smith [:jsmith] 2012-07-09 19:04:09 PDT
Verified on Nightly.

Note You need to log in before you can comment on or make changes to this bug.