jupyter-notify icon indicating copy to clipboard operation
jupyter-notify copied to clipboard

Notification not shown nor in Safari, nor in Chrome

Open sbatururimi opened this issue 4 years ago • 5 comments

While this module has worked in the past, I'm actually unable to show any notification nor in safari, nor Chrome. Any hint on how to fix that? In browser settings, any notification for IP on which the notebook is run is enabled.

sbatururimi avatar May 28 '21 06:05 sbatururimi

+1 I'm also having this issue in Chrome:

Google Chrome | 92.0.4515.159 (Official Build) (x86_64)
Revision | 0185b8a19c88c5dfd3e6c0da6686d799e9bc3b52-refs/branch-heads/4515@{#2052}
OS | macOS Version 11.5.2 (Build 20G95)
JavaScript | V8 9.2.230.29

jdeveloperw avatar Aug 27 '21 01:08 jdeveloperw

Sorry--I missed the first message on this issue. I can confirm it's not working for me in Chrome. I'll take a look and see what I can find.

mdagost avatar Aug 27 '21 14:08 mdagost

I suspect it is this: https://developer.mozilla.org/en-US/docs/Web/API/Notification/requestPermission

Appears that the notifications permissions are now only available over https. Let me see if there is any workaround...

mdagost avatar Aug 27 '21 14:08 mdagost

Yeah, so I verified that this is related to https. You can follow these instructions to start jupyter over https after generating a certificate:

$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mykey.key -out mycert.pem
$ jupyter notebook --certfile=mycert.pem --keyfile mykey.key

That immediately fixed things on Safari for me.

Chrome was a bit tricker. First, it doesn't like self-signed certificates and gives a privacy error. I'm on a Mac and followed these instructions to install the self-signed certificate. That allowed me to load Jupyter, but I still wasn't getting notifications.

The last thing was to turn on Chrome notifications globally in the Mac settings:

Screen Shot 2021-08-27 at 12 04 44 PM

Can you guys let me know if that fixes it for you, and I'll add a note in the README?

mdagost avatar Aug 27 '21 17:08 mdagost

It works, thank you

alekseyen avatar Feb 24 '22 10:02 alekseyen