Skip to content

COMException (0x80070490) when subscribing to UserNotificationListener.NotificationChanged in unpackaged WinUI 3 app #6172

@koiseka

Description

@koiseka

Describe the bug

In an unpackaged, self-contained WinUI application, subscribing to UserNotificationListener.NotificationChanged throws a COMException with HRESULT 0x80070490 (Element not found).

Other UserNotificationListener APIs appear to function correctly in the same scenario. Specifically:

  • UserNotificationListener.Current
  • RequestAccessAsync() returns Allowed
  • GetNotificationsAsync() works as expected

However, attempting to register the NotificationChanged event consistently fails at runtime.

Repro project

https://github.com/koiseka/notificationchangedexample-repro

Steps to reproduce the bug

  1. Clone the repro project: https://github.com/koiseka/notificationchangedexample-repro
  2. Open NotificationChangedExample.sln in Visual Studio
  3. Build and run the app (unpackaged, self-contained)
  4. App calls RequestAccessAsync() → returns Allowed
  5. Subscribing to UserNotificationListener.NotificationChanged throws COMException (0x80070490)

Expected behavior

The NotificationChanged event should either:

  • Successfully subscribe and fire when notifications change, or
  • Fail with a clear, documented error indicating that the API is unsupported for unpackaged apps

Screenshots

No response

NuGet package version

Windows App SDK 1.8.4: 1.8.260101001

Packaging type

Unpackaged

Windows version

Windows 11 version 24H2 (26100, June 2025 Update)

IDE

Visual Studio 2022

Additional context

Failing call

listener.NotificationChanged += Listener_NotificationChanged;

Throws immediately with:

System.Runtime.InteropServices.COMException (0x80070490): Element not found
   at ABI.WinRT.Interop.EventSource`1.Subscribe(TDelegate handler)
   at Windows.UI.Notifications.Management.UserNotificationListener.add_NotificationChanged(...)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions