mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 16:35:53 +02:00
[GH-ISSUE #785] iOS App: Push notifications not received for reserved topics with ACL using hosted service #559
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#559
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 @protocolist on GitHub (Jun 27, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/785
🐞 Describe the bug
I'm a long time user of the free tier of the hosted product. I receive iOS push notifications for public topics and in general this works very well.
Today I subscribed to the paid tier and added a reserved topic with the ACL preset "I can publish and subscribe, everyone can publish". I signed in to the iOS app with my account.
Push notifications are not received for this new reserved topic by the iOS app. Manually refreshing the notifications in the iOS app causes them to appear. Notifications are received successfully in the web app for these reserved topics.
Upon further testing, this is the behaviour with each of the ACL presets on reserved topics:
"Only I can publish and subscribe" - No push notification
"I can publish and subscribe, everyone can publish" - No push notification
"I can publish and subscribe, everyone can subscribe" - Push notification received
"Everyone can publish and subscribe" - Push notification received
If my reading and understanding is correct, this is not the expected behaviour. If the iOS app is signed in to the appropriate account, shouldn't push notifications be received for all of the above cases?
Please let me know if I can perform any additional testing.
💻 Components impacted
iOS App
💡 Screenshots and/or logs
N/A
🔮 Additional context
Unfortunately this issue completely breaks my use cases for moving to the paid subscription tier (avoiding public consumption of my topics)
@binwiederhier commented on GitHub (Jun 27, 2023):
I don't have time right now to investigate this. I can likely get to it tomorrow night. I am happy to refund you at any point in time if things are not working right. Just let me know here or on Discord/Matrix/email.
Also: thank you for subscribing to the paid tier!
@protocolist commented on GitHub (Jun 27, 2023):
No worries, I am not in a big hurry, everything is working for public topics as before. I will remain subscribed because I'd like to support the development.
@binwiederhier commented on GitHub (Jun 28, 2023):
😱 This is in fact a design flaw, or at least an unhandled case: https://github.com/binwiederhier/ntfy/blob/main/server/server_firebase.go#L174-L184
Background:
If a topic is not readable by "everyone", then we cannot forward the actual message to the Firebase/APNS topic, because anonymous subscribers could be listening to that (could they? 🤔).
The code instead sends a "poll_request" message, which is supposed to instruct the client to manually poll for the message from the topic, and then display the message. Polling for the message would only be possible if the client has access to the topic.
On top of that, the code clearly does not handle iOS at all (note the "APNS" comment), so even if poll_requests are implemented (I think they are!), APNS is not notified, so the iOS device never gets the message.
--
I am not entirely sure if I have to right, and/or what is implemented in iOS or even Android to handle this case. This would require a bit more digging, and a bit more thinking. It is a serious flaw, and as I said, I am happy to refund your paid plan. Thank you for finding this bug!
@protocolist commented on GitHub (Jun 28, 2023):
Understood, no worries. For better or for worse, I am stuck in the Apple ecosystem, and my phone is the primary device I receive notifications on, so if you eventually figure a way to architect for APNS I would be very eager to hear about it. No refund necessary.