Persona is no longer an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 764172 - [Win & Linux] Reinstalling an App that was previously launched deletes an old profile and re-creates a different app profile
: [Win & Linux] Reinstalling an App that was previously launched deletes an old...
[blocking-webrtdesktop1+], [qa!]
: dataloss
Product: Firefox Graveyard
Classification: Graveyard
Component: Web Apps (show other bugs)
: unspecified
: All All
: P1 major
: Firefox 16
Assigned To: Marco Castelluccio [:marco]
: Jason Smith [:jsmith]
Depends on:
  Show dependency treegraph
Reported: 2012-06-12 14:46 PDT by Jason Smith [:jsmith]
Modified: 2016-02-04 15:00 PST (History)
4 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

Patch (11.30 KB, patch)
2012-06-15 14:52 PDT, Marco Castelluccio [:marco]
no flags Details | Diff | Splinter Review
Patch v2 (12.38 KB, patch)
2012-06-16 04:17 PDT, Marco Castelluccio [:marco]
felipc: review-
Details | Diff | Splinter Review
Patch v3 (16.52 KB, patch)
2012-06-26 14:57 PDT, Marco Castelluccio [:marco]
felipc: review+
Details | Diff | Splinter Review

Description Jason Smith [:jsmith] 2012-06-12 14:46:54 PDT
Steps for Windows and Linux:

1. Go to
2. Install Mozilla QA WebRT Tester
3. Launch the app
4. Go to firefox --> geolocation --> position.html
5. Select remember my choice and make a selection
6. Close the app
7. Reinstall the app
8. Launch the app
9. Go to firefox --> geolocation --> position.html


The choice remembered should still be remembered and reused for geolocation.


A prompt appears again asking for the user to share their location - the choice made originally that was remembered was lost.

Additional Notes:

Only appears to happen on Windows & Linux. Works correctly on Mac.
Comment 1 Marco Castelluccio [:marco] 2012-06-15 14:11:16 PDT
This is most probably caused by Firefox removing the profile directory on apps re-installation (only on Win and Linux).
Comment 2 Jason Smith [:jsmith] 2012-06-15 14:21:40 PDT
(In reply to Marco Castelluccio from comment #1)
> This is most probably caused by Firefox removing the profile directory on
> apps re-installation (only on Win and Linux).

Confirmed on Windows. The profile directory is indeed wiped on a reinstall of a web application previously launched.
Comment 3 Jason Smith [:jsmith] 2012-06-15 14:27:18 PDT
k9o nomination - we shouldn't be wiping profile data on a reinstall - otherwise we lose anything that's tied to an app profile.
Comment 4 Marco Castelluccio [:marco] 2012-06-15 14:52:35 PDT
Created attachment 633687 [details] [diff] [review]
Comment 5 Marco Castelluccio [:marco] 2012-06-16 04:17:44 PDT
Created attachment 633793 [details] [diff] [review]
Patch v2

Why in _createConfigFiles (for Win) there are:
> writer = null;
> factory = null;
Do we need to explicitly set them to null?
Comment 6 :Felipe Gomes (needinfo me!) 2012-06-18 15:24:10 PDT
Comment on attachment 633793 [details] [diff] [review]
Patch v2

Review of attachment 633793 [details] [diff] [review]:

r- for the for..of fix and hoping that we can do the refactor suggested, but everything looks fine

::: browser/modules/WebappsInstaller.jsm
@@ +264,5 @@
> +                           this.configJson,
> +                           this.webappINI
> +                          ];
> +
> +      for(let file in filesToRemove) {

this doesn't work, you need to use for..of instead of to iterate through the array contents instead of the keys.

@@ +295,3 @@
>          this.startMenuShortcut.remove(false);
>        }
> +    } catch(ex) {}

I wasn't gonna request this in this bug, but since there's the for..of thing to fix, I believe we should do it too:

I think we can make this whole section a bit cleaner by doing:

let filesToRemove = [this.desktopShortcut, this.startMenuShortcut];

if (keepProfile) {
} else {
  // Remove everything

... for loop to remove files ...
Comment 7 Marco Castelluccio [:marco] 2012-06-26 14:57:44 PDT
Created attachment 636888 [details] [diff] [review]
Patch v3
Comment 8 :Felipe Gomes (needinfo me!) 2012-06-27 17:23:18 PDT
Comment 9 Ed Morley [:emorley] 2012-06-28 01:08:36 PDT
Comment 10 Jason Smith [:jsmith] 2012-06-28 22:53:04 PDT
Looks good on Windows.
Comment 11 Jason Smith [:jsmith] 2012-06-28 23:22:06 PDT
Looks good on Linux. Verified.

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