mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #955] Android App - Push notifications not working (Have to refresh to get messages) #668
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#668
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 @Ciaran97 on GitHub (Nov 20, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/955
🐞 Describe the bug
I selfhost NTFY and i am not receiving notifications on Android apps. Works perfect with IOS. I can get the notification when i open the ntfy app and refresh
💻 Components impacted
Android App
I am probably missing something.
I have ntfy running in a docker container behind an nginx reverse proxy and use cloudflare tunnels to expose using my domain.
EDIT:
Also i changed the port of the docker container
@kron0800 commented on GitHub (Nov 20, 2023):
same here, using local ip works like a charm, but if i set my cloudflared tunnel as server, no notifications received unless i refresh
@Ciaran97 commented on GitHub (Nov 21, 2023):
@kron0800 Are you also using a proxy?
@emigrating commented on GitHub (Nov 21, 2023):
You guys dont happen to havea bunch of defunct ssl client ps entries do you? I ran into a similar issue (#956) which could explain why I was still getting notifications even though the web ui seemed 'dead'. As my outgoing notifications were going from the internat LAN using an apprise instance..
@Ciaran97 commented on GitHub (Nov 21, 2023):
@emigrating i dont seems to have that issue. My web UI loads fine (although i notice a spinner next to my topic and android app always says 'reconnecting' to topic but i can send notifications from both).
Edit: Also IOS notifications are working flawlessly.
@binwiederhier commented on GitHub (Nov 21, 2023):
Please provide logs and/or screenshots. Without that, it's impossible to help.
That said, if it always says "reconnecting", that means you've never really connected to the ntfy server at all. Your Android and ntfy server logs will tell the story.
Debugging steps:
log-level: debugorlog-level: tracein the server.yml file. See https://docs.ntfy.sh/config/#logging-debugging for details.You can find details in the troubleshooting guide: https://docs.ntfy.sh/troubleshooting/
@Ciaran97 commented on GitHub (Nov 21, 2023):
I have solved this. I made the assumption that because i am using a reverse proxy i did not need the port in my cloudflare tunnel.
i just added the port of my ntfy service in the local ip address of the cloudflare tunnel and i resubscribed to the topic and it worked. @kron0800 i hope the above helps you.
@B0F1B0 commented on GitHub (Apr 21, 2024):
I had the same problem of not getting push notifications on Android. Yes, I am behind a nginx proxy manager.
I was able to solve the problem.
on Android: Settings > Connection protocol > WebSockets
on nginx proxy manager > edit proxy host > Websockets Support [x]
@JZach commented on GitHub (Apr 30, 2024):
@B0F1B0 - had the exact same setup and the exact same problem - Websockets Support in nginx proxy manager did the trick!
@Ativerc commented on GitHub (Jan 7, 2025):
For people who're doing this via the
nginx.conffile.Resources:
https://stackoverflow.com/a/14969925
https://nginx.org/en/docs/http/websocket.html
@wedsa5 commented on GitHub (May 27, 2025):
This should not be needed. See later comments
For those using Caddy reverse proxy, you can use this configuration to enable websocket:@binwiederhier commented on GitHub (May 27, 2025):
This is documented here: https://docs.ntfy.sh/config/#nginxapache2caddy
If the docs there are wrong, could you update them?
@wunter8 commented on GitHub (May 27, 2025):
You don't need the whole
@wsblock for CaddyWebsockets work with just
reverse_proxy :<ntfy port>on Caddy@wedsa5 commented on GitHub (May 27, 2025):
I was getting the reconnecting issue without it. unless there was some other issue going on. but adding that block immediately fixed it for me.
@wunter8 commented on GitHub (May 27, 2025):
It must've been something else.
According to the Caddy docs, websocket proxying "just works" in v2 (the current version). You don't need to do anything to enable it. That has also been my experience.
And if I'm remembering what that block syntax means, you're matching requests that have a Connection and Upgrade header, but you never do anything for those requests. To do something special with those requests, you'd need to use this syntax:
reverse_proxy @ws IP:port(with the name of that block (@ws) before the IP and port)@wedsa5 commented on GitHub (May 27, 2025):
You're right. i disabled it again and it's working ok for now. updated my comment.