Closed Bug 1870047 Opened 10 months ago Closed 9 months ago

[msix] Firefox does not show as the default browser on the Preferences page after it is set as the default

Categories

(Firefox :: Installer, defect, P3)

Desktop
Windows
defect

Tracking

()

VERIFIED FIXED
123 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox120 --- unaffected
firefox121 --- unaffected
firefox122 + verified
firefox123 + verified

People

(Reporter: atrif, Assigned: michaelahughesuk)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: perf-alert, regression)

Attachments

(1 obsolete file)

Found in

  • 122.0a1 (2023-12-14)

Affected versions

  • 122.0a1 (2023-12-14)

Tested platforms

  • Affected platforms: Windows 11x64 (23H2)- stations that one click set as default does not work due to Microsoft rollout
  • Unaffected platforms: Windows 11x64 (22H2 and 23H2 where default one click works), macOS 12, Ubuntu 22

Preconditions

  • Normal Firefox or Edge is set as the default browser

Steps to reproduce

  1. Install Firefox MSIX latest Nightly and open it with a new profile.
  2. Go to preferences and click set Firefox MSIX as the default browser.
  3. Click the Set as default button.

Expected result

  • Firefox is your default browser message is displayed in about preferences.

Actual result

  • Firefox is not your default browser message is displayed.

Regression

Additional notes

  • Attached a screen recording: link.
  • This is only reproduced on stations where one click set as default does not work due to Microsoft rollout.
  • When doing this with a fresh installation of MSIX clicking the set as default button from about:preferences page will set Firefox Nightly MSIX as default for .htm and .html and after clicking the Set default button from the Default > Apps will set Firefox Nightly MSIX as default for HTTP and HTTPS. This only happens after the MSIX installation one time. Repeating the steps will reproduce the abovementioned issue but will no longer set the .htm and .html as default after clicking the Set as default button from the preferences page. Please see the attached screen recording for a better understanding.
  • This issue is reproduced even if Normal Firefox or Edge is set as default.
  • Note sometimes there is a default browser was reset to the default notification displayed (it can be seen in the video as well)

:mhughes, since you are the author of the regressor, bug 1868410, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(mhughes)

The bug is marked as tracked for firefox122 (nightly). However, the bug still isn't assigned and has low severity.

:Amir, 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?(ahabibi)
Assignee: nobody → mhughes
Flags: needinfo?(mhughes)
Priority: -- → P3

This is assigned now to me and I will investigate and report back tomorrow. Not sure what the best way to fix this is and what that will entail.

Flags: needinfo?(ahabibi)

Leaving here some notes (note these are notes from the stations where one click set as default does not work due to Microsoft rollout):

From my understanding there are two issues:

  1. one issue is that Firefox sets itself as default for the .htm and .html after clicking the Set as default from the Firefox side (this happens only the first time after a fresh Firefox .msix installation)
  2. the second issue is that the Firefox message does not show as the default browser in about:preferences even if it's set as the default browser.

Installing Firefox 122.0b1.msix from the archive today for the first time reproduced only the first issue from above one time. After changing again the default browser to Edge and back to Firefox.msix I could not reproduce the issues mentioned above on the same Firefox installation.
Note this is .msix installation from the archive, Idk how this behaves with an official Microsoft sore installation.
Please see the attached screen recording that is made on the first ever Firefox 122.0b1 MSIX installation on this Windows 11 station: link1 and link2. Link2 shows that Firefox 122.0b1 MSIX no is no longer hitting issues 1 and 2 after the default browser is changed at least once on the same .msix installation.

However, if Firefox .msix is uninstalled and another browser is set as default and then following the STR from comment 0, all the above-mentioned issues will be back again and the second issue will be reproduced indefinitely. This screen recording is made after uninstalling Firefox 122.0b1 .msix and reinstalling it again: link.

I hope that this helps. Bogdan will retest this on the Microsoft store version as well when he is back from PTO (22 Dec). This was tested on a VM and a native Windows 11 23H2 station and the results were the same.

