New issue
Advanced search Search tips

Issue 823977 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Closed: Aug 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Windows native notifications do not work

Project Member Reported by sunn...@chromium.org, Mar 21 2018

Issue description

chrome://version

Google Chrome	67.0.3376.1 (Official Build) canary (64-bit) (cohort: Clang-64)
Revision	1e39128b2b98d7076710983637d9e32dbdd48cdc-refs/branch-heads/3376@{#2}
OS	Windows

ver says Windows version is Microsoft Windows [Version 10.0.14393]
(winver also says Build 1607)

I enabled the flag in chrome://flags, and used https://tests.peter.sh/notification-generator/ to test notifications. Other sites do not work either.


 

Comment 1 by chengx@chromium.org, Mar 21 2018

Thanks for the feedback. Your Windows version and Canary version meet the requirements.

Could you provide more context about your test? For example, what did you do after navigating to the URL you mentioned? Did you see the notification displayed? Did you click it and see a new tab open? etc...

Did you follow the instruction here?
https://docs.google.com/document/d/166-JAOZ7AscdpjwNejSm4EfCqgylN4FrzusWPJEBYU4/edit#heading=h.tecqnayp6w1g

Comment 2 by awdf@chromium.org, Mar 21 2018

Owner: finnur@chromium.org
Status: Assigned (was: Untriaged)

Comment 3 by chengx@chromium.org, Mar 21 2018

I tested Canary 67.0.3377.0 on my machine, and the native notification worked as expected. So I definitely need more information from you.

Comment 4 by finnur@chromium.org, Mar 22 2018

I'm also working on adding error metrics to the code, so we can hopefully figure out where it is failing.

Could you be more specific when describing what doesn't work? For example, are we falling back onto non-native notifications? Is there something shown on screen? Is the notification blank or missing pieces? If you pick the default values on the test site on peter.sh, is the background black or white?

Comment 5 by finnur@chromium.org, Mar 26 2018

Just checked in my change to record success metrics for native notifications. It should appear in Canary shortly, at which point we can try to debug what is happening.
By not working I mean no notifications, native or non-native, are shown.

I did see a native notification once. It was when I set the flag to default, and restarted the browser. I saw one native notification pop up briefly. All subsequent notifications were non-native.
My display device scale factor is 150% (4k 32in monitor), and changes sometimes to 100% when the KVM bugs out and tells Windows the display is 1440p. Not sure if that's relevant here.
The change I referred to in comment 5 got reverted due to a minor problem and resubmitted with a fix yesterday. Once that makes it into the canary we can debug the problem more easily. That hasn't happened yet (just checked) but I'll update this shortly. Feel free to remind me if this falls off the radar.

Note to self:
Change ID to track: I9a04f666e8181d87fd945fcdcac0c3a0371aa2f0
... and possibly Xi's UMA change as well.

Comment 9 by finnur@chromium.org, Apr 17 2018

OK, as of version 67.0.3392.0 we should have a lot of error cases covered by histograms. We're still adding a few more, but I think it is time to take a look.

Can you make sure your canary is at or above the version above, repro the problem, navigate to chrome://histograms and paste into this bug any histogram that starts with the prefix "Notifications." (without the quotes).
I enabled the native notifications flag, and used https://tests.peter.sh/notification-generator/ to display one notification. Attached notification histograms.
notifications.txt
3.6 KB View Download
To be clear, the notification did not show up.
OK, this is very helpful. It looks to me like we are handing off the notification to Windows, but Windows is failing to display it. If you advance your Canary to version 68.0.3399.0 (or newer), there are logs I added specifically for this case, so another set of histograms would probably help (from an updated Canary, after repro-ing again).

Example error scenarios include notifications being turned off globally in Windows or turned off for Chrome specifically. Both of those settings can be found under "Notifications and actions" in Windows. 
Oh, also... press Windows+A to open the Action Center and verify you don't see the notifications there.
sunnyps@: Did you get a chance to update Canary and trying again?
I got placed into the native notifications enabled finch group, and they still don't show up. I'm on 69.0.3445.2 (Official Build) canary (64-bit) (cohort: Clang-64). Notification histograms attached.

notifications.txt
4.9 KB View Download
Notifications.Windows.DisplayStatus (and all others) doesn't indicate a failure. I am a bit lost.  
One thing I found interesting is that when I saw one Chrome native notification immediately after rebooting Windows, but none after that when using the notification generator.
Thank you for that last comment. I think it sheds some light on the issue, although, like Xi, I also find this issue quite puzzling.

My take on the data is that Chrome does not reach the point where it calls SetReadyCallback (with the one exception noted in comment 17, where everything works as expected). This puts quite a different perspective on the issue, I think.

Peter, is there some place we should look where the code takes an alternate (failure) path before calling SetReadyCallback?
Cc: peter@chromium.org
No, and that seems very unlikely in either case - both sets of histograms shared by Sunny indicate success.

We're successfully handing these notifications to the Action Center, so let's start there. Sunny, could you please try Finnur's suggestion in #c13?
I misread the data... SetReadyCallback is only called once per run, so my analysis is incorrect in #18.

Looking at it again, I see we've tried to show 10 messages and the AC has reported an error (OnFailed) for each case. Have you tried this on a Debug build? There should be a warning in the debug output...
Project Member

Comment 21 by bugdroid1@chromium.org, Jun 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aa3ca59c6e0031d2c33b405da568478f5e76fc25

commit aa3ca59c6e0031d2c33b405da568478f5e76fc25
Author: Finnur Thorarinsson <finnur@chromium.org>
Date: Mon Jun 04 17:04:50 2018

Win Native Notifications: Up the priority on reporting error from AC.

Bug:  823977 ,  734095 
Change-Id: Id9adcf5c40c987656407432d15d0477920094e23
Reviewed-on: https://chromium-review.googlesource.com/1085457
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564123}
[modify] https://crrev.com/aa3ca59c6e0031d2c33b405da568478f5e76fc25/chrome/browser/notifications/notification_platform_bridge_win.cc

