Closed Bug 1851596 Opened 10 months ago Closed 10 months ago

[win11] The make default button only works for the first time on one machine only

Categories

(Firefox :: Shell Integration, defect)

Desktop
Windows 11
defect

Tracking

()

VERIFIED FIXED
119 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 118+ verified
firefox117 + wontfix
firefox118 + verified
firefox119 + verified

People

(Reporter: atrif, Assigned: emk)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files, 2 obsolete files)

Attached image error_default.gif

Found in

  • 118.0b4

Affected versions

  • 119.0a1 (2023-09-04)
  • 118.0b4
  • 117.0
  • 115.2esr

Tested platforms

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

Preconditions

  • Firefox is not the default browser.

Steps to reproduce

  1. Open the Preferences page and click on the Make Default button.
  2. Close the newly opened window.
  3. Click on the Make Default button again.

Expected result

  • The Default Apps window is opened again.

Actual result

  • Nothing happens. Error: WDBA nonzero exit code 2147500037: ErrExeOther ShellService.sys.mjs:567:5 error is displayed in the browser console.

Regression range

Additional notes

  • I have Windows 22H2 (OS Build 22621.2215) Insider Release Preview.
  • We tried on two Windows 11 machines with the same version. It seems that only this station is affected for some reason.

:barret, since you are the author of the regressor, bug 1805509, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(brennie)

The bug is marked as tracked for firefox117 (release), tracked for firefox118 (beta) and tracked for firefox119 (nightly). However, the bug still isn't assigned and has low severity.

:lsmith, could you please find an assignee and increase the severity for this tracked bug? Given that it is a regression and we know the cause, we could also simply backout the regressor. If you disagree with the tracking decision, please talk with the release managers.

For more information, please visit BugBot documentation.

Flags: needinfo?(lsmith)

Can you open regedit.exe and look at the following registry keys:

Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice

Right click on the key in the sidebar and select permissions and see if any of these keys are missing permissions for your user. This happened to me when working on the feature, but I was never able to reproduce.

Deleting any key that is missing permissions for your user (you may have to open regedit as an admin) and then re-setting Firefox as default should fix the issue.

If none of this is the case, please let me know.

Flags: needinfo?(brennie) → needinfo?(atrif)

Redirecting to Firefox :: Shell Integration because this is a problem with the underlying implementation.

Component: Messaging System → Shell Integration
Assignee: nobody → nrishel
Assignee: nrishel → nobody

(In reply to Barret Rennie [:barret] (they/them) from comment #3)

Can you open regedit.exe and look at the following registry keys:

Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice

Right click on the key in the sidebar and select permissions and see if any of these keys are missing permissions for your user. This happened to me when working on the feature, but I was never able to reproduce.

Deleting any key that is missing permissions for your user (you may have to open regedit as an admin) and then re-setting Firefox as default should fix the issue.

If none of this is the case, please let me know.

Hello! I deleted all the registry keys from above and then clicked the Make Default button then the default apps windows application will open as expected, but closing it and clicking again the Make Default button will lead me to the same stage as before. I'm also seeing this error in browser console aside from the error stated in comment 0 after deleting the registry keys:
Error: checkBrowserUserChoiceHashes() failed setAsDefaultUserChoice resource:///modules/ShellService.sys.mjs:286 setDefaultBrowser resource:///modules/ShellService.sys.mjs:376 setDefaultBrowser chrome://browser/content/preferences/main.js:1729 ShellService.sys.mjs:377:17 setDefaultBrowser resource:///modules/ShellService.sys.mjs:377

I have also created a new Windows Administrator online profile and it seems that the issue is reproducing there as well.
Note: I can successfully set Firefox as the default browser if I manually open the Default Apps window and select Firefox for HTTP/HTTPS, .htm/.html. If more information is needed please let me know.

Flags: needinfo?(atrif)

(In reply to Alexandru Trif, Desktop QA [:atrif] from comment #0)

  • Nothing happens. Error: WDBA nonzero exit code 2147500037: ErrExeOther ShellService.sys.mjs:567:5 error is displayed in the browser console.

This error is swallowed here because _handleWDBAResult() is an async function and callers do not await the returned promise.

setAsDefaultUserChoice() and setAsDefaultPDFHandlerUserChoice() should await _handleWDBAResult() to handle exceptions from _handleWDBAResult().

This changeset introduced the bug. The changeset converted a code block to a function call, but it forgot to await the returned promise.

Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Pushed by VYV03354@nifty.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/df18c9cb1487
await _handleWDBAResult. r=nalexander
Blocks: 1852412

Backed out for causing mochitest failure on browser_setDefaultBrowser.js

Backout link

Push with failures

Failure log

Flags: needinfo?(VYV03354)
Pushed by VYV03354@nifty.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/3ef7b4209835
await _handleWDBAResult. r=nalexander
Flags: needinfo?(VYV03354)

Currently fallbacks do not work at all due to changes from bug 1838754. WDBA proxy does not propagate errors from background tasks.

Keywords: leave-open
Attachment #9352373 - Attachment is obsolete: true
Blocks: 1852500

Comment on attachment 9352374 [details]
Bug 1851596 - Propagate exit codes from background tasks. r?nalexander

Revision D187848 was moved to bug 1852500. Setting attachment 9352374 [details] to obsolete.

Attachment #9352374 - Attachment is obsolete: true

I moved D187848 to bug 1852500 to make this bug uplift-able.

Keywords: leave-open
Target Milestone: --- → 119 Branch
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED

Comment on attachment 9352363 [details]
Bug 1851596 - await _handleWDBAResult. r?nalexander

Beta/Release Uplift Approval Request

  • User impact if declined: "Make Default" button will not work if one-click-default fails for some reason.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Correctness fix, only affects the fallback behavior.
  • String changes made/needed: none
  • Is Android affected?: No

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Microsoft may change the user choice hash algorithm any time. It will break "Make Default" functionarity retrospective.
  • User impact if declined: "Make Default" button will not work if one-click-default fails for some reason.
  • Fix Landed on Version: 119
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Correctness fix, only affects the fallback behavior.
Attachment #9352363 - Flags: approval-mozilla-esr115?
Attachment #9352363 - Flags: approval-mozilla-beta?

Since ESR 115 still supprts Windows 7/8.1, we have to skip the test on
thos platforms.

Comment on attachment 9352445 [details]
Bug 1851596 - Skip test on platforms earlier than Windows 10. r=test-only

See comment #18 for ESR Uplift Approval Request.

Since ESR 115 still supports Windows 7/8.1, we have to skip the test on those platforms.

Attachment #9352445 - Flags: approval-mozilla-esr115?
Flags: needinfo?(lsmith)

Comment on attachment 9352363 [details]
Bug 1851596 - await _handleWDBAResult. r?nalexander

Approved for 118.0b8, thanks.

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

Comment on attachment 9352363 [details]
Bug 1851596 - await _handleWDBAResult. r?nalexander

Approved for ESR 115.3, thanks.

Attachment #9352363 - Flags: approval-mozilla-esr115? → approval-mozilla-esr115+
Attachment #9352445 - Flags: approval-mozilla-esr115? → approval-mozilla-esr115+

Nightly also requires a fix in bug 1850631.

Depends on: 1850631
Blocks: 1855340

Hello! Unfortunately, I don't have the same Windows version on my machine (OS Build 22621.2215) because I updated it.

I could reproduce the issue on Windows 11x64 22H2 (22621.2361) with Firefox 119.0a1 (2023-09-11). The Make default button opens the "Default Apps" settings only for the first time when clicked and does nothing after closing the Default Apps window and clicking it again.

This issue (Make default button does not work a second time) is verified fixed with Firefox 115.3.1esr, 118.0.1, and 119.0b3 on the same Windows 11 machine. The Make default button now opens the "Default apps" settings each time the button is clicked.

Note: An error is displayed when clicking the Make default button and the one-click-make-default feature does not work. This issue is investigated in bug 1852412. Closing this issue as verified since the original issue could be reproduced on this Windows version as well.

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

Attachment

General

Created:
Updated:
Size: