Open Bug 1896021 Opened 1 year ago Updated 1 year ago

`New private window` opens new Firefox instance (new profile) when using a temporary profile.

Categories

(Firefox :: Shell Integration, defect, P3)

x86_64
Windows 10
defect

Tracking

()

People

(Reporter: nrishel, Unassigned)

Details

STR:

  1. Run Firefox via ./mach run
  2. Right click the taskbar icon and select "New private window"

Expected result:
A new private window is open for the existing Firefox instance.

Observed result:
The profile selector is opened.

Has STR: --- → yes

Also occurs when running ./firefox.exe -profile $(TopObjDir)\tmp\profile-default -wait-for-browser.
Doesn't occur when running ./mach run -r -n (which opens a non-temporary profile).

I suspect this relates to the temporary profile not being registered in a normal fashion.

Summary: `New private window` opens new Firefox instance (new profile) when run from `./mach run`. → `New private window` opens new Firefox instance (new profile) when using a temporary profile.

Dave, I think this is related to the profile chooser. Could you take a look?

Flags: needinfo?(dtownsend)

I cannot reproduce the results from comment 0 precisely. Nick, do you have "Use the selected profile without asking at startup" unchecked in the profile selector? That would be the missing piece.

Ultimately the problem with the menu items in the jump list is that they work by telling Windows to call a Firefox command line when clicked. But the command line doesn't specify a profile to use so they will always attempt to use the default profile, even if that isn't the currently running profile. That is probably the right choice is Firefox isn't already running. But not ideal if Firefox is currently open because you'll click an item and it will open a window in a different profile, or possibly go wrong in other ways.

Flags: needinfo?(dtownsend)

I should add that this problem will get somewhat better with the new profile system

Component: Private Browsing → Shell Integration

(In reply to Dave Townsend [:mossop] from comment #3)

I cannot reproduce the results from comment 0 precisely. Nick, do you have "Use the selected profile without asking at startup" unchecked in the profile selector? That would be the missing piece.

Yep, "Use the selected profile without asking at startup" is unchecked.

Severity: -- → S3
Priority: -- → P3

There aren't great options for solving this. The "easiest" would be to on app startup (or any time a different instance of the application gains focus) re-populate the jump list with links including the correct profile path and then on shut down reset the list to use the default profile.

The harder option would be to add some new command line argument that when seen instead of using the default profile first attempts to find the most recently used Firefox instance still running and hand off to that. That has some utility beyond this bug but it's also non-trivial to slot in to our current startup code.

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