android
android copied to clipboard
Duplicated notifications
One month ago I started receiving duplicated notifications/messages in my phone. Before that it was working as expected.
- This only happens in Android client, the Web UI is working well.
- There are not error traces in the client nor the server. I don't see duplicated traces, all is fine.
- If I refresh the notifications in the Android client the duplicate notifications disappear.
- Both notifications appear at the same time
- I'm I heavy user (100 notifications a day)
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
Image
@Pikaro
- Can you post the log of your application, the gotify/server log and the gotify/android log at the time when this bug occurs for you?
- Can you try to force close gotify/android and then recheck if the problem still occurs?
- Do you have another version of gotify/android installed (like the development build or an older version)
- What android version are you using?
- If you still can reproduce it, could you try out another unreleased apk with more debug logging?
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