Open ngosang opened 2 years ago
Could you post the log from the android app around the time a duplicated notification occurred?
There are no traces at that moment.
Every message will be logged. Are you looking inside the built-in logging view in the android app?
something like this should be in there:
2022-08-21T18:18:12.414Z INFO: WebSocket(3): received message {"id":183,"appid":10,"message":"oops","title":"Test","priority":5,"extras":{"client::display":{"contentType":"text/markdown"}},"date":"2022-08-21T20:18:12.460258394+02:00"}
2022-08-21T18:18:09.005Z INFO: Entering LogsActivity
2022-08-21T18:18:06.927Z INFO: Loading more messages for -1
2022-08-21T18:18:06.920Z INFO: Entering MessagesActivity
2022-08-21T18:18:06.872Z INFO: WebSocket(3): opened
2022-08-21T18:18:06.864Z INFO: Server version: 2.1.5@2022-07-31-09:16:46
2022-08-21T18:18:06.859Z INFO: WebSocket(3): starting...
2022-08-21T18:18:06.855Z INFO: Starting WebSocketService
Everything looks fine. There are no duplicate traces in the client. For each trace I see 2 messages in the Gotify like in the first post. I don't know the cause but it looks like a rendering issues since it's fixed if I scroll to refresh.
2022-08-22T12:17:00.777Z INFO: WebSocket(9): received message {"id":25175,"appid":6,"message":"Report 356...","title":"XRT Report","priority":10,"date":"2022-08-22T14:17:01.770665451+02:00"}
2022-08-22T11:45:55.119Z INFO: WebSocket(9): received message {"id":25174,"appid":8,"message":"SeekingAlpha...","title":"RSS","priority":5,"date":"2022-08-22T13:45:56.030672749+02:00"}
2022-08-22T11:45:55.023Z INFO: WebSocket(9): received message {"id":25173,"appid":8,"message":"TuCapital\....","title":"RSS","priority":5,"date":"2022-08-22T13:45:56.012680205+02:00"}
2022-08-22T10:00:54.959Z INFO: WebSocket(9): received message {"id":25172,"appid":8,"message":"Tor....","title":"RSS","priority":5,"date":"2022-08-22T12:00:56.003322161+02:00"}
Check at the time. Old and new articles are mixed.
Can you reproduce this, like pushing a new message to gotify and then seeing the duplicated message in the app, or does it happen randomly?
I can't reproduce the issue but its still happening from time to time. Log traces are clean, the messages are received only once but sometimes they are rendered 2 times.
I have the exact same issue. Not all messages, not always, but often enough to be annoying (several times a day). I can't share the logs but I can confirm that the duplicated messages only appear once in the logs. If I refresh Gotify (pull down) the duplicated messages disappear. It's worth noting that the android notifications show a single message, the duplicated messages only appear in the Gotify app.
For me the duplicate notifications appear if I have multiple app versions of Gotify installed on my phone (release and development builds for example).
I'm closing since I can't reproduce this issue in the new smartphone. I think it was related to an old version of Android.
I still get duplicate messages fairly regularly, despite a recent switch to a new high-end phone with the latest Android. The change of phone made no difference in my case.
There is a possibility that this problem is fixed with the next update, but no guarantee here.
This is 100% reproducible for me. I implemented a websocket listener that responds with pong
if I send a message ping
from my mobile. They are using separate Gotify apps to send their messages. (Intended to execute actions on the host system if it proves reliable.) It only sends once, and the message is only logged once, but it is shown twice in the UI - one of them sometimes before the ping message I also see in the mobile app. (I. e. I see pong
, ping
, pong
.) If I refresh, the first message disappears.
Server log:
Jan 11 16:50:22 mail.example.com systemd[1]: Started push-notify-client.service - Gotify Notify listener.
Jan 11 16:50:22 mail.example.com push-notify-client[1437780]: 2024-01-11 16:50:22 - root - INFO - Opening websocket connection to push.example.com
Jan 11 16:50:22 mail.example.com push-notify-client[1437780]: 2024-01-11 16:50:22 - root - INFO - Connection open, listening for messages
Jan 11 16:50:43 mail.example.com push-notify-client[1437780]: 2024-01-11 16:50:43 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): push.example.com:443
Jan 11 16:50:43 mail.example.com push-notify-client[1437780]: 2024-01-11 16:50:43 - urllib3.connectionpool - DEBUG - https://push.example.com:443 "GET /application HTTP/1.1" 200 533
Jan 11 16:50:43 mail.example.com push-notify-client[1437780]: 2024-01-11 16:50:43 - root - DEBUG - Message [76] ping came from [5] mobile
Jan 11 16:50:43 mail.example.com push-notify-client[1437780]: 2024-01-11 16:50:43 - root - INFO - Received message [76] ping from [5] mobile
Jan 11 16:50:43 mail.example.com push-notify-client[1437780]: 2024-01-11 16:50:43 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): push.example.com:443
Jan 11 16:50:43 mail.example.com push-notify-client[1437780]: 2024-01-11 16:50:43 - urllib3.connectionpool - DEBUG - https://push.example.com:443 "POST /message HTTP/1.1" 200 104
Jan 11 16:50:43 mail.example.com push-notify-client[1437780]: 2024-01-11 16:50:43 - root - INFO - Reacted successfully
Jan 11 16:50:43 mail.example.com push-notify-client[1437780]: 2024-01-11 16:50:43 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): push.example.com:443
Jan 11 16:50:43 mail.example.com push-notify-client[1437780]: 2024-01-11 16:50:43 - urllib3.connectionpool - DEBUG - https://push.example.com:443 "GET /application HTTP/1.1" 200 533
Jan 11 16:50:43 mail.example.com push-notify-client[1437780]: 2024-01-11 16:50:43 - root - DEBUG - Message [77] pong came from [7] push-notify-client
Jan 11 16:50:43 mail.example.com push-notify-client[1437780]: 2024-01-11 16:50:43 - root - DEBUG - Received message [77] pong from self, ignoring
Client log:
2024-01-11 22:52:31.134 INFO: WebSocket(4): received message {"id":82,"appid":7,"message":"Test","title":"pong","priority":0,"date":"2024-01-11T21:52:30.920017261Z"}
2024-01-11 22:52:31.001 INFO: WebSocket(4): received message {"id":81,"appid":5,"message":"Test","title":"ping","priority":0,"date":"2024-01-11T21:52:30.765378008Z"}
2024-01-11 22:52:26.916 INFO: Removing message with id 79
2024-01-11 22:52:25.146 INFO: Entering ShareActivity
2024-01-11 22:52:23.130 INFO: Removing message with id 80
2024-01-11 22:51:19.501 INFO: Loading more messages for -1
![telegram-cloud-photo-size-2-5262620499077354780-y](https://github.com/gotify/android/assets/285866/24068e9c-18ae-4224-b2c4-d77beda2e0b9)
@Pikaro
I've tried reproducing this, but it works fine for me.
@cyb3rko I'm just putting it out there, but I haven't experienced any duplicate notifications for a couple of months at least, so I'm thinking that update you were referring to fixed the issue for me at least.
Edit: In saying that, I don't think there was a release, so maybe it was system-related?!
Should we close this one?
It seems @ngosang and @axllent don't have this issue anymore.
I have actually noticed it (since my last post) once, so I think it may still happen very rarely. Still no idea what causes it, nor how to replicate it to be honest. The fact is that I was experiencing it all-the-time (daily) before, and now almost never, so I'm happy to close this (it's not my call though, nor did I open this issue) :+1:
If it still happens, we should keep this issue open
I also experience duplicate notifications. Almost every day. But for me not at the same time.
I get a notification on my Android phone and delete the message in the Android app. If I go to the webui, It shows that there are no messages present. Then the next day I recieve exactly the same notification again on my phone. The duplicated notification gets send along when there is a new notification from some other source.
Example:
Day 1: App-A sends notification 1 -> Phone shows notification 1 -> Delete notification 1.
Day 2: App-B sends notification 2 -> Phone shows notification 2 from App-B and notification 1 from App-A.
Client: Phone: Samsung s21fe Android version: 14 OneUI: 6.1 Gotify Android: 2.7.1
Server: All as Docker containers. Gotify: 2.5.0 Traefik: 3.1.6
And the duplicated notification does not appear in the web UI, only on the phone?
For me it somehow sounds like the problem would be server-related or related to the producer of the notifications.
Because the Android app only consumes a websocket and reacts to new notifications.
I only know that when the notifications are removed in the Android app, they are also removed from the webui.
I have to check if they reappear in the webui at the time that the Android app shows it again the next day.
I will get back to you when I have received the duplicated notification.
One month ago I started receiving duplicated notifications/messages in my phone. Before that it was working as expected.