re #19: No notifications in action center either.
ping

native notifications still don't work for me
sunnyps@: Could you please try Chrome M68 Stable?

M68 stable has not rolled out 100% yet. If you are still on M67 (you can check via chrome://version), you can pull the update following the instructions as mentioned in this link. It's very simple.
https://support.google.com/chrome/answer/95414?co=GENIE.Platform%3DDesktop&hl=en

Then turn on the flag: chrome://flags/#enable-native-notifications

Please let us know if it works for you on M68 Stable. Thanks!
I usually run Canary and I see the problem there.
The native notification system on each Chrome channel has its own associated Windows registry hence independent to each other. I don't quite understand what is going on on your Canary as the metrics you provided seem to be fine. It could be helpful if you could try Stable and let us know the results, as that channel is definitely much more "stable" than Canary.
Native notifications seem to work on Chrome stable. Attached stable histograms.
histograms.html
1023 KB View Download
Interestingly I see two "Google Chrome" entries and one "Google Chrome Canary" entry in Windows Notifications & actions settings. One of the "Google Chrome" entries has the usual Chrome logo with a transparent background, and the other has a lower res logo with a black background.
notification_settings.png
221 KB View Download
Thanks for sharing -- this is very interesting! 

I checked my machine and I have two "Google Chrome" entries too. The one with a black background has a lower res "Canary" logo which seems even more problematic. I will file a bug. 
I have filed crbug/870805 for the issue of two Google Chrome entries in Windows notifications settings.
Hi sunnyps@, could you please check if you have a "Google Chrome Canary" shortcut under:
C:\Users\<account>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs?

If not, could you please uninstall Canary and then install it?
Shortcut is present, and points
to "C:\Users\<account>\AppData\Local\Google\Chrome
SxS\Application\chrome.exe"
I thought this might be the reason, but apparently it's not. Thanks for the confirmation though!
Notifications mysteriously started working! First I saw a calendar
notification from "Google Chrome Canary.<long UUIDish suffix>". I dismissed
it by accident, but now new notifications generated using
https://tests.peter.sh/notification-generator/ work fine (Canary log and
"Google Chrome Canary") and do not show the weird suffix. I don't see the
weird suffix in Windows notification settings either.
Status: WontFix (was: Assigned)
Interesting! Mark this bug "WontFix" then. Please let us know if it regresses in the future.
Forgot to mention this: I upgraded my corp machine from build 14393 to
16299. That surely had something to do with it.
Your OS update may automatically fix something that caused the native notification not to work on your machine.

FYI, I am still on 14393 and I have no issue with the native notification.

Sign in to add a comment