Issue metadata
Sign in to add a comment
|
chrome.notifications.onClosed callback "byUser" variable is always true
Reported by
joaom...@gmail.com,
Aug 30 2017
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.59 Safari/537.36 Steps to reproduce the problem: 1. Create a notification 2. Let it be hidden automatically by Chrome with no user interaction 3. chrome.notifications.onClosed callback is called with the second parameter "byUser" set to true. What is the expected behavior? Since the user didn't close the notification, "byUser" should be set to false. What went wrong? "byUser" was set to true Did this work before? Yes I think version 60 but not completely sure Does this work in other browsers? Yes Chrome version: 61.0.3163.59 Channel: beta OS Version: 10.0 Flash Version:
,
Aug 31 2017
It happens in Chrome extensions. Attached is a very simple extension where this happens. Hope this helps.
,
Aug 31 2017
Thank you for providing more feedback. Adding requester "pbommana@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 4 2017
Tested in chrome #61.0.3163.59 & Beta #61.0.3163.71 on win 10.0 & 7 and Please find the screen cast for your reference. Observations: If user didn't close the notification, After few seconds notification disappeared as intended. @ joaomgcd: Could you please let me know if i have missed anything and if possible,Please create new profile without extensions and apps.Re-check once and let us know the observations and provide more inputs on expected behaviour of the issue which would help us to triage the issue further. Thanks in Advance.
,
Sep 4 2017
I think the problem is that you're looking at the log for the extensions page. You need to open the background page link to see the log for the extension script. Right? Let me know what you think.
,
Sep 4 2017
Thank you for providing more feedback. Adding requester "rbasuvula@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 7 2017
Looks like NotificationDisplayService::ProcessNotificationOperation() assumes that something happened because of user interaction. The caller, WebNotificationDelegate::OnClose(), knows the real value of |by_user|, but has no way to pass this through. Let's fix this when removing the WebNotificationDelegate.
,
Sep 7 2017
Thanks for the feedback. Just to let you know, this has a serious impact on my chrome extension. My extension allows you to sync notifications from your Android device to Chrome, so because the extension now always gets the information that the notification was removed by the user, users are getting their notifications removed from their Android devices as well. Thanks again.
,
Sep 7 2017
Muh, that's an important use-case indeed. Sorry for the breakage! I've uploaded a CL that addresses this: https://chromium-review.googlesource.com/655717
,
Sep 7 2017
Actually, the following is the fix: https://chromium-review.googlesource.com/c/chromium/src/+/655720 I've kept it self-contained in case we want to merge it. The following two CLs are associated clean-ups: https://chromium-review.googlesource.com/c/chromium/src/+/655717 https://chromium-review.googlesource.com/c/chromium/src/+/655307
,
Sep 8 2017
Thank you very much for the fix! Do you have a general idea how much time it usually takes for fixes like these to reach the stable Chrome releases?
,
Sep 8 2017
Assuming this lands and gets merged, earliest would be Chrome 62, which reaches stable around the week of October 24. We missed the boat for Chrome 61 I'm afraid.
,
Sep 8 2017
And what about the Beta and Dev channels?
,
Sep 8 2017
No way to say until this lands. Will update you when we know!
,
Sep 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/961c74da485f407caf877fe2eadc84e767af3ebc commit 961c74da485f407caf877fe2eadc84e767af3ebc Author: Peter Beverloo <peter@chromium.org> Date: Fri Sep 08 13:10:22 2017 Propagate the by_user flag to Notification Handlers Whether a notification close was initiated by the user is known to the WebNotificationDelegate, but the dispatching code towards the notification handlers is unaware and assumes it was. This difference can be significant, so propagate it when it's known. BUG= 760608 Change-Id: I23d1be533d62efae6e623758e9f2b0e6f3557e71 Reviewed-on: https://chromium-review.googlesource.com/655720 Reviewed-by: Anita Woodruff <awdf@chromium.org> Commit-Queue: Peter Beverloo <peter@chromium.org> Cr-Commit-Position: refs/heads/master@{#500577} [modify] https://crrev.com/961c74da485f407caf877fe2eadc84e767af3ebc/chrome/browser/notifications/notification_display_service.cc [modify] https://crrev.com/961c74da485f407caf877fe2eadc84e767af3ebc/chrome/browser/notifications/notification_display_service.h [modify] https://crrev.com/961c74da485f407caf877fe2eadc84e767af3ebc/chrome/browser/notifications/web_notification_delegate.cc
,
Sep 11 2017
I've verified that the fix in #c15 works. Requesting merge to M62, given that this breaks the use case mentioned in #c8.
,
Sep 11 2017
Thanks for the fix. Approving this merge to M62, branch: 3202.
,
Sep 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cbb38c15dffe9b3e36fb22e9691e857d7beefaa8 commit cbb38c15dffe9b3e36fb22e9691e857d7beefaa8 Author: Peter Beverloo <peter@chromium.org> Date: Tue Sep 12 14:22:22 2017 Propagate the by_user flag to Notification Handlers Whether a notification close was initiated by the user is known to the WebNotificationDelegate, but the dispatching code towards the notification handlers is unaware and assumes it was. This difference can be significant, so propagate it when it's known. BUG= 760608 TBR=peter@chromium.org (cherry picked from commit 961c74da485f407caf877fe2eadc84e767af3ebc) Change-Id: I23d1be533d62efae6e623758e9f2b0e6f3557e71 Reviewed-on: https://chromium-review.googlesource.com/655720 Reviewed-by: Anita Woodruff <awdf@chromium.org> Commit-Queue: Peter Beverloo <peter@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#500577} Reviewed-on: https://chromium-review.googlesource.com/663263 Reviewed-by: Peter Beverloo <peter@chromium.org> Cr-Commit-Position: refs/branch-heads/3202@{#164} Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098} [modify] https://crrev.com/cbb38c15dffe9b3e36fb22e9691e857d7beefaa8/chrome/browser/notifications/notification_display_service.cc [modify] https://crrev.com/cbb38c15dffe9b3e36fb22e9691e857d7beefaa8/chrome/browser/notifications/notification_display_service.h [modify] https://crrev.com/cbb38c15dffe9b3e36fb22e9691e857d7beefaa8/chrome/browser/notifications/web_notification_delegate.cc
,
Sep 12 2017
The fix will ship as part of Chrome 62. It's available in Canary today, Dev tomorrow, as well as the upcoming Beta (~this week) and Stable (~late October) releases.
,
Sep 12 2017
Thanks again for your help on this!
,
Sep 18 2017
Hello again. I've now updated my beta version of Chrome to Version 62.0.3202.18 (Official Build) beta (64-bit) It still has the same issue. I can confirm that on Chrome Canary with version: Version 63.0.3218.0 (Official Build) canary (64-bit) it is working correctly. Does this mean that version 62 won't have this fix after all? Thanks in advance.
,
Sep 20 2017
Tested the issue using #62.0.3202.29 on linux Ubuntu 14.04, Win7 as per the steps mentioned in comment #0. Observed "byUser" is to false now. Please find the screencast for the same, hence adding Verified labels. Thanks!!
,
Sep 21 2017
Ok, today I got the update for Version 62.0.3202.29 (Official Build) beta (64-bit) and it now works too :) Thanks! Must've been this last jump from .18 to .29 that did it! Thanks again!
,
Oct 7 2017
,
Oct 7 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by pbomm...@chromium.org
, Aug 30 2017Components: UI>Notifications
Labels: Needs-Triage-M61 Needs-Feedback