Open Bug 1887011 Opened 6 months ago Updated 10 days ago

[MSIX] Small delay untill next scren is displayed when setting Firefox as the default browser from the about:welcome page

Categories

(Firefox :: Messaging System, defect, P1)

Desktop
Windows
defect
Points:
3

Tracking

()

REOPENED
Iteration:
132.2 - Sep 16 - Sep 27
Tracking Status
firefox-esr115 --- wontfix
firefox124 --- wontfix
firefox125 --- wontfix
firefox126 --- wontfix

People

(Reporter: atrif, Assigned: pdahiya)

References

(Blocks 1 open bug)

Details

(Keywords: regression, Whiteboard: [fidedi-ope])

Attachments

(3 files, 1 obsolete file)

Attached image msix_delay.gif

Found in

  • 125.0b2 MSIX

Affected versions

  • 125.0a1 (2024-03-21) MSIX
  • 125.0b2 MSIX
  • 124.0 MSIX

Tested platforms

  • Affected platforms: Windows 10x64, Windows 11 (with or without Microsoft one-click rollout)
  • Unaffected platforms: macOS 12, Ubuntu 23.10

Preconditions

  • Chromium or Firefox browser set as the default browser

Steps to reproduce

  1. Open about:welcome and select to set Firefox as the default
  2. Firefox is set as default and the next screen is displayed almost instantly.

Expected result

  • No delay until the next welcome screen is displayed as on normal Firefox builds

Actual result

  • There is a small delay until the next welcome screen is displayed compared with normal Firefox builds.

Regression range

  • It seems that bug 1882413 is not the regressor since this is also reproducible with the Firefox 124.0 MSIX store build. I will search for one ASAP if there is one.

Additional notes

  • Attached a screen recording.
  • The delay is not so noticeable, but it seems this works faster with normal Firefox builds than on MSIX builds.
  • Please close this as invalid if this is the expected result on MSIX builds. Thank you!

I think this is expected. We could collect telemetry on the time taken (but we don't have that data now).

Nicholas, Michael -- if you feel otherwise, please reopen.

Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → WONTFIX

Nicholas, Michael -- NI for maybe reopening (https://bugzilla.mozilla.org/show_bug.cgi?id=1887011#c1).

Flags: needinfo?(nrishel)
Flags: needinfo?(mhughes)

I'm going to reopen given the suspected changes did not land in the earliest affected version identified.

Status: RESOLVED → REOPENED
Flags: needinfo?(nrishel)
Resolution: WONTFIX → ---

Hello! I have made a manual regression range:
Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=6e8fbf07f4b934dd3b727d0f531944ed63c01d07&tochange=8339bdf8fcc85604672251b5c26800f2638e69d2. On good builds the next welcome screen is displayed almost instantly after clicking the save and continue button and on bad builds the next welcome screen is displayed after the Default Apps window is loaded. Unfortunately I don't know which issue is the regressor.

Bug 1829426 looks suspicious based on the pushlog in Comment 4.
Setting this as the regressor as a starting point, but please update if determined to be otherwise.

Hey pdahiya,

Can you think of any way bug 1829426 could have introduced this? If there is a delay from the OS in setting Firefox as the default browser, are we meant to show some sense of progress or to at least disable the "Save and continue" button while it's being done?

Flags: needinfo?(mconley) → needinfo?(pdahiya)

@mconley we did introduce explicit await in handleUserAction but it's hard to say why will it impact MSIX and not regular Firefox builds for windows.

NI QA to help clarify if the delay is noticed when user unchecks 'Set Firefox as default' and checks 'Import' (if possible on MSIX test also for user needing Pin and check 'Pin to Taskbar') Thanks

Flags: needinfo?(pdahiya) → needinfo?(atrif)
Attached image 1887011.gif

(In reply to Punam Dahiya [:pdahiya] from comment #7)

@mconley we did introduce explicit await in handleUserAction but it's hard to say why will it impact MSIX and not regular Firefox builds for windows.

NI QA to help clarify if the delay is noticed when user unchecks 'Set Firefox as default' and checks 'Import' (if possible on MSIX test also for user needing Pin and check 'Pin to Taskbar') Thanks

Hello! It seems that the issue does not reproduce with other options besides the Set Firefox as default. I have made a screen recording with all options and with normal and MSIX builds. Note that this is an almost clean VM where the issue can be seen clearly.
However, I can also reproduce this issue on some stations on regular Firefox builds. If more information is needed please let me know! Thank you!

Flags: needinfo?(atrif)

Thanks @atrif for checking, @mhughes from comment #8 , could this be related to 'Set default' API delay seen for MSIX. Do we know if fix of
https://bugzilla.mozilla.org/show_bug.cgi?id=1868410 brought 'Set to default' one click on MSIX on par with regular Firefox build or some delay is expected? Thanks

I agree with Nick's suggestion in comment #1 that we should collect telemetry on time taken, this can help better inform on the urgency of the fix (one option being making handleUserAction await conditional from about:welcome UI).

The change could have introduced a delay, specifically and only (I believe) on MSIX. Reassigning to Nicholas to determine if further work is required.

Flags: needinfo?(mhughes) → needinfo?(nrishel)

It's not unexpected that pinning may take a bit longer on MSIX (though I suspect there are ways we could speed it up).

:pdahiya :mconley we don't seem to act on the results of pinning or setting default. If there any reason we're awaiting this for UI transitions? Or are we accidentally blocking the main thread? Edit: doesn't look like there's any code path "native code"-side that would block the main thread.

Flags: needinfo?(nrishel)
Flags: needinfo?(pdahiya)
Flags: needinfo?(mconley)

My recent testing on MSIX build shows ~2 seconds delay after click of save and continue (when set default is checked on easy setup screen) before onboarding transition to next screen.

@nrishel as noted in #comment7 we added explicit await to support FXA_SIGNIN_FLOW user action which we can refactor to one of the below options

a) make await conditional for just FXA_SIGNIN_FLOW and rest of the action not wait for result and transition to next screen. Pros is this isolate fix to one action that’s using await . Cons is bug 1829426 fix has been in place for a year and should test rest of user actions for any potential await dependencies

B) implement a MSIX specific fix that removes await only for SET_DEFAULT and PIN_TO_TASKBAR action. Pros limits QA to only these two actions, Cons increase code complexity if in future we see slowness in other calls.

I am inclined to try option a) if we move forward with fixing this in Messaging System about:welcome code base. NI Product to help prioritize this fix thanks!

Flags: needinfo?(vtay)
Flags: needinfo?(vkumar)
Flags: needinfo?(pdahiya)

A third option is...

C) migrate the MSIX set default flow out of Powershell and into e.g. cmd, reg.exe, etc. Powershell startup time (even after optimization) is believed to be the primary source of this delay and the reason we don't see it on non-MSIX builds.

Whiteboard: [fidedi-ope]
Assignee: nobody → erchen

Hi Alexandru, we're attempting to resolve this issue by using an older version (3.0) of powershell to run the set-to-default-browser script. It seems to be improving the response time on my machine compared to the original. I uploaded a patch (https://phabricator.services.mozilla.com/D217850), can you verify if this patch helps? Thank you!

Flags: needinfo?(atrif)
Flags: needinfo?(atrif)
Flags: needinfo?(vtay)
Flags: needinfo?(vkumar)
Flags: needinfo?(mconley)
Flags: needinfo?(atrif)
Attachment #9416339 - Attachment description: WIP: Bug 1887011 - Change msix set to default script from powershell to bash r=nrishel! → WIP: Bug 1887011 - Speed up msix set to default script by using powershell 3.0 r=nrishel!
Attachment #9416339 - Attachment description: WIP: Bug 1887011 - Speed up msix set to default script by using powershell 3.0 r=nrishel! → Bug 1887011 - Speed up msix set to default script by using powershell 3.0 r=nrishel!

(In reply to Eric Chen from comment #15)

Hi Alexandru, we're attempting to resolve this issue by using an older version (3.0) of powershell to run the set-to-default-browser script. It seems to be improving the response time on my machine compared to the original. I uploaded a patch (https://phabricator.services.mozilla.com/D217850), can you verify if this patch helps? Thank you!

Hello! Sorry, I missed the message. Can you please provide a try build? Thank you in advance!

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

Hi, here is the link to the try build (I just started it):
https://treeherder.mozilla.org/jobs?repo=try&revision=acee78a7b7dc181117c6bedfc2ac61de611969e2
Thanks

Flags: needinfo?(erchen) → needinfo?(atrif)
Attached image msix_delay.gif

Hello! I have tried today to compare a normal Firefox build (129.0), a beta MSIX build (129.0b9), and the build provided in comment 17. Unfortunately, the issue is still reproducible. I have attached a screen recording as well. Please let us know if other information is required. Thank you!

Flags: needinfo?(atrif)

:pdahiya I believe we've exhausted investigating option C, at this point we should explore A or B.

Flags: needinfo?(pdahiya)
Attachment #9416339 - Attachment is obsolete: true

Thanks @nrishel updating component so that it shows up in our next triage .

Flags: needinfo?(pdahiya)
Component: Installer → Messaging System
Assignee: erchen → pdahiya
Blocks: fxms-infra
Iteration: --- → 131.2 - Aug 19 - Aug 30
Points: --- → 3
Priority: -- → P1
Iteration: 131.2 - Aug 19 - Aug 30 → 132.1 - Sep 2 - Sep 13
Iteration: 132.1 - Sep 2 - Sep 13 → 132.2 - Sep 16 - Sep 27
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: