Issue metadata
Sign in to add a comment
|
chrome.notifications.onButtonClicked called with index -1 when the notification is clicked on Windows 10
Reported by
ryanjold...@gmail.com,
Aug 16
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 Steps to reproduce the problem: 1. Show a notification using chrome.notifications.create 2. Click on the notification 3. See call to chrome.notifications.onButtonClicked listener with index -1 What is the expected behavior? When the notification is clicked, a call should go to chrome.notifications.onClicked What went wrong? The wrong callback is being invoked, and with an unexpected paramter (index of -1). Did this work before? Yes This worked before Chrome 68 (and the switch to native Windows 10 notifications) Does this work in other browsers? Yes Chrome version: 68.0.3440.106 Channel: stable OS Version: 10.0 Flash Version: I have attached a dummy extension that will let you quickly repro the issue. Just load the extension on Windows 10 with Chrome 68, click on the notification that shows, and see in the log in the background page's console.
,
Aug 17
Unable to reproduce the issue on chrome reported version# 68.0.3440.106 using Windows-10 with steps mentioned below: 1) Launched chrome reported version and loaded the unpacked extension into chrome://extensions 2) Able to see notification popup at bottom right, clicked on notification popup and clicked on background page 3) On Devtools > Console, seen "onClicked key" event got generated. @Reporter: Please find the attached screencast for your reference and let us know if we missed anything in reproducing the issue, provide your feedback on it which help in further triaging it. Could you please try to test this issue by creating new profile and let us know if the issue still persists. Note: Tentatively adding UI>Notifications component to it. Thanks!
,
Aug 17
Thanks for the video. I very clearly see the issue. For some reason, your version of Chrome 68 is not using the native Windows 10 notifications. I (and users of my extension) have this enabled. From this article: https://www.theverge.com/2018/8/8/17665398/google-chrome-windows-10-notifications-action-center-support "If you don’t see the new notification support in Chrome just yet, you can always manually enable it in chrome://flags by turning “native notifications” to the enabled state." Could you see if that setting is disabled for you and try with it enabled?
,
Aug 17
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 20
Able to reproduce the issue on chrome reported version# 68.0.3440.106 and on latest chrome# 70.0.3527.0 using Windows-10 with the extension provided in comment# 0. As this issue is seen from M-67( from introduction of "native notifications" flag), hence considering this issue as Non-Regression and marking it as Untriaged. Note: Issue is not seen on Mac and Linux. Thanks!
,
Aug 20
Thank you for the report! Sending a fix now..
,
Aug 20
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8663895cdd19b9ce09aab12f30d4af189a1944d4 commit 8663895cdd19b9ce09aab12f30d4af189a1944d4 Author: Peter Beverloo <peter@chromium.org> Date: Mon Aug 20 14:05:48 2018 Don't pass -1 as an action index for Windows native notifications A negative index is used to indicate the default, unset state of the action button index in the NotificationLaunchId, but this is not the right value to pass along to NotificationHandlers. Bug: 875091 Change-Id: I0d327eb1f3887904a674a6748cc6e9d60ec783c3 Reviewed-on: https://chromium-review.googlesource.com/1180973 Commit-Queue: Peter Beverloo <peter@chromium.org> Reviewed-by: Finnur Thorarinsson <finnur@chromium.org> Cr-Commit-Position: refs/heads/master@{#584430} [modify] https://crrev.com/8663895cdd19b9ce09aab12f30d4af189a1944d4/chrome/browser/notifications/notification_platform_bridge_win.cc [modify] https://crrev.com/8663895cdd19b9ce09aab12f30d4af189a1944d4/chrome/browser/notifications/notification_platform_bridge_win_interactive_uitest.cc
,
Aug 20
+govind fyi - we'll verify the fix in #c7 in Canary tomorrow and will likely request merge. It's a small, safe change that fixes behaviour for a number of extensions that rely on notification click events.
,
Aug 20
Pls update bug with canary result tomorrow. Also this is regressed in M68, is it critical to merge to M69 this late in release cycle?
,
Aug 21
The NextAction date has arrived: 2018-08-21
,
Aug 21
I tested the extension without Peter's fix and on Canary. Without Peter's fix, when you click... 1) the notification itself and then... 2) the button in it... ... you get these traces... onButtonClicked key -1 onButtonClicked key 0 On Canary, you get instead: onClicked key onButtonClicked key 0 ... so I think this is fixed.
,
Aug 21
Thank you for confirming, Finnur! Given the very narrow focus of the CL in #c7 I'd like to request merge of that CL to M69. It will restore functionality in a number of extensions that display notifications.
,
Aug 21
This bug requires manual review: We are only 13 days from stable. Please contact the milestone owner if you have questions. Owners: amineer@(Android), kariahda@(iOS), cindyb@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 21
Thank you finnur@ and peter@. Approving merge to M69 branch based on comments #8, #11, #12 and per offline chat with peter@. Please merge now. Thank you.
,
Aug 21
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e62fc0ef14b8947a1cbbe754feb8a7b137c2f139 commit e62fc0ef14b8947a1cbbe754feb8a7b137c2f139 Author: Peter Beverloo <peter@chromium.org> Date: Tue Aug 21 16:42:34 2018 Don't pass -1 as an action index for Windows native notifications A negative index is used to indicate the default, unset state of the action button index in the NotificationLaunchId, but this is not the right value to pass along to NotificationHandlers. Bug: 875091 Change-Id: I0d327eb1f3887904a674a6748cc6e9d60ec783c3 Reviewed-on: https://chromium-review.googlesource.com/1180973 Commit-Queue: Peter Beverloo <peter@chromium.org> Reviewed-by: Finnur Thorarinsson <finnur@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#584430}(cherry picked from commit 8663895cdd19b9ce09aab12f30d4af189a1944d4) Reviewed-on: https://chromium-review.googlesource.com/1183602 Cr-Commit-Position: refs/branch-heads/3497@{#736} Cr-Branched-From: 271eaf50594eb818c9295dc78d364aea18c82ea8-refs/heads/master@{#576753} [modify] https://crrev.com/e62fc0ef14b8947a1cbbe754feb8a7b137c2f139/chrome/browser/notifications/notification_platform_bridge_win.cc [modify] https://crrev.com/e62fc0ef14b8947a1cbbe754feb8a7b137c2f139/chrome/browser/notifications/notification_platform_bridge_win_interactive_uitest.cc
,
Aug 21
,
Sep 11
Issue 882806 has been merged into this issue. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by phanindra.mandapaka@chromium.org
, Aug 17