[GH-ISSUE #323] Web UI with Ubuntu+Firefox or MacOS+Safari - "Notifications are Disabled" "Grant Now" option has no effect #255

Closed
opened 2026-05-07 00:22:20 +02:00 by BreizhHardware · 8 comments

Originally created by @milksteakjellybeans on GitHub (Jun 11, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/323

When using the ntfy web ui on a self hosted ntfy server, I see a panel in the top left for:

Notifications are disabled
Grant your browser permission to display desktop notifications.
GRANT NOW

When I click "GRANT NOW" action, there seems to be no effect.

This happens for both of these combinations:
Ubuntu (20.04.4 LTS) + Firefox (100.0.2)
MacOS (12.4 (21F79)) + Safari (Version 15.5 (17613.2.7.1.8))

If this isn't a supported feature on these platforms I hope it can be considered as a feature request.

Thank you

Originally created by @milksteakjellybeans on GitHub (Jun 11, 2022). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/323 When using the ntfy web ui on a self hosted ntfy server, I see a panel in the top left for: > Notifications are disabled > Grant your browser permission to display desktop notifications. > GRANT NOW When I click "GRANT NOW" action, there seems to be no effect. This happens for both of these combinations: Ubuntu (20.04.4 LTS) + Firefox (100.0.2) MacOS (12.4 (21F79)) + Safari (Version 15.5 (17613.2.7.1.8)) If this isn't a supported feature on these platforms I hope it can be considered as a feature request. Thank you
BreizhHardware 2026-05-07 00:22:20 +02:00
Author
Owner

@binwiederhier commented on GitHub (Jun 12, 2022):

Hmm. Works for me: https://phil.nopaste.net/XVd5JJA4kY?a=K3aSwpEmp7

image

<!-- gh-comment-id:1153197558 --> @binwiederhier commented on GitHub (Jun 12, 2022): Hmm. Works for me: https://phil.nopaste.net/XVd5JJA4kY?a=K3aSwpEmp7 ![image](https://user-images.githubusercontent.com/664597/173239317-3ea4680e-2a77-472c-8004-191b56ca667b.png)
Author
Owner

@milksteakjellybeans commented on GitHub (Jun 12, 2022):

I will gather more info and report back, thanks

<!-- gh-comment-id:1153213356 --> @milksteakjellybeans commented on GitHub (Jun 12, 2022): I will gather more info and report back, thanks
Author
Owner

@milksteakjellybeans commented on GitHub (Jun 12, 2022):

With ntfy.sh, works as expected for me in Firefox and Safari.

With my self hosted, http only server, I'm having this issue.

As far as I can tell it's the browsers not letting the prompt for notification permission through.

With Firefox, looks like it will not honor the “always ask” default setting for “send notifications” if the site is served with http, at least that's what I'm seeing for my self hosted http version.

Again, with Firefox, if I manually go to site permissions (lock icon in url bar -> connection not secure -> more information -> permissions), I can switch “Send Notifications” to allow to get notifications enabled, which now has no call to action for notifications within my self hosted site. woo hoo

With Safari, I can't find a direct way to enable the notification support "manually" outside of using Xcode to manually edit the ~/Library/Safari/UserNotificationPermissions.plist file. The site preferences menu options of safari allows editing popup and video/audio playing directly for a site, but not notifications. I don't have Xcode so I didn't try the direct edit but looking at the file in a text editor does give me confidence that a direct edit would work.

so, all in all this looks more like http+notification handling logic in the browsers.

I don't know what chrome does, but if it also doesn't work there, it might be worth considering documentation notes for self hosted or changing the call to action in the web ui when the sites running http. I know the majority of folks are w/ chrome.

Thank you for reviewing.

Safari site prefs for ref
image

<!-- gh-comment-id:1153247765 --> @milksteakjellybeans commented on GitHub (Jun 12, 2022): With ntfy.sh, works as expected for me in Firefox and Safari. With my self hosted, http only server, I'm having this issue. As far as I can tell it's the browsers not letting the prompt for notification permission through. With Firefox, looks like it will not honor the “always ask” default setting for “send notifications” if the site is served with http, at least that's what I'm seeing for my self hosted http version. Again, with Firefox, if I manually go to site permissions (lock icon in url bar -> connection not secure -> more information -> permissions), I can switch “Send Notifications” to allow to get notifications enabled, which now has no call to action for notifications within my self hosted site. woo hoo With Safari, I can't find a direct way to enable the notification support "manually" outside of using Xcode to manually edit the ~/Library/Safari/UserNotificationPermissions.plist file. The site preferences menu options of safari allows editing popup and video/audio playing directly for a site, but not notifications. I don't have Xcode so I didn't try the direct edit but looking at the file in a text editor does give me confidence that a direct edit would work. so, all in all this looks more like http+notification handling logic in the browsers. I don't know what chrome does, but if it also doesn't work there, it might be worth considering documentation notes for self hosted or changing the call to action in the web ui when the sites running http. I know the majority of folks are w/ chrome. Thank you for reviewing. Safari site prefs for ref ![image](https://user-images.githubusercontent.com/106365477/173246570-d4101537-080b-4272-a5e6-d441b03c1c24.png)
Author
Owner

@binwiederhier commented on GitHub (Jun 12, 2022):

Oh yeah, of course. The notifications API only works on HTTPS afaik (https://developer.mozilla.org/en-US/docs/Web/API/notification):

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Probably should add a alert in the web UI. Thanks.

<!-- gh-comment-id:1153272060 --> @binwiederhier commented on GitHub (Jun 12, 2022): Oh yeah, of course. The notifications API only works on HTTPS afaik (https://developer.mozilla.org/en-US/docs/Web/API/notification): > Secure context: This feature is available only in [secure contexts](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) (HTTPS), in some or all [supporting browsers](https://developer.mozilla.org/en-US/docs/Web/API/notification#browser_compatibility). Probably should add a alert in the web UI. Thanks.
Author
Owner

@binwiederhier commented on GitHub (Jun 12, 2022):

Long story short: It won't work over HTTP. Browsers are trying to push people toward HTTPS, and they do this by only allowing new features over HTTPS, even if they are completely unrelated.

<!-- gh-comment-id:1153272419 --> @binwiederhier commented on GitHub (Jun 12, 2022): Long story short: It won't work over HTTP. Browsers are trying to push people toward HTTPS, and they do this by only allowing new features over HTTPS, even if they are completely unrelated.
Author
Owner

@binwiederhier commented on GitHub (Jun 12, 2022):

Slight correction: It works on "localhost" (HTTP) and HTTPS-sites.

<!-- gh-comment-id:1153273342 --> @binwiederhier commented on GitHub (Jun 12, 2022): Slight correction: It works on "localhost" (HTTP) and HTTPS-sites.
Author
Owner

@binwiederhier commented on GitHub (Jun 12, 2022):

Added banner in github.com/binwiederhier/ntfy@feef15c485. Thank you for reporting.

220612 16-21-32 Selection 001

<!-- gh-comment-id:1153287057 --> @binwiederhier commented on GitHub (Jun 12, 2022): Added banner in https://github.com/binwiederhier/ntfy/commit/feef15c485f7dc8a7364c08f08b4afd976ffbbb2. Thank you for reporting. ![220612 16-21-32 Selection 001](https://user-images.githubusercontent.com/664597/173252749-a70975af-4343-4583-aba8-fedfa37ea8a1.png)
Author
Owner

@milksteakjellybeans commented on GitHub (Jun 12, 2022):

understood, ty

Firefox does seem to work with the manual settings change in place, but I'll know why if that stops working in the future

<!-- gh-comment-id:1153299511 --> @milksteakjellybeans commented on GitHub (Jun 12, 2022): understood, ty Firefox does seem to work with the manual settings change in place, but I'll know why if that stops working in the future
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#255
No description provided.