Closed Bug 2000411 Opened 1 month ago Closed 1 month ago

Opening Firefox from the desktop shortcut no longer works

Categories

(Firefox :: Installer, defect, P1)

Firefox 145
defect

Tracking

()

VERIFIED FIXED
147 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox145 blocking verified
firefox146 + verified
firefox147 + verified

People

(Reporter: knowlden887, Assigned: cdupuis)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [fidedi])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36

Steps to reproduce:

  1. Install Firefox
  2. Open Firefox from Desktop Shortcut
  3. Doesn't start

Actual results:

The procedure entry point GetTempPath2W could not be located in the dynamic link library Firefox.exe

Expected results:

Firefox should start

The Bugbug bot thinks this bug should belong to the 'Firefox::Installer' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Installer
Assignee: nobody → cdupuis
Severity: -- → S1
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P1
Whiteboard: [fidedi]

We want to avoid GetTempPath2W since it is only available on Windows 11.

The only case that they're different is when running as SYSTEM. Most
users won't run the desktop launcher as SYSTEM; for those who do (please
don't), we now hold a handle to the file during the execution to prevent
renaming or symbolic link issues. This should prevent most issues that
would have been resolved by GetTempPath2W.

firefox-beta Uplift Approval Request

  • User impact if declined: The Firefox desktop launcher is a new application that replaces the desktop shortcut. If Firefox is installed (the normal case), it is expected to launch Firefox. It has other functionality if Firefox is not installed (as would happen when a user's Desktop folder is synced to a new machine).

However, in Windows 10 builds that do not include the GetTempPath2W library function, the desktop launcher fails to start due to an unresolved symbol.

  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: On a VM running a Windows 10 build that does not include GetTempPath2W (see below), install Firefox using the stub installer. Observe that the icon on your Desktop is now a .exe rather than a .lnk. Double-click on the desktop icon to launch Firefox.

Expected result: Firefox launches.

From Microsoft's documentation:
When Windows updates released in March 2025 and later are installed, this API will be supported on Windows 10, version 1607 (Build 14393.7876) and later and Windows Server 2016 Build 14393.7876 and later versions. See KB5053594 for more information.

https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppath2w#remarks

  • Risk associated with taking this patch: high
  • Explanation of risk level: The risk is high because the desktop launcher is also used on systems with newer versions of Windows 10 and 11, and these systems are not currently affected by this bug.
  • String changes made/needed: No
  • Is Android affected?: no
Attachment #9527301 - Flags: approval-mozilla-beta?
Flags: qe-verify+

We want to avoid GetTempPath2W since it is only available on Windows 11
and some of the latest versions of Windows 10.

The only case that they're different is when running as SYSTEM. Most
users won't run the desktop launcher as SYSTEM; for those who do (please
don't), we now hold a handle to the file during the execution to prevent
renaming or symbolic link issues. This should prevent any theoretical
issues that could have happened with GetTempPath2W.

Original Revision: https://phabricator.services.mozilla.com/D272905

Attachment #9527301 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch

Comment on attachment 9527301 [details]
Bug 2000411 - Use GetTempPathW instead of GetTempPath2W.

Approved for 145.0.1 dot release

Attachment #9527301 - Flags: approval-mozilla-release+
QA Whiteboard: [qa-ver-needed-c147/b146]

We were able to reproduce the issue on Win10x64 (22H2 with following versions: v1507, v1511, v1607, v19045, v19041 and 21h2 19044.1288) using Firefox stub build 145.0(20251106194447).
Verified as fixed:

  • on the same environments mentioned above using Firefox builds 145.0.1 and 147.0a1.
  • on the latest versions of Win10(22h2 - 19045.6466) on which the issue did not reproduce using Firefox builds 145.0.1 and 147.0a1
    Pending verification on Beta 146.0b5 which includes the fix.
Flags: qe-verify+
QA Contact: mchiorean
Keywords: regression
Regressed by: 1968279

Verified as fixed on Beta 146.0b5 (both stub and .exe) while using Win10x64 (with following versions:1507, 1511, 1607, 19045, but also latest Win10 build).

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-ver-needed-c147/b146] → [qa-ver-done-c147/b146]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: