MSIX Nightly build not setting .html and .htm file associations.
Categories
(Firefox :: Installer, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox119 | --- | unaffected |
firefox120 | --- | unaffected |
firefox121 | + | disabled |
firefox122 | --- | verified |
People
(Reporter: bmaris, Assigned: nrishel)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression, Whiteboard: [fidedi-ope])
Attachments
(2 files, 1 obsolete file)
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta-
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta-
|
Details | Review |
Found in
- MSIX Firefox 121 Nightly
Affected versions
- MSIX 121 Nightly
Tested platforms
- Affected platforms: Windows 10 22h2.
- Unaffected platforms: MacOS, Ubuntu
Steps to reproduce
- Install MSIX Nightly build
- Make MSIX Nightly default browser
- Very that the default browser is Nightly
- Change the default browser to any other browser (except Nightly)
- Close Nighty build and reopen it (so that the Set as default notification appears)
- Click the Set as default browser from the notification
- Windows settings window opens and MozillaFirefoxNightly is shown as default
- Go to Settings in Nightly and check if its set as default
Expected result
- Nightly is set as default browser
Actual result
- Chrome or any other browser used in step 4 is still the acting default even though in Windows settings MozillaFirefoxNightly is shown as the default one. Having a html file on disk and duble clicking it will open in Chrome or any other browser used before not in Nightly.
Regression range
- Not a regression range since this is a new implementation
Additional information
- This is the error I get in the console:
Error: WDBA nonzero exit code 2147500037: ErrExeOther
WDBAError resource:///modules/ShellService.sys.mjs:491
_handleWDBAResult resource:///modules/ShellService.sys.mjs:460
setAsDefaultUserChoice resource:///modules/ShellService.sys.mjs:262
setDefaultBrowser resource:///modules/ShellService.sys.mjs:329
setAsDefault resource:///modules/ShellService.sys.mjs:342
prompt resource:///modules/BrowserGlue.sys.mjs:5363
ShellService.sys.mjs:330:17
setDefaultBrowser resource:///modules/ShellService.sys.mjs:330
Comment 1•1 year ago
|
||
:bmaris, if you think that's a regression, could you try to find a regression range using for example mozregression?
Assignee | ||
Comment 3•1 year ago
•
|
||
To further drive this, http(s) are correctly set - e.g. launching https://www.mozilla.org
from the run command. The issue is specifically for html and htm file associations, protocol associations are working.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 4•1 year ago
•
|
||
I can reliably recreate this in the Windows Sandbox on Windows 11.
This issue goes away if normal (NSIS) Firefox is set to default before MSIX is set to default. It also returns if the Settings app is used to change the default browser.
Digging in further, just running the relevant reg.exe delete ...
gives the same error. Given this context I think we're hitting a permissions issue that for some reason impacts file associations but not url associations. I believe this permission issue would apply to explorer.exe as that is the context reg.exe is launched under, iiuc for both Firefox MSIX and from Powershell.
Given this context I'm not sure there's much to do here. It's likely preferable to allow the url association change, but still pop open the Settings deep link for the user to set other file associations.
:nalexander thoughts on how to proceed here?
Comment 5•1 year ago
•
|
||
(In reply to Nick Rishel [:nrishel] from comment #4)
I can reliably recreate this in the Windows Sandbox on Windows 11.
This issue goes away if normal (NSIS) Firefox is set to default before MSIX is set to default. It also returns if the Settings app is used to change the default browser.
This happens on a new Windows 11 23H2 VM installation:
- one-click default works as expected if normal (NSIS) Firefox is set to default before MSIX is set to default.
- if for example Edge is set as default clicking the Make default button inside the about:preferences will open the Windows Apps > Default apps > MozillaFirefoxNightly showing a
Set Default
button. So one-click-set-default does not work in this case.
I am not entirely sure if these are the same issues or should we file another one for the Windows 11 23H2 behavior? Thank you!
Assignee | ||
Comment 6•1 year ago
•
|
||
:atrif I believe we're describing the same thing. For the case where Edge is default, if you scroll down in the Windows Apps > Default apps > MozillaFirefoxNightly
you will see http(s) are set to Firefox Nightly, but .htm(l)
are not. The Default Apps Settings page Set Default
button is derived from the http(s)
and .htm(l)
defaults all matching.
Comment 8•1 year ago
|
||
(In reply to Nick Rishel [:nrishel] from comment #6)
:atrif I believe we're describing the same thing. For the case where Edge is default, if you scroll down in the
Windows Apps > Default apps > MozillaFirefoxNightly
you will see http(s) are set to Firefox Nightly, but.htm(l)
are not. The Default Apps Settings pageSet Default
button is derived from thehttp(s)
and.htm(l)
defaults all matching.
Yes, you were correct.
However, we found out that the issue is reproducible If Firefox is set as default by opening Settings > Default Apps and choosing Firefox as the default one. Then clicking the Make default
button from inside the MSIX build will reproduce this issue.
Besides that, we are hitting bug 1852412 on some Windows 11 machines where the one-click set as default does not work with normal and MSIX installs.
Comment 10•1 year ago
|
||
Windows and the Windows Settings UI adds a Deny SetValue
permission/ACL to the relevant UserChoice registry entries. The user
retains the permissions to remove that permission/ACL, but in the MSIX
app package bubble, Firefox itself can't modify the
real (unvirtualized) registry to allow the delete and add to succeed.
To work around, we use powershell -c ...
to open the relevant
registry key especially to modify it's ACL. The existing approach
should then succeed.
While here, we add more logging to this interaction to allow easier
debugging with QA.
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 11•1 year ago
|
||
This commit includes the changes to call into the new asynchronous code to set the browser as default, using powershell.
While here, we add more logging to this interaction to allow easier
debugging with QA.
Depends on D194828
Updated•1 year ago
|
Comment 12•1 year ago
|
||
Comment 13•1 year ago
|
||
Backed out for build bustages on SetDefaultBrowser.cpp.
Failure log: https://treeherder.mozilla.org/logviewer?job_id=438347596&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/b58470afb3d9f09bd364fc18c959e0939065f20b
Updated•1 year ago
|
Comment 14•1 year ago
|
||
Comment 15•1 year ago
|
||
NOTE!
Windows 11, version 22H2 and older versions of Windows: triggering the Set to Default functionality will set the Firefox as the default http & https protocol handler, and as the file handler for .htm and .html files.
Windows versions newer than Windows 11, version 22H2: triggering the Set to Default functionality doesn't work (because of the OS) and the Default Apps system window will popup and give the user the option to set Firefox as the default browser.
The above is expected and known. This fix is being introduced for the slightly older versions of Windows, in the MSIX builds.
QA / Repro:
To confirm that setting the default worked:
- open the "Defaults Apps" window (use the Windows menu on the taskbar)
- type the following types in the search box (that says "Enter a file type or link type") and confirm that the newly installed app is set as the handler:
- https
- http
- .html
- .htm
It can be difficult to see that the changes worked, if you have multiple versions of Firefox installed. So before doing any testing, and between runs of different tests, it is probably best to use the Default Apps window to change the default browser to Chrome or Edge. That way, when Firefox is changed to the default, you'll be able to tell.
To test the fixes for this bug, there are 4 different scenarios. They should be tested from both a Windows 11, 22H2 or older install of Windows, and a build of Windows that's newer than that. I'll refer to those as "old" windows and "new" windows from here on out.
From about:welcome
On "old" Windows:
- make sure that Chrome or Edge is set as the default browser first
- install the MSIX package
- start the Firefox app
- if the welcome tour doesn't start automatically, type "about:welcome" in the awesome bar.
- click the option for "Set ______ as default browser"
- click Save and Continue
- Follow the steps listed above to confirm that setting the default worked.
- Confirm that everything worked. Please also report if anything was particularly slow.
On "new" Windows:
- make sure that Chrome or Edge is set as the default browser first
- install the MSIX package
- start the Firefox app
- if the welcome tour doesn't start automatically, type "about:welcome" in the awesome bar.
- click the option for "Set ______ as default browser"
- click Save and Continue
- The Default Apps window should popup automatically, but Firefox should not be set as the default for any of the expected handlers (https, http, .htm, .html)
From about:preferences
On "old" Windows:
- make sure that Chrome or Edge is set as the default browser first
- install the MSIX package if not done already
- start the Firefox app
- type "about:preferences" in the awesome bar.
- click the "Make Default..." option
- Follow the steps listed above to confirm that setting the default worked.
- Confirm that everything worked. Please also report if anything was particularly slow.
On "new" Windows:
- make sure that Chrome or Edge is set as the default browser first
- install the MSIX package if not done already
- start the Firefox app
- type "about:preferences" in the awesome bar.
- click the "Make Default..." option
- The Default Apps window should popup automatically, but Firefox should not be set as the default for any of the expected handlers (https, http, .htm, .html)
From the messaging system
On "old" Windows:
- make sure that Chrome or Edge is set as the default browser first
- install the MSIX package if not done already
- start the Firefox app
- turn on your asrouter:
- go to about:config
- search for and enable this setting: browser.newtabpage.activity-stream.asrouter.devtoolsEnabled
- restart Firefox
- go to "about:newtab#asrouter" in the awesome bar
- Ctrl+F and search for FIREFOX_VIEW_SPOTLIGHT
- Modify the "primary_button" section to this:
"primary_button": {
"label": {
"string_id": "firefoxview-spotlight-promo-primarybutton"
},
"action": {
"type": "SET_DEFAULT_BROWSER",
"navigate": true
}
},
- Click Modify
- With the popup, click "See how it works"
- Follow the steps listed above to confirm that setting the default worked.
- Confirm that everything worked. Please also report if anything was particularly slow.
On "new" Windows:
- make sure that Chrome or Edge is set as the default browser first
- install the MSIX package if not done already
- start the Firefox app
- turn on your asrouter:
- go to about:config
- search for and enable this setting: browser.newtabpage.activity-stream.asrouter.devtoolsEnabled
- restart Firefox
- go to "about:newtab#asrouter" in the awesome bar
- Ctrl+F and search for FIREFOX_VIEW_SPOTLIGHT
- Modify the "primary_button" section to this:
"primary_button": {
"label": {
"string_id": "firefoxview-spotlight-promo-primarybutton"
},
"action": {
"type": "SET_DEFAULT_BROWSER",
"navigate": true
}
},
- Click Modify
- With the popup, click "See how it works"
- The Default Apps window should popup automatically, but Firefox should not be set as the default for any of the expected handlers (https, http, .htm, .html)
Comment 16•1 year ago
|
||
Comment on attachment 9365738 [details]
Bug 1863980 - [msix] Use powershell.exe
to remove Deny SetValue permission in set default. r?nrishel
Beta/Release Uplift Approval Request
- User impact if declined: The MSIX 1-click set to default feature will not set Firefox as the default browser for .htm and .html files.
- 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: See comment number 15 on this 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've tested it thoroughly on Windows. The changes should only affect Windows.
- String changes made/needed:
- Is Android affected?: No
Updated•1 year ago
|
Comment 17•1 year ago
|
||
Comment 18•1 year ago
•
|
||
Backed out comment 17 for bc failures on browser_setDefaultBrowser.js
Failure logs:
- bc failures on browser/components/shell/test/browser_setDefaultBrowser.js - https://treeherder.mozilla.org/logviewer?job_id=438394485&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/e6ae1cdc891e0036686f7795cdd46ef290c727ce
Comment 19•1 year ago
|
||
Comment 20•1 year ago
•
|
||
Comment 14 still had these non-unified build bustages that should be fixed by comment 19.
leave-open until bc failures from comment 17 get fixed and those changes reach m-c.
Comment 21•1 year ago
|
||
I've put the fixes in for the test breaks. I ran multiple try runs on the code before landing, but I guess the tests run didn't include the ones that broke.
I'll get the changes approved first thing tomorrow and then land them.
Comment 22•1 year ago
|
||
bugherder |
Comment 23•1 year ago
|
||
Comment 24•1 year ago
|
||
Updated•1 year ago
|
Comment 25•1 year ago
|
||
bugherder |
Comment 26•1 year ago
|
||
Comment on attachment 9365738 [details]
Bug 1863980 - [msix] Use powershell.exe
to remove Deny SetValue permission in set default. r?nrishel
Approved for 121.0b7, per Slack discussion.
Updated•1 year ago
|
Comment 27•1 year ago
|
||
uplift |
Updated•1 year ago
|
Looked over the scenarios mentioned in Comment 15 on Windows 11 22H2 (22621.2715) and MSIX Nightly 122.0a1 (2023-12-03) and all defaults for https, http, .html, .htm are applied. There were no other issues encountered besides a 4-5 seconds delay in making Firefox the default browser while testing the messaging system method (after clicking the "See how it works" button on the popup).
As for Windows 11 23H2 (22631.2787) and MSIX Nightly 122.0a1 (2023-12-03) only the default apps window is opened while checking all the scenarios.
Comment 29•1 year ago
|
||
Per Slack discussion, backed out for 121.0b8 so it can bake longer and the issue noted in comment 28 can be addressed.
https://hg.mozilla.org/releases/mozilla-beta/rev/843493d0e456170ac7bc6844fb9ef91b4d02e5e9
Updated•1 year ago
|
Updated•1 year ago
|
Comment 30•11 months ago
|
||
I added https://bugzilla.mozilla.org/show_bug.cgi?id=1868410 to track the slowdown mentioned in comment 28.
Updated•11 months ago
|
Updated•11 months ago
|
Comment 31•10 months ago
|
||
Bug 1818418 was backed out for 121.0.1.
https://hg.mozilla.org/releases/mozilla-release/rev/484be1feb7138af0917df98dda85050e0a3317a8
Reporter | ||
Comment 32•10 months ago
|
||
We verified that the 1-click default feature is out of 121.0.1 and that it does not impact in a negative way making the MSIX build as default browser using all the scenarios from comment 15 and others.
Tested using the following OSs:
- Windows 11 23h2 (Microsoft rollout)
- Windows 11 23h2 (NO Microsoft rollout)
- Windows 11 22h2
- Windows 10 64bit 22h2
Since the decision was made to back out the feature and based on the above, marking the bug as Verified Fixed
Description
•