Open Bug 1953696 Opened 1 month ago Updated 1 month ago

Clicking on notifications in the Windows 10 Action Center doesn't appear to do anything

Categories

(Toolkit :: Alerts Service, defect)

defect

Tracking

()

People

(Reporter: darktrojan, Unassigned, NeedInfo)

Details

Attachments

(1 file)

If have a notification and wait long enough that it gets put in the action centre sidebar, clicking on it does nothing but hide the notification. It seems that we get lost returning to the main thread to activate the main window.

Here's what the log says if I show a notification and click on it when it first appears:

[Parent 7044: Main Thread]: D/WindowsAlertsService Adding handler '': [1e0c31bcee0] (now 1 handlers)
[Parent 7044: Main Thread]: D/WindowsAlertsService launchArg: 'program
firefox
profile
D:\mozilla-central\obj-firefox\tmp\profile-default
windowsTag
3080902018
action
{"action":""}'
[Parent 7044: Main Thread]: D/WindowsAlertsService launchArgWithoutAction for 'action1': 'program
firefox
profile
D:\mozilla-central\obj-firefox\tmp\profile-default
windowsTag
3080902018'
console.log: null "alertshow" "test-id"
[Parent 7044: Main Thread]: D/WindowsAlertsService Iterating 1 handlers
[Parent 7044: Main Thread]: D/WindowsAlertsService Comparing external windowsTag '3080902018' to handled windowsTag '3080902018'
[Parent 7044: Main Thread]: D/WindowsAlertsService External windowsTag '3080902018' is handled by handler [1e0c31bcee0]
[Parent 7044: BgIOThreadPool #2]: I/WindowsAlertsService Pipe wait signaled
[Parent 7044: BgIOThreadPool #2]: I/WindowsAlertsService SetForegroundWindow permission granted to our window.
[Parent 7044: Main Thread]: I/WindowsAlertsService OnActivate
[Parent 7044: Main Thread]: I/WindowsAlertsService OnActivate: arguments: program
firefox
profile
D:\mozilla-central\obj-firefox\tmp\profile-default
windowsTag
3080902018
action
{"action":""}
console.log: null "alertclickcallback" "test-id"
console.log: null "alertfinished" "test-id"

And here's what it says if I wait until the notification is put in the Action Center (or it's in focus mode and the notification goes straight there):

[Parent 7044: Main Thread]: D/WindowsAlertsService Adding handler '': [1e0bf339700] (now 1 handlers)
[Parent 7044: Main Thread]: D/WindowsAlertsService launchArg: 'program
firefox
profile
D:\mozilla-central\obj-firefox\tmp\profile-default
windowsTag
2670734490
action
{"action":""}'
[Parent 7044: Main Thread]: D/WindowsAlertsService launchArgWithoutAction for 'action1': 'program
firefox
profile
D:\mozilla-central\obj-firefox\tmp\profile-default
windowsTag
2670734490'
console.log: null "alertshow" "test-id"
[Parent 7044: Main Thread]: D/WindowsAlertsService Iterating 1 handlers
[Parent 7044: Main Thread]: D/WindowsAlertsService Comparing external windowsTag '2670734490' to handled windowsTag '2670734490'
[Parent 7044: Main Thread]: D/WindowsAlertsService External windowsTag '2670734490' is handled by handler [1e0bf339700]
[Parent 7044: BgIOThreadPool #2]: I/WindowsAlertsService Pipe wait signaled
[Parent 7044: BgIOThreadPool #2]: I/WindowsAlertsService SetForegroundWindow permission granted to our window.

As you can see, it just stops.

Here's a screen recording of the bug. It's not quite the same steps as the logs, so they won't match.

Is this on Nightly?

Actually, I'm a few mozilla-central pushes behind, I'll update and try again.

It's the same at the tip of m-c.

I'm confused, are you trying to say you rebuilt and retried using the latest m-c within 5 minutes?!

Yes, artifact builds.

Given "test-id" being the cookie value in comment #0, I assume this is about the direct use of nsIAlertsService from system context rather then via web notifications. With the following code clicking the resulting notification still gives alertclickcallback regardless of the timing of click:

var svc = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService);
var alert = Cc["@mozilla.org/alert-notification;1"].createInstance(Ci.nsIAlertNotification);
var systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
alert.init("", "title", "message", true, "test-id", undefined, "test-id", undefined, undefined, systemPrincipal, undefined, false);
svc.showAlert(alert, console.log)

I'm testing on Windows 11, but this is still supposed to work on Windows 10. 🤔

Hi nalexander and nrishel, do any of you have Windows 10 to test on or have any idea what's going on here?

Flags: needinfo?(nrishel)
Flags: needinfo?(nalexander)

Not at top of hand, but I'm guessing QA does. Maybe worth having them run this down with mozregression?

Flags: needinfo?(nrishel)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: