Closed Bug 1592968 Opened 4 months ago Closed 3 months ago

The Firefox browser is re-pinned to the taskbar by the experiment after a browser update


(Firefox :: Installer, defect, P1)

Windows 10



Firefox 72
Tracking Status
relnote-firefox --- -
firefox-esr68 --- unaffected
firefox70 --- wontfix
firefox71 --- wontfix
firefox72 --- verified


(Reporter: cosmin.muntean, Assigned: mhowell)


(Blocks 1 open bug)


(Keywords: regression)


(3 files)

[Affected Versions]:

  • Beta 70.0bx
  • Beta 71.0bx

[Affected Platforms]

  • Windows 10 x64


  • In order to reproduce the issue, there are a few setups that need to be done. Here is a doc that describes the setups and the data used in order to reproduce the issue: Gdoc.
  • Have a Firefox Beta 69.0b19 installed.
  • Have an update server set and running as described in the Gdoc.

[Steps to reproduce]:

  1. In the directory where the Firefox Beta 69.0b16 is installed create the "distribution" folder and add the "policies.json" file described in the Gdoc from prerequisites.
    • The "policies.json" file points to the local XML file that enables the browser to be updated to the 70.0b14 version.
  2. Open the browser and update it.
    • The browser will be updated to Firefox 70.0b14 version. It will be recognized as the latest version.
  3. Navigate to "about:config" and add the "installer.taskbarpin.win10.enabled" boolean pref to true.
  4. Restart the Firefox browser.
  5. Right click on the Firefox browser from the taskbar and select the "Unpin from taskbar" option.
  6. Delete the "distribution" folder created in step 1.
    • This will allow the Firefox Beta 70.0b14 to be updated to the latest version 71.0b5.
  7. Restart the browser and update it to the latest version (71.0b5).
  8. Restart the browser and observe the Firefox shortcut from the taskbar.

[Expected results]:

  • The Firefox browser is not pinned to the taskbar.

[Actual results]:

  • The Firefox browser is pinned to the taskbar.


  • Here is a link with the screen recording of the issue: Link.

It sounds like you're saying the problem is that, if you've previously had and then removed a taskbar pin when the experimental code runs, it doesn't detect that you've removed a pin and creates one anyway? Do I understand correctly? If so, that's a known limitation and we can't really do anything about it. We don't have a way to differentiate between "the user used to have a taskbar pin here and removed it" versus "there was never a taskbar pin", because both of those states leave no trace behind; we have no way to tell that the user expressed any preference one way or the other.

When the experimental code runs, we make a record that it has run inside the installation directory, so we shouldn't try to create the pin again if it's been removed after that point.

(In reply to Molly Howell (she/her) [:mhowell] from comment #1)

It sounds like you're saying the problem is that, if you've previously had and then removed a taskbar pin when the experimental code runs, it doesn't detect that you've removed a pin and creates one anyway? Do I understand correctly?

Yes, this is the problem that I have described.

But, there are two easily encounter scenarios when you can observe this behaviour:

  1. The Firefox browser was never pinned to the taskbar and you are enrolled in the treatment branch of the experiment:
  • The experiment will pin the browser but if you unpin it, after another browser update, the experiment will pin the browser to the taskbar again.
  1. The browser is pinned to the taskbar and you are enrolled in the treatment branch of the experiment:
  • The browser will remain pinned but if you unpin it, after another update the experiment will pin the browser to the taskbar again.

Basically, while the user has the "installer.taskbarpin.win10.enabled" pref set to true, a Firefox shortcut will be pinned to the taskbar even if the user unpins it before each update happens.

Thanks for the clarification. A second update creating the pin again after you've removed it should not be happening, there is code that's supposed to be preventing that. I will investigate.

I don't understand why the problem is happening, but I see what's happening and I know how to work around it.

The method the experimental code uses to prevent creating the pin a second time is to record that it's done so already in a file inside the installation directory called the shortcut log. This is where the installer records that it tried to create a taskbar pin in the first place, so the location seemed natural, and this worked fine in the limited testing I did. The problem is that, when run by a copy of the updater that was started from the maintenance service, the helper binary isn't able to get write permission on the shortcut log. I have no idea why not; it should have been started by the updater asInvoker and the updater should have been SYSTEM, and Process Explorer clearly shows that it can write to HKLM, so that's pretty good evidence that it is running elevated. But writing to something in Program Files isn't possible for whatever reason.

I don't feel like I have time to investigate further, so I intend to work around this by moving the taskbar pin record to somewhere in the registry instead (I'm undecided about where yet).

