jupyter-notify
jupyter-notify copied to clipboard
Notification not shown nor in Safari, nor in Chrome
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.
+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
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.
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...
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:

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