L.e: The second issue does not reproduce if the default browser was set in Firefox 121.0bx and then updated to 122.0b1 (found when running https://testrail.stage.mozaws.net/index.php?/cases/view/2318754). The message is correctly displayed in about:preferences, Only the first issue is reproduced every time. An archive build was used for this testing.

Set release status flags based on info from the regressing bug 1868410

(In reply to Alexandru Trif, Desktop QA [:atrif] [PTO: 20 Dec- 5 Jan, please ni? :mboldan] from comment #4)

Leaving here some notes (note these are notes from the stations where one click set as default does not work due to Microsoft rollout):

From my understanding there are two issues:

  1. one issue is that Firefox sets itself as default for the .htm and .html after clicking the Set as default from the Firefox side (this happens only the first time after a fresh Firefox .msix installation)
  2. the second issue is that the Firefox message does not show as the default browser in about:preferences even if it's set as the default browser.

Installing Firefox 122.0b1.msix from the archive today for the first time reproduced only the first issue from above one time. After changing again the default browser to Edge and back to Firefox.msix I could not reproduce the issues mentioned above on the same Firefox installation.
Note this is .msix installation from the archive, Idk how this behaves with an official Microsoft sore installation.
Please see the attached screen recording that is made on the first ever Firefox 122.0b1 MSIX installation on this Windows 11 station: link1 and link2. Link2 shows that Firefox 122.0b1 MSIX no is no longer hitting issues 1 and 2 after the default browser is changed at least once on the same .msix installation.

However, if Firefox .msix is uninstalled and another browser is set as default and then following the STR from comment 0, all the above-mentioned issues will be back again and the second issue will be reproduced indefinitely. This screen recording is made after uninstalling Firefox 122.0b1 .msix and reinstalling it again: link.

I hope that this helps. Bogdan will retest this on the Microsoft store version as well when he is back from PTO (22 Dec). This was tested on a VM and a native Windows 11 23H2 station and the results were the same.

L.e: The second issue does not reproduce if the default browser was set in Firefox 121.0bx and then updated to 122.0b1 (found when running https://testrail.stage.mozaws.net/index.php?/cases/view/2318754). The message is correctly displayed in about:preferences, Only the first issue is reproduced every time. An archive build was used for this testing.

Confirming that this happens with on Firefox 122.0b3 from Microsoft Store as well on Windows 11 23h2 with MS rollout in a VM.

This is a revision to remove the functionality that was added over 3 or 4 previous revisions to ultimately use Powershell to set the default browser in MSIX builds. On Windows with a new feature enabled by Microsoft, this results in the HTTP and HTTPS handler being reset to Edge, which is a terrible experience.
Since there's no solve, this is rolling that all back. Done as one set of changes here because it's all deleted code except for one line, a rollback isn't clean, and it would change the Javascript side to be non-async again, which isn't necessary.

This will effectively be reopening Bug 1818418 - Allow to use Windows UserChoice default mechanisms for MSIX packages. All of the bugs created in between were side effects of that change / fix.
I will not reopen that bug because we don't plan to fix it. Microsoft is rolling out new changes that explicitly disallow that mechanism. When it hits 100%, it won't work on any build type (MSIX or not).

Attachment #9371211 - Attachment description: WIP: Bug 1870047, Bug 1870895 - Fix for 1-click set to default on MSIX builds causing the default browser to become Edge → Bug 1870047, Bug 1870895 - Fix for 1-click set to default on MSIX builds causing the default browser to become Edge
Attachment #9371211 - Attachment description: Bug 1870047, Bug 1870895 - Fix for 1-click set to default on MSIX builds causing the default browser to become Edge → WIP: Bug 1870047, Bug 1870895 - Fix for 1-click set to default on MSIX builds causing the default browser to become Edge
Attachment #9371211 - Attachment description: WIP: Bug 1870047, Bug 1870895 - Fix for 1-click set to default on MSIX builds causing the default browser to become Edge → Bug 1870047, Bug 1870895 - Fix for 1-click set to default on MSIX builds causing the default browser to become Edge

Comment on attachment 9371211 [details]
Bug 1870047, Bug 1870895 - Fix for 1-click set to default on MSIX builds causing the default browser to become Edge

Beta/Release Uplift Approval Request

  • User impact if declined: MSIX 1-Click to default will cause Edge to be the default browser on certain versions of Windows
  • 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): The change is simply removing new code added that only affects MSIX builds, and replacing it with an error code, which will trigger the fallback functionality. Should be very low risk.
  • String changes made/needed: None
  • Is Android affected?: No
Attachment #9371211 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Pushed by mhughes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/897f98487b4f Bug 1870895 - Fix for 1-click set to default on MSIX builds causing the default browser to become Edge r=nalexander
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch

Comment on attachment 9371211 [details]
Bug 1870047, Bug 1870895 - Fix for 1-click set to default on MSIX builds causing the default browser to become Edge

Approved for 122.0b7

Attachment #9371211 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

We can still see that Firefox is not shown as the default browser in the about: preferences page even if it is by using the latest Firefox Nightly MSIX (2024-01-08) if the following steps are performed:

  1. Set Edge as the default browser
  2. Install and open Firefox MSIX without this patch (2024-01-04)
  3. Set Firefox MSIX as the default browser (at this step Firefox will not be displayed as default in the Preferences page)
  4. Download the latest Firefox MSIX build and click to update it.
  5. Open the Preferences page and observe that Firefox is not the default browser.
  6. Setting Edge as default and the Firefox MSIX again will still reproduce the issue.

This issue can be seen only if Firefox is updated from a bad build where this issue was already reproduced on stations where Microsoft rollout is active. Uninstalling and reinstalling Firefox MSIX fixes this issue even on an affected Firefox profile.

Otherwise clicking the Make default button with Firefox 123.0a1 (2024-01-08) MSIX fresh installation will now open the Default Apps Window on Windows 10x64 22H2 and Windows 11 23H2 (with and without rollout) and the default browser will be changed to Firefox only after clicking the Make as default button from the Default Apps window changing the (HTTP, HTTPS, HTM and HTML types as expected). Should we file another issue for this specific scenario fpor tracking purposes?

We don’t see any error in the browser console, should we see one there or in some other place? Thank you!

Flags: needinfo?(mhughes)

@atrif I don't think we should add anything to track the case where the user installed the "bad" version of Firefox which then creates issues unless someone sets the default from a good version of Firefox.

If we do more work on making 1-Click Set to Default work again, I'll reopen the original bugs:
Engineering work: https://bugzilla.mozilla.org/show_bug.cgi?id=1818418
QA Tracking bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1857490

Flags: needinfo?(mhughes)

(In reply to Michael Hughes from comment #14)

@atrif I don't think we should add anything to track the case where the user installed the "bad" version of Firefox which then creates issues unless someone sets the default from a good version of Firefox.

If we do more work on making 1-Click Set to Default work again, I'll reopen the original bugs:
Engineering work: https://bugzilla.mozilla.org/show_bug.cgi?id=1818418
QA Tracking bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1857490

Thank you! We also verified this with Firefox 122.0b7 MSIX store version and the Default Apps window is opened on Windows 10x64 22H2 and Windows 11 23H2 (with and without rollout).

From comment 8 it seems that some error should be displayed. We took a look in the browser console but no error is present. Should we also verify this? Thank you!

Flags: needinfo?(mhughes)

The error code I returned indicates a generic failure. It should have maybe generated an error log message from the C++ side and a warning message in the console browser.

It should have also generated telemetry, for BROWSER_SET_DEFAULT_USER_CHOICE_RESULT, of "ErrExeOther".

I will test today or tomorrow and update to confirm that not getting an error code is as expected.

Flags: needinfo?(mhughes)
Blocks: 1870895
No longer blocks: 1818418
See Also: → 1818418

@atrif when I change the code so that it logs it as an error instead of a warning, the log shows up for me.

(Changing this line from warn to error: https://searchfox.org/mozilla-central/source/browser/components/shell/ShellService.sys.mjs#330 and then ./mach build and repackage for msix, install and run, open about:preferences, open the console, then alt-tab back and hit the button to Set to Default, the error message is reported in the console log).

I'm not sure why the warning isn't being showing the browser console, but I'm not worried about it. The functionality is entirely as expected, and the user shouldn't actually see any output anyways really.

(In reply to Michael Hughes from comment #17)

@atrif when I change the code so that it logs it as an error instead of a warning, the log shows up for me.

(Changing this line from warn to error: https://searchfox.org/mozilla-central/source/browser/components/shell/ShellService.sys.mjs#330 and then ./mach build and repackage for msix, install and run, open about:preferences, open the console, then alt-tab back and hit the button to Set to Default, the error message is reported in the console log).

I'm not sure why the warning isn't being showing the browser console, but I'm not worried about it. The functionality is entirely as expected, and the user shouldn't actually see any output anyways really.

Thank you for verifying this! Closing this based on the above comments.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+

(In reply to Pulsebot from comment #12)

https://hg.mozilla.org/releases/mozilla-beta/rev/885ea847d333

== Change summary for alert #41001 (as of Mon, 15 Jan 2024 09:12:40 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new) Performance Profiles
8% google-search LastVisualChange windows10-64-shippable-qr cold fission webrender 252.38 -> 231.91 Before/After

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=41001

Attachment #9371211 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: