Closed Bug 1729307 Opened 3 years ago Closed 3 years ago

[macOS] Firefox creates a new profile on each installation

Categories

(Toolkit :: Startup and Profile System, defect, P3)

Desktop
macOS
defect

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox92 --- unaffected
firefox93 --- affected

People

(Reporter: atrif, Unassigned)

References

(Blocks 1 open bug)

Details

Affected versions

  • 93.0a1 (20210906031657)

Affected platforms

  • macOS 11 Arm
  • macOS 11

Steps to reproduce

  1. Open the .dmg and double-click the installer.
  2. Choose Install and close Firefox after installation.
  3. Delete Firefox from Applications and open the .dmg image again.
  4. Double click on Firefox and install it again.
  5. Open about:profiles.

Expected result

  • Firefox has the same profiles created.

Actual result

  • Firefox creates a new profile for each install.

Regression range

  • Not a regression, this was added by bug 516362.

  • Notes*

  • Attached a screen recording: link.

Has STR: --- → yes

Markus has been looking into the way that we are creating profiles and I can't be certain that the "expected behavior" stated here is actually what is expected to happen. Based on the fact that paths to profiles are getting somewhat randomized, I'm not sure that there has ever been a guarantee that this would reuse a previously created profile. Markus, could you chime in?

Flags: needinfo?(mstange.moz)

This is a bit unexpected. If Firefox is started from the same path, it should be using the same profile by default.

So maybe what's happening is that App Translocation is kicking in and relocating the app bundle even when it is already in the Applications directory. But App Translocation should only occur for apps with the quarantine attribute set.
Maybe the app bundle is still quarantined after it is copied to /Applications? Or maybe only for the first start, until the warning dialog is dismissed? Needs more investigation.

Flags: needinfo?(mstange.moz)

Thank you! I'll take a look tomorrow.

Priority: -- → P3

atrif, to clarify, the new profile that is created isn't actually used when the installed Firefox launches, right? Every time the installed Firefox launches it will (should) use the same profile.

For background: it is true that an extra profile is created when the installer runs, but that profile is never used. The reason that happens is because Firefox needs to create a profile to initialize XPCOM, and we need XPCOM to be initialized to access localization and telemetry in order to open the prompt to ask the user to install. So a "phantom", profile that is never used is an unfortunate side affect of not being able to invoke our running-from-dmg checks early enough to avoid creating that profile. (Unfortunately we also can't trivially reuse that profile when the installed Firefox starts since it is linked to an install path.)

Martin and I thought this was just something we would live with since the user won't see or use the "phantom" profile. If for some reason they are seeing the "phantom" profile (other than by opening the Profile Manager, of course), then we should consider what we can do. Otherwise I think this is WONTFIX.

(In reply to Jonathan Watt [:jwatt] from comment #4)

atrif, to clarify, the new profile that is created isn't actually used when the installed Firefox launches, right? Every time the installed Firefox launches it will (should) use the same profile.

This is correct. The newly created profile is not used. Firefox uses the same profile after installation.

Okay, thanks. I'm going to close this as WONTFIX then for the reasons given in comment 4.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.