Assignee: nobody → mhowell
Component: Shield Study → Installer
Priority: -- → P1
Product: Shield → Firefox

My initial idea of using the shortcuts log to store this information didn't
work out because the helper, when run by an updater which was run by the
maintenance service, doesn't get write permissions on that file.

That's mysterious, does this mean we're not able to set Migrated anymore in the log on PostUpdate, as well? I'll check, and if so I'll try to get a regression range.

I didn't check; it'd be tough to tell because there aren't a lot of scenarios where we would need to set it there, as opposed to the installer having already written it, because the installer has been doing that for a long time.

Pushed by
Use the registry to record creating a taskbar pin. r=agashlin

That patch didn't actually fix the problem, I'm going to add a followup.

Keywords: leave-open

The previous patch didn't work because the helper running as the unelevated
user is the only one that can read the pref out of its user registry hive,
which is where Firefox has to write it, but then since it's limited it can't
write to either the shortcut log or to HKLM. So everything has to happen in
HKCU so that the unelevated helper can both read and write where it needs to
read and write to.

Pushed by
Followup - Write the pinned to taskbar flag in a place the unelevated helper can write to. r=agashlin
Keywords: leave-open
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 72

I have verified this issue on Windows 10 1809 version, but it's still reproducible. In order to verify if the issue is fixed I have followed the next steps:

  1. Install Nightly 67.0a1.
    • The Nightly is installed and it's not pinned to taskbar.
  2. Using an update server I have updated the Nightly browser to 71.0a1.
    • This is the build that contains the pin code for existing users.
  3. Add the "installer.taskbarpin.win10.enabled" boolean pref to "true".
  4. Using the update server I have updated the Nightly browser to 72.0a1 build from 2019-16-11.
    • This is the build with the fix for this issue.
    • The browser is automatically pinned to the taskbar.
  5. I have unpinned the Nightly browser from the taskbar.
  6. I have updated the Nightly browser to the latest 72.0a1 build from 2019-18-11.
  7. Observe the taskbar.

The Nightly browser is pinned again to the taskbar even if it was previously unpinned (in the build from 2019-16-11).
However, I have unpinned again the browser and I will update it tomorrow when the next build is available, to see if it will be pinned again.

@Molly, are these steps valid in order to verify this issue?

Yeah, it's still broken. The problem this time is that I put the new registry value in a place where Firefox deletes it during the first startup after the update because it thinks it's another pref that it doesn't recognize, because I forgot that I wrote code that does that. So I need to change the registry path again.

Flags: needinfo?(mhowell)
Resolution: FIXED → ---

The previous patch writes the registry value correctly, but the Firefox
InstallerPrefs module deletes it during startup because it's in the
same key where the actual pref values go and the module unconditionally
deletes every value there. So making it only delete values that are
recognizably actual prefs should fix this.

I tested this out a bit with a local build and confirmed that the latest patch prevents the WasPinnedToTaskbar value from being removed. I also checked that if the reflected pref is present, and WasPinnedToTaskbar wasn't there, it gets added (and the pin is attempted, successfully on 1809).

Pushed by
Followup 2 - Only clean installer pref registry values that are pref names. r=agashlin
Closed: 3 months ago3 months ago
Resolution: --- → FIXED

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

Too late for 71 given that we're out of betas.

I have verified this issue and is no longer reproducible on the latest Nightly 72 builds. The Nightly browser is no longer pinned to the taskbar after an update if it was previously unpinned.
I have tested this on Windows 10 x64 1809 and Windows 10 x32 1803. I have also performed testing on Windows 10 x64 1903 to make sure that there are no regressions.


This was nominated for inclusion in release notes.

Release Note Request (optional, but appreciated)
[Why is this notable]: visible change in windows taskbar
[Affects Firefox for Android]: no
[Suggested wording]: Win10 users pre 1903 (windows_build_number < 18362) will see a Firefox shortcut placed on their taskbar. The shortcut can be unpinned and won't be pinned again.
[Links (documentation, blog post, etc)]:

relnote-firefox: --- → ?

Too late for the Fx72 relnotes.

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