-
Notifications
You must be signed in to change notification settings - Fork 413
Open
Labels
area-NotificationsToast notification, badges, Live Tiles, push notificationsToast notification, badges, Live Tiles, push notificationsneeds-triage
Description
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.CurrentRequestAccessAsync()returns AllowedGetNotificationsAsync()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
- Clone the repro project: https://github.com/koiseka/notificationchangedexample-repro
- Open
NotificationChangedExample.slnin Visual Studio - Build and run the app (unpackaged, self-contained)
- App calls
RequestAccessAsync()→ returnsAllowed - Subscribing to
UserNotificationListener.NotificationChangedthrowsCOMException (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(...)
riverar
Metadata
Metadata
Assignees
Labels
area-NotificationsToast notification, badges, Live Tiles, push notificationsToast notification, badges, Live Tiles, push notificationsneeds-triage