mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #331] iOS instant notification while self-hosting doesn't seem to be working #257
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#257
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Xaelias on GitHub (Jun 18, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/331
So a coworker of mine mentioned this app to me. And I'm trying it out but I don't seem to be able to get any push notification without manually polling my topics. Which makes is non-usable for what I need (I know it's not your fault :-D ).
Anywho, I run the server locally, it's not exposed to the outside world, I will be relying on local network / vpn for my phone to be able to talk to the server.
NTFY_UPSTREAM_BASE_URLis set tohttps://ntfy.sh(which shouldn't matter is my understanding since that's the default value).But whenever I try to publish a notification my phone doesn't react until I go check manually.
I've tried the following (using max priority just in case):
I do see in the logs the following:
so it's trying...
Any idea of what's (not) happening?
Thanks :-)
PS: Technically running in k8s if that matters
@binwiederhier commented on GitHub (Jun 18, 2022):
I'm sorry it's not working correctly. It's sad that we have to jump through so many hoops to get it working at all.
This shouldn't be a problem as long as your phone can talk to the server.
It is NOT the default value. By default, it doesn't forward poll requests at all.
Can you elaborate what this means? Do you get a notification (an actual iOS popup-notification), but only when you pick up the phone? Or do you not get an iOS notification at all, and you only see them in the ntfy app?
This is good. That means that Firebase/APNS is working.
This is also good, that means you've got the upstream URL configured correctly.
The default server (base URL) in your app and for the topic you subscribe to has to match EXACTLY with the base-url configured in your ntfy server. So if you set
base-url: http://myserver.lanin the server.yml, you must use that exact URL as default server in the iOS app. If you usebase-url: http://192.168.1.2andmyserver.lanas default server, the poll-topic SHA256 won't match and messages will not get to your device. See https://ntfy.sh/docs/config/#ios-instant-notifications for details of what this means?You can try to do this:
The result should match the 64 byte hex string you see in the log message you linked (
Publishing poll request to https://ntfy.sh/...). If it doesn't, something ain't right.Soooo, do they match exactly?
@Xaelias commented on GitHub (Jun 18, 2022):
Ugh I feel dumb now... They almost matched. Except base url didn't have the
http://prefix...Now it works great. Thanks :-)
@binwiederhier commented on GitHub (Jun 18, 2022):
Don't feel dumb. This is still a bug. It's a UX bug. It has to be simpler. If you have any idea to make this simpler let me know!!
@Xaelias commented on GitHub (Jun 18, 2022):
There is a reason I'm not doing any UI/UX work xD
I guess it kind depends how that value is handled in the serve vs. client. The easiest way is probably to hide this from the user and just prefix the endpoint with
http://in both the apps and the server if it's not explicitly provided. Or the opposite. Validate that the value starts with the protocol and error out (on both the client and server) if that's not true, to ensure the config useshttp/https.