Closed Bug 1853144 Opened 1 years ago Closed 1 year ago

WDBA prefixed keys are not removed upon uninstall

Categories

(Toolkit :: Default Browser Agent, defect, P2)

Desktop
Windows
defect

Tracking

()

VERIFIED FIXED
119 Branch
Tracking Status
firefox119 --- wontfix
firefox120 --- fixed

People

(Reporter: acristea, Assigned: nrishel)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Found in

  • Nightly 119.01a (14-09-2023)

Affected versions

  • Nightly 119.01a (14-09-2023)

Tested platforms

  • Affected platforms: Windows 10, Windows 11
  • Unaffected platforms:

Preconditions

  • Have Firefox Nightly installed on a clean machine, with a fresh profile.

Steps to reproduce

  1. Open Registry Editor in Windows search bar.
  2. Go to Firefox install path key (e.g. "Computer\HKEY_CURRENT_USER\Software\Mozilla\Firefox").
  3. Upon install, Default Browser Agent keys are prefixed from the install path.
  4. Uninstall Firefox.
  5. Check the Firefox location path key in Registry Editor.

Expected result

  • The prefixed keys are removed:
    "C:\Program Files\Firefox Nightly|AppLastRunTime"
    "C:\Program Files\Firefox Nightly|DisableDefaultBrowserAgent"
    "C:\Program Files\Firefox Nightly|DisableTelemetry"
    "C:\Program Files\Firefox Nightly|Installed"
    "C:\Program Files\Firefox Nightly|SetDefaultBrowserUserChoice"
    "CurrentDefault"
    "LastPingSentAt"
    "PingCurrentDefault"
    "PrevNotificationAction"

Actual result

  • The prefixed keys are not removed:
    "C:\Program Files\Firefox Nightly|AppLastRunTime"
    "C:\Program Files\Firefox Nightly|DisableDefaultBrowserAgent"
    "C:\Program Files\Firefox Nightly|DisableTelemetry"
    "C:\Program Files\Firefox Nightly|Installed"
    "C:\Program Files\Firefox Nightly|SetDefaultBrowserUserChoice"
    "CurrentDefault"
    "LastPingSentAt"
    "PingCurrentDefault"
    "PrevNotificationAction"

Regression range

  • Not a regression
Attached image Registry.gif
No longer depends on: 1852245
Blocks: 1852245

Haven't verified but I think the issue is the following: the WDBA proxy doesn't wait to exit after invoking the WDBA background task, so the uninstaller continues and likely disrupts the background task before it removes the keys.

Easy fix if this is the case.

Assignee: nobody → nrishel
Status: NEW → ASSIGNED
Priority: -- → P2

This change makes the Default Agent proxy wait for the Default Agent background task to exit before itself exiting.

Additionally this moves the call to run the Default Agent uninstaller earlier to ensure firefox.exe still exists.

Pushed by nrishel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/df36b070d90e Fix registry cleanup for the Default Agent during uninstall. r=bytesized
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch

While investigating the fix for this bug, we found out that the initial scenario is modified, in terms of items available in "Computer\HKEY_CURRENT_USER\Software\Mozilla\Firefox"

In "Computer\HKEY_CURRENT_USER\SOFTWARE\Mozilla\Firefox\Default Browser Agent" we only have :
"C:\Program Files\Firefox Nightly|AppLastRunTime"
"C:\Program Files\Firefox Nightly|DisableDefaultBrowserAgent"
"C:\Program Files\Firefox Nightly|DisableTelemetry"
"C:\Program Files\Firefox Nightly|Installed"
"C:\Program Files\Firefox Nightly|SetDefaultBrowserUserChoice"

The values :"CurrentDefault", "LastPingSentAt", "PingCurrentDefault" and "PrevNotificationAction" are no longer created at Firefox/Nightly install.

Is this expected?
We can confirm that at Uninstall, the entire "Computer\HKEY_CURRENT_USER\SOFTWARE\Mozilla\Firefox\Default Browser Agent" is deleted.

We are waiting for your response for this, in order to verify and close the issue.
Thank you!

Flags: needinfo?(nrishel)

Just verified this is the current (and anticipated) behavior in stable Firefox, so nightly should be fine.

Flags: needinfo?(nrishel)

Upon verifying the issue using Nightly (21-09-2023), on Windows 10 with Intel Core i7, we noticed the prefixed keys still appear in the Registry Editor; after uninstalling Nightly, the prefixed keys are deleted as well.
Please note that we couldn’t reproduce it on all the machines and some of them don’t show the prefixed keys.

Can you please provide the exact expected behavior for all machines?

Flags: needinfo?(nrishel)

Could you clarify, is the observed behavior that on some machines the prefixed registry keys are created on install, and removed on uninstall?

What is probably happening here is the default agent is scheduled to run at the same time it's created, so in some instances Windows might immediately run it and in others it instead waits a day. If that's the case it's not an issue, as long as it's being removed correctly on uninstall.

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

Yes, on some machines the prefixed registry keys are created on install and removed on uninstall.
Can you please confirm if this is the expected behavior?

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

Confirmed expected.

Flags: needinfo?(nrishel)
Status: RESOLVED → VERIFIED

Backed out due to changes breaking both Default Agent telemetry and launching Firefox in response to interaction with the Default Agent notifications.

Depends on D190865

Attachment #9358186 - Attachment description: Backed out changeset df36b070d90e (Bug 1853144) → WIP: Backed out changeset df36b070d90e (Bug 1853144)
Attachment #9358186 - Attachment description: WIP: Backed out changeset df36b070d90e (Bug 1853144) → Backed out changeset df36b070d90e (Bug 1853144)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: