Closed Bug 1774082 Opened 2 years ago Closed 2 years ago

Decouple Windows native notifications AUMID from taskbar/start menu shortcut

Categories

(Toolkit Graveyard :: Notifications and Alerts, task, P3)

Unspecified
Windows

Tracking

(firefox105 fixed)

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: nrishel, Assigned: nrishel)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidedi-notifications] )

Attachments

(2 files, 2 obsolete files)

Relying on the taskbar/start menu shortcut for app branding is unreliable (if the user disables creation of these shortcuts) and in some cases not available (portable installs).

We can achieve the same results with registry tweaks which is already necessary as part of registering a notifications COM server.

n.b. MSIX packages should instead use their app-wide identity which is established as part of the package.

Summary: Decouple windows notifications AUMID from taskbar/start menu shortcut → Decouple Windows native notifications AUMID from taskbar/start menu shortcut
Whiteboard: [fidedi-notifications]
Status: NEW → ASSIGNED
Whiteboard: [fidedi-notifications] → [fidedi-notifications]

For MSIX packages, the package AUMID is used.

For other installed and portable builds, the registry is updated at runtime to populate icons, display name, and the COM server.

The COM server has been implemented using DllSurrogate; this allows us to offload managing the eventloop and lifetime of the COM server to dllhost.exe, and minimizes the added code complexity.

The COM server is loaded as a separate executable from the sending process to prevent issues that would occur when multiple instances of the sending process (e.g. profiles running in parallel) try to stand up parallel COM servers. The separated COM executable also allows for multiple applications to share a common COM server.

Bonus: fixes Bug 1500054, Bug 1766095, and Bug 1743424.

Depends on D142357

For MSIX packages, the package AUMID is used.

For other installed and portable builds, the registry is updated at runtime to populate icons, display name, and the COM server.

The COM server has been implemented using DllSurrogate; this allows us to offload managing the eventloop and lifetime of the COM server to dllhost.exe, and minimizes the added code complexity.

The COM server is loaded as a separate executable from the sending process to prevent issues that would occur when multiple instances of the sending process (e.g. profiles running in parallel) try to stand up parallel COM servers. The separated COM executable also allows for multiple applications to share a common COM server.

Bonus: fixes Bug 1500054, Bug 1766095, and Bug 1743424.

Depends on D142357

For MSIX packages, the package AUMID is used.

For other installed and portable builds, the registry is updated at runtime to populate icons, display name, and the COM server.

The COM server has been implemented using DllSurrogate; this allows us to offload managing the eventloop and lifetime of the COM server to dllhost.exe, and minimizes the added code complexity.

The COM server is loaded as a separate executable from the sending process to prevent issues that would occur when multiple instances of the sending process (e.g. profiles running in parallel) try to stand up parallel COM servers. The separated COM executable also allows for multiple applications to share a common COM server.

Bonus: fixes Bug 1500054, Bug 1766095, and Bug 1743424.

Depends on D142357

Attachment #9285349 - Attachment is obsolete: true
Attachment #9285348 - Attachment is obsolete: true
Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/da2ad41a6d10
Add AUMID handling for Windows toast notifications. r=nalexander
https://hg.mozilla.org/integration/autoland/rev/a9553786b2ee
Make installer and uninstaller add/remove Toast Notification to/from registry. r=bhearsum,nrishel
Pushed by nrishel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7b03aa4c49d1
Add AUMID handling for Windows toast notifications. r=nalexander
https://hg.mozilla.org/integration/autoland/rev/1d9d80c75d9d
Make installer and uninstaller add/remove Toast Notification to/from registry. r=bhearsum,nrishel

Backed out for causing xpcshell failures.

Push with failures

Failure log

Backout link

[task 2022-08-01T22:20:44.086Z] 22:20:44     INFO -  testUnicodeInAssertMethods (__main__.XPCShellTests.runSelfTest.<locals>.XPCShellTestsTests) ... FAIL
[task 2022-08-01T22:20:44.086Z] 22:20:44     INFO -  ======================================================================
[task 2022-08-01T22:20:44.086Z] 22:20:44     INFO -  FAIL: testAddTaskSkip (__main__.XPCShellTests.runSelfTest.<locals>.XPCShellTestsTests)
[task 2022-08-01T22:20:44.087Z] 22:20:44     INFO -  ----------------------------------------------------------------------
[task 2022-08-01T22:20:44.087Z] 22:20:44     INFO -  Traceback (most recent call last):
[task 2022-08-01T22:20:44.087Z] 22:20:44     INFO -    File "Z:\task_1659391378\build\tests\xpcshell\selftest.py", line 1134, in testAddTaskSkip
[task 2022-08-01T22:20:44.088Z] 22:20:44     INFO -      self.assertTestResult(True)
[task 2022-08-01T22:20:44.088Z] 22:20:44     INFO -    File "Z:\task_1659391378\build\tests\xpcshell\selftest.py", line 555, in assertTestResult
[task 2022-08-01T22:20:44.088Z] 22:20:44     INFO -      % ("passed" if expected else "failed", self.log.getvalue()),
[task 2022-08-01T22:20:44.089Z] 22:20:44     INFO -  AssertionError: True != False : Tests should have passed, log:
[task 2022-08-01T22:20:44.089Z] 22:20:44     INFO -  ========
[task 2022-08-01T22:20:44.089Z] 22:20:44     INFO -  Found node at Z:/task_1659391378/fetches\node/node.exe
[task 2022-08-01T22:20:44.089Z] 22:20:44     INFO -  Found moz-http2 at Z:\task_1659391378\build\tests\xpcshell\moz-http2\moz-http2.js
[task 2022-08-01T22:20:44.090Z] 22:20:44     INFO -  Found Z:\task_1659391378\build\tests\xpcshell\http3server\http3server.exe
[task 2022-08-01T22:20:44.090Z] 22:20:44     INFO -  Using Z:\task_1659391378\build\tests\xpcshell\http3server\http3serverDB
[task 2022-08-01T22:20:44.090Z] 22:20:44     INFO -  Running tests sequentially.
[task 2022-08-01T22:20:44.091Z] 22:20:44     INFO -  SUITE-START | Running 1 tests
[task 2022-08-01T22:20:44.091Z] 22:20:44     INFO -  profile dir is C:\Users\task_1659391378\AppData\Local\Temp\xpcshell\xpcshellprofile
[task 2022-08-01T22:20:44.091Z] 22:20:44     INFO -  TEST-START | test_tasks_skip.js
[task 2022-08-01T22:20:44.092Z] 22:20:44     INFO -  TEST-FAIL | test_tasks_skip.js | took 31ms
[task 2022-08-01T22:20:44.092Z] 22:20:44     INFO -  test_tasks_skip.js failed or timed out, will retry.
[task 2022-08-01T22:20:44.092Z] 22:20:44     INFO -  Retrying tests that failed when run in parallel.
[task 2022-08-01T22:20:44.092Z] 22:20:44     INFO -  profile dir is C:\Users\task_1659391378\AppData\Local\Temp\xpcshell\xpcshellprofile
[task 2022-08-01T22:20:44.093Z] 22:20:44     INFO -  TEST-START | test_tasks_skip.js
[task 2022-08-01T22:20:44.093Z] 22:20:44  WARNING -  TEST-UNEXPECTED-FAIL | test_tasks_skip.js | xpcshell return code: 3228369022
[task 2022-08-01T22:20:44.093Z] 22:20:44     INFO -  TEST-INFO took 28ms
[task 2022-08-01T22:20:44.094Z] 22:20:44     INFO -  INFO | Result summary:
[task 2022-08-01T22:20:44.094Z] 22:20:44     INFO -  INFO | Passed: 0
[task 2022-08-01T22:20:44.094Z] 22:20:44  WARNING -  INFO | Failed: 1
[task 2022-08-01T22:20:44.094Z] 22:20:44  WARNING -  One or more unittests failed.
[task 2022-08-01T22:20:44.094Z] 22:20:44     INFO -  INFO | Todo: 0
[task 2022-08-01T22:20:44.095Z] 22:20:44     INFO -  INFO | Retried: 1
[task 2022-08-01T22:20:44.095Z] 22:20:44     INFO -  SUITE-END | took 0s
[task 2022-08-01T22:20:44.095Z] 22:20:44     INFO -  Node moz-http2 server shutting down ...
[task 2022-08-01T22:20:44.096Z] 22:20:44     INFO -  http3Server server shutting down ...
[task 2022-08-01T22:20:44.096Z] 22:20:44     INFO -  ========
[task 2022-08-01T22:20:44.096Z] 22:20:44     INFO -  ======================================================================
[task 2022-08-01T22:20:44.097Z] 22:20:44     INFO -  FAIL: testAddTaskSkipAll (__main__.XPCShellTests.runSelfTest.<locals>.XPCShellTestsTests)
[task 2022-08-01T22:20:44.097Z] 22:20:44     INFO -  ----------------------------------------------------------------------
[task 2022-08-01T22:20:44.097Z] 22:20:44     INFO -  Traceback (most recent call last):
[task 2022-08-01T22:20:44.097Z] 22:20:44     INFO -    File "Z:\task_1659391378\build\tests\xpcshell\selftest.py", line 1143, in testAddTaskSkipAll
[task 2022-08-01T22:20:44.098Z] 22:20:44     INFO -      self.assertTestResult(True)
[task 2022-08-01T22:20:44.098Z] 22:20:44     INFO -    File "Z:\task_1659391378\build\tests\xpcshell\selftest.py", line 555, in assertTestResult
[task 2022-08-01T22:20:44.098Z] 22:20:44     INFO -      % ("passed" if expected else "failed", self.log.getvalue()),
[task 2022-08-01T22:20:44.099Z] 22:20:44     INFO -  AssertionError: True != False : Tests should have passed, log:
[task 2022-08-01T22:20:44.099Z] 22:20:44     INFO -  ========
[task 2022-08-01T22:20:44.099Z] 22:20:44     INFO -  Found node at Z:/task_1659391378/fetches\node/node.exe
[task 2022-08-01T22:20:44.100Z] 22:20:44     INFO -  Found moz-http2 at Z:\task_1659391378\build\tests\xpcshell\moz-http2\moz-http2.js
[task 2022-08-01T22:20:44.100Z] 22:20:44     INFO -  Found Z:\task_1659391378\build\tests\xpcshell\http3server\http3server.exe
[task 2022-08-01T22:20:44.100Z] 22:20:44     INFO -  Using Z:\task_1659391378\build\tests\xpcshell\http3server\http3serverDB
[task 2022-08-01T22:20:44.100Z] 22:20:44     INFO -  Running tests sequentially.
[task 2022-08-01T22:20:44.101Z] 22:20:44     INFO -  SUITE-START | Running 1 tests
[task 2022-08-01T22:20:44.101Z] 22:20:44     INFO -  profile dir is C:\Users\task_1659391378\AppData\Local\Temp\xpcshell\xpcshellprofile
[task 2022-08-01T22:20:44.101Z] 22:20:44     INFO -  TEST-START | test_tasks_skipall.js
[task 2022-08-01T22:20:44.102Z] 22:20:44     INFO -  TEST-FAIL | test_tasks_skipall.js | took 31ms
[task 2022-08-01T22:20:44.102Z] 22:20:44     INFO -  test_tasks_skipall.js failed or timed out, will retry.
[task 2022-08-01T22:20:44.102Z] 22:20:44     INFO -  Retrying tests that failed when run in parallel.
[task 2022-08-01T22:20:44.103Z] 22:20:44     INFO -  profile dir is C:\Users\task_1659391378\AppData\Local\Temp\xpcshell\xpcshellprofile
[task 2022-08-01T22:20:44.103Z] 22:20:44     INFO -  TEST-START | test_tasks_skipall.js
[task 2022-08-01T22:20:44.103Z] 22:20:44  WARNING -  TEST-UNEXPECTED-FAIL | test_tasks_skipall.js | xpcshell return code: 3228369022
[task 2022-08-01T22:20:44.103Z] 22:20:44     INFO -  TEST-INFO took 28ms
[task 2022-08-01T22:20:44.104Z] 22:20:44     INFO -  INFO | Result summary:
[task 2022-08-01T22:20:44.104Z] 22:20:44     INFO -  INFO | Passed: 0
[task 2022-08-01T22:20:44.104Z] 22:20:44  WARNING -  INFO | Failed: 1
[task 2022-08-01T22:20:44.104Z] 22:20:44  WARNING -  One or more unittests failed.
[task 2022-08-01T22:20:44.104Z] 22:20:44     INFO -  INFO | Todo: 0
[task 2022-08-01T22:20:44.105Z] 22:20:44     INFO -  INFO | Retried: 1
[task 2022-08-01T22:20:44.105Z] 22:20:44     INFO -  SUITE-END | took 0s
[task 2022-08-01T22:20:44.105Z] 22:20:44     INFO -  Node moz-http2 server shutting down ...
[task 2022-08-01T22:20:44.106Z] 22:20:44     INFO -  http3Server server shutting down ...
[task 2022-08-01T22:20:44.106Z] 22:20:44     INFO -  ========
[task 2022-08-01T22:20:44.106Z] 22:20:44     INFO -  ======================================================================
[task 2022-08-01T22:20:44.107Z] 22:20:44     INFO -  FAIL: testAddTaskStackTrace (__main__.XPCShellTests.runSelfTest.<locals>.XPCShellTestsTests)
[task 2022-08-01T22:20:44.107Z] 22:20:44     INFO -  ----------------------------------------------------------------------
[task 2022-08-01T22:20:44.107Z] 22:20:44     INFO -  Traceback (most recent call last):
[task 2022-08-01T22:20:44.108Z] 22:20:44     INFO -    File "Z:\task_1659391378\build\tests\xpcshell\selftest.py", line 1125, in testAddTaskStackTrace
[task 2022-08-01T22:20:44.108Z] 22:20:44     INFO -      self.assertInLog("this_test_will_fail")
[task 2022-08-01T22:20:44.108Z] 22:20:44     INFO -    File "Z:\task_1659391378\build\tests\xpcshell\selftest.py", line 574, in assertInLog
[task 2022-08-01T22:20:44.108Z] 22:20:44     INFO -      self._assertLog(s, True)
[task 2022-08-01T22:20:44.109Z] 22:20:44     INFO -    File "Z:\task_1659391378\build\tests\xpcshell\selftest.py", line 567, in _assertLog
[task 2022-08-01T22:20:44.109Z] 22:20:44     INFO -      % (s, "expected" if expected else "not expected", l),
[task 2022-08-01T22:20:44.109Z] 22:20:44     INFO -  AssertionError: True != False : Value this_test_will_fail expected in log:
[task 2022-08-01T22:20:44.110Z] 22:20:44     INFO -  ========
[task 2022-08-01T22:20:44.110Z] 22:20:44     INFO -  Found node at Z:/task_1659391378/fetches\node/node.exe
[task 2022-08-01T22:20:44.110Z] 22:20:44     INFO -  Found moz-http2 at Z:\task_1659391378\build\tests\xpcshell\moz-http2\moz-http2.js
[task 2022-08-01T22:20:44.111Z] 22:20:44     INFO -  Found Z:\task_1659391378\build\tests\xpcshell\http3server\http3server.exe
[task 2022-08-01T22:20:44.111Z] 22:20:44     INFO -  Using Z:\task_1659391378\build\tests\xpcshell\http3server\http3serverDB
[task 2022-08-01T22:20:44.111Z] 22:20:44     INFO -  Running tests sequentially.
[task 2022-08-01T22:20:44.112Z] 22:20:44     INFO -  SUITE-START | Running 1 tests
[task 2022-08-01T22:20:44.112Z] 22:20:44     INFO -  profile dir is C:\Users\task_1659391378\AppData\Local\Temp\xpcshell\xpcshellprofile
[task 2022-08-01T22:20:44.112Z] 22:20:44     INFO -  TEST-START | test_add_task_stack_trace.js
[task 2022-08-01T22:20:44.113Z] 22:20:44     INFO -  TEST-FAIL | test_add_task_stack_trace.js | took 31ms
[task 2022-08-01T22:20:44.113Z] 22:20:44     INFO -  test_add_task_stack_trace.js failed or timed out, will retry.
[task 2022-08-01T22:20:44.113Z] 22:20:44     INFO -  Retrying tests that failed when run in parallel.
[task 2022-08-01T22:20:44.114Z] 22:20:44     INFO -  profile dir is C:\Users\task_1659391378\AppData\Local\Temp\xpcshell\xpcshellprofile
[task 2022-08-01T22:20:44.114Z] 22:20:44     INFO -  TEST-START | test_add_task_stack_trace.js
[task 2022-08-01T22:20:44.114Z] 22:20:44  WARNING -  TEST-UNEXPECTED-FAIL | test_add_task_stack_trace.js | xpcshell return code: 3228369022
[task 2022-08-01T22:20:44.114Z] 22:20:44     INFO -  TEST-INFO took 29ms
[task 2022-08-01T22:20:44.115Z] 22:20:44     INFO -  INFO | Result summary:
[task 2022-08-01T22:20:44.115Z] 22:20:44     INFO -  INFO | Passed: 0
[task 2022-08-01T22:20:44.115Z] 22:20:44  WARNING -  INFO | Failed: 1
[task 2022-08-01T22:20:44.115Z] 22:20:44  WARNING -  One or more unittests failed.
[task 2022-08-01T22:20:44.115Z] 22:20:44     INFO -  INFO | Todo: 0
[task 2022-08-01T22:20:44.116Z] 22:20:44     INFO -  INFO | Retried: 1
[task 2022-08-01T22:20:44.116Z] 22:20:44     INFO -  SUITE-END | took 0s
Flags: needinfo?(nrishel)
Flags: needinfo?(nrishel)
Pushed by nrishel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1bf6f44257d8
Add AUMID handling for Windows toast notifications. r=nalexander
https://hg.mozilla.org/integration/autoland/rev/5d03c530e323
Make installer and uninstaller add/remove Toast Notification to/from registry. r=bhearsum,nrishel

xpcshell failures were due to using Windows 8+ APIs; fixed by loading them dynamically.

Flags: needinfo?(nrishel)
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: