Closed Bug 1879963 Opened 1 year ago Closed 1 year ago

[win10] The installer's pin generates a system popup asking for user confirmation

Categories

(Firefox :: Shell Integration, defect, P2)

defect

Tracking

()

VERIFIED FIXED
125 Branch
Tracking Status
firefox124 --- verified
firefox125 --- verified

People

(Reporter: michaelahughesuk, Assigned: gsherman)

References

Details

(Whiteboard: [fidedi])

Attachments

(2 files, 1 obsolete file)

Attached image pic2.jpg

Found in

FX 123

Affected versions

All versions

Tested platforms

Affected platforms: Windows 10x64
Unaffected platforms: macOS 13, Ubuntu 22.1, Windows 11

Preconditions

There is no default user profile, so that the onboarding process happens after Firefox is launched after installation.

Steps to reproduce

Complete the Firefox installation using the default installation pathway

Expected result

Firefox is pinned without the user having to intervene

Actual result

A system popup happens asking the user to confirm they want to pin Firefox.

Regression range

Not a regression

Additional notes

Happens since pinning was introduced into the installer, and only on versions starting with Windows 10 22H2 Build 19045.3996 (https://support.microsoft.com/en-us/topic/january-23-2024-kb5034203-os-build-19045-3996-preview-d9540687-af96-46ba-9192-88fe44833561)

See attached pictures
Severity: -- → S2
Priority: P3 → P2

From @drubino: Note that 19045 is an update for Windows 10 22H2. There will also be a 19044 with a similar UBR number that is an update to 21H2. But I will need to figure out if it contains this change or not. There's no release preview for it AFAIK.

Whiteboard: [fidedi]
See Also: → 1855340

The attached screenshot looks like Windows 11. Could you attach a screenshot on Windows 10? Otherwise this is a duplicate of bug 1855340, I think.

Flags: needinfo?(mhughes)

(In reply to Masatoshi Kimura [:emk] from comment #2)

The attached screenshot looks like Windows 11. Could you attach a screenshot on Windows 10? Otherwise this is a duplicate of bug 1855340, I think.

I don't have a repro case in Windows 10. This is the same as bug 1855340, but for Windows 10 instead of Windows 11. This has been solved already on Windows 11 but now needs to be fixed on Windows 10.

Flags: needinfo?(mhughes)

To fix this, remove pinning as an option from the installer (setup.exe) on older versions of Windows.

To do that, the code in Shared.nsh will have to be modified. Start here: https://searchfox.org/mozilla-central/source/browser/installer/windows/nsis/shared.nsh#1285

NSIS is basically assembly language. You'll have to use the IntCmp in that method: https://nsis.sourceforge.io/Reference/IntCmp
You'll have to add a new label ${pin_lbl}_win10 or something, jump to that when the version is the right number.

Basically, go here: https://searchfox.org/mozilla-central/source/browser/installer/windows/nsis/shared.nsh#1327 and modify the code to:

; If the build number is less than 19045, jump to pinning; if greater, keep testing
IntCmp $2 19045 "" ${pin_lbl}_good ""

; if the major number is less than 22000, then test against windows 10
IntCmp $2 22000 "" ${pin_lbl}_test_win10 ""

${pin_lbl}_test_win11:

; If the build number is less than 22621, jump to pinning; if greater than, no pinning
IntCmp $2 22621 "" ${pin_lbl}_good ${pin_lbl}_bad

; Only if the version is 10.0.22621 do we fall through to here
; If the UBR is greater than or equal to 2361, jump to no pinning
; Otherwise jump to pinning
IntCmp $3 2361 ${pin_lbl}_bad ${pin_lbl}_good ${pin_lbl}_bad

${pin_lbl}_test_win10:

; Only if the version is 10.0.19045 do we fall through to here
; If the UBR is greater than or equal to 3996, jump to no pinning
IntCmp $3 3996 ${pin_lbl}_bad ${pin_lbl}_good ${pin_lbl}_bad

${pin_lbl}_good:

To test that this all works, you'll need to be running on Windows 10. You can do this using a VM. You'll need to test with an older version of Windows 10, to confirm that pinning appears as an option in the advanced options of the installer and leaving pinning on results in the installer pinning to the taskbar. You'll also have to test on the newest version of Windows 10 (to be released tomorrow, newest as of today, Jan 12, 2024). On the newer version of Windows 10, confirm that pinning is not one of the options in the advanced options in the installer. Also test on an older version of Windows 11, to confirm that you didn't break that from working as well. (Michael Hughes can help test this once a diff is up).

Assignee: nobody → gsherman

The fix for this is to remove pinning from the installer on newer Windows 10 versions.

To confirm the fix works and doesn't break anything:

Confirm on a Windows 10 versions older than 10.0.19045 (UBR 3996) that:

  1. The standard installer flow pins Firefox to the taskbar
  2. The custom installer flow gives the user the option to pin to the taskbar

Confirm on a Windows 10 version up to or newer than 10.0.19045 (UBR 3996) that:

  1. The standard installer flow DOES NOT pin Firefox to the taskbar
  2. The custom installer flow DOES NOT give the user the option to pin to the taskbar

Confirm on a Windows 11 versions older than 10.0.22621 (UBR 2361) that:

  1. The standard installer flow pins Firefox to the taskbar
  2. The custom installer flow gives the user the option to pin to the taskbar

Confirm on a Windows 11 version up to or newer than 10.0.22621 (UBR 2361) that:

  1. The standard installer flow DOES NOT pin Firefox to the taskbar
  2. The custom installer flow DOES NOT give the user the option to pin to the taskbar

Note that the newest release of Windows 10 should show the problem with an older installer and should make a new build of the installer not do pinning. The same applies with the newest release of Windows 11.

To check the UBR number, from Admin PowerShell, execute this command:

(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name UBR).UBR

Attachment #9382420 - Attachment description: Bug 1879963 - [win10] The installer's pin generates a system popup asking for user confirmation r=nalexander → Bug 1879963 - Avoid pinning confirmation popup for Windows 10 > 10.0.19045.3996 r=nalexander
Attachment #9382700 - Attachment is obsolete: true
Pushed by mhughes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/946891567e50 Avoid pinning confirmation popup for Windows 10 > 10.0.19045.3996 r=nalexander

Comment on attachment 9382420 [details]
Bug 1879963 - Avoid pinning confirmation popup for Windows 10 > 10.0.19045.3996 r=nalexander

Beta/Release Uplift Approval Request

  • User impact if declined: This removes tab pinning from setup.exe for newer Windows 10. On these newer Windows variants, pinning is confusing. See the image attached to this bug for what it looks like.
    It's a sub-par installation experience for users on those systems.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Described in the bug.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): I tested the logic thoroughly with automated tests locally. They aren't such that I can easily share them with others or I would automate the testing entirely.
  • String changes made/needed: None
  • Is Android affected?: No
Attachment #9382420 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
QA Whiteboard: [qa-triaged]

Comment on attachment 9382420 [details]
Bug 1879963 - Avoid pinning confirmation popup for Windows 10 > 10.0.19045.3996 r=nalexander

Approved for 124.0b5

Attachment #9382420 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Reproduced the issue with Firefox 124.0a1 (2024-02-13) on both Windows 10 and Windows 11.
Issue has been tested and verified fixed on Firefox 125.0a1 (2024-02-27) by comparing with scenarios from comment 6.

Also verified on Firefox 124.0b5 by by comparing with scenarios from comment 6.

Status: RESOLVED → VERIFIED
See Also: → 1884492
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: