mattermost-mobile icon indicating copy to clipboard operation
mattermost-mobile copied to clipboard

iOS app - Notification badge is not correct

Open andreineacsu opened this issue 2 years ago • 7 comments

Summary

The notification badge on iOS is not correct in most of the times

Steps to reproduce

  1. Send 4 messages to an account that has the iOS app installed.
  2. The badge should display 4.
  3. Read them on Web or Desktop.
  4. The iOS badge is still 4.
  5. Open the iOS app - iOS badge is still 4.
  6. Write again to the same account - badge is 1.

Expected behavior

The iOS badge should update once the messages are read disregarding the platform they were read.

andreineacsu avatar Nov 22 '23 10:11 andreineacsu

Hi @andreineacsu,

  1. What OS version are you on?
  2. What Mattermost mobile app version are you on?

amyblais avatar Nov 22 '23 13:11 amyblais

iOS 17.1.1 App version 2.10.0

andreineacsu avatar Nov 22 '23 14:11 andreineacsu

Opened https://mattermost.atlassian.net/browse/MM-55713.

amyblais avatar Nov 22 '23 14:11 amyblais

My app always shows a very high number of messages in the badge (for example 22). When I open Mattermost, I have no new messages. When I close it, the number in the badge disappears. But it comes back after a while.

I am using Mattermost Beta 2.11.0 (498) with an iPhone 12 and Ios 17.1.2

However, the error has existed for much longer.

LukasFiniarel avatar Dec 07 '23 10:12 LukasFiniarel

@LukasFiniarel In the logs (Profile -> Settings -> Report a problem), you may find some log messages like

Setting the badge count based on database values to X

Or

Not updating badge count, since we have no mentions in the database, and the number of notifications in the notification center is X

Do you mind checking what message do you see and what is the value you are seeing?

larkox avatar Dec 11 '23 10:12 larkox

I get "Setting the number of badges based on database values to 0" a few times.

The badge displayed 36 before opening.

Complete log:

2023/12/11 12:31:54:595 INFO Launch app in Home screen
2023/12/11 12:31:54:615 INFO channel switch to Anwesenheit akkmytrnjtb17fchg4rgukymth 25 ms
2023/12/11 12:31:54:615 INFO websocket connecting to wss://HOSTNAME/api/v4/websocket?connection_id=&sequence_number=0
2023/12/11 12:31:54:685 INFO Running "Home
2023/12/11 12:31:54:707 INFO Running "Channel
2023/12/11 12:31:54:917 DEBUG Setting the badge count based on database values to 0
2023/12/11 12:31:55:087 DEBUG error on fetchBindings Received invalid response from the server.; JSON could not be serialized because of error:
Die Daten konnten nicht gelesen werden, da sie nicht das korrekte Format haben.
2023/12/11 12:31:55:092 INFO websocket connected to wss://HOSTNAME/api/v4/websocket?connection_id=&sequence_number=0
2023/12/11 12:31:55:092 INFO wss://HOSTNAME/api/v4/websocket?connection_id=&sequence_number=0 got connection id  3kfq4wkq3bnk7be1saj8up435r
2023/12/11 12:31:55:733 INFO WEBSOCKET RECONNECT MODELS BATCHING TOOK 47ms
2023/12/11 12:31:55:739 DEBUG Setting the badge count based on database values to 0
2023/12/11 12:31:59:715 DEBUG error on fetchThreads Response with status code 500
2023/12/11 12:32:03:646 DEBUG error on fetchThreads Response with status code 500
2023/12/11 12:32:03:898 DEBUG Setting the badge count based on database values to 0
2023/12/11 13:44:59:599 INFO Launch app in Home screen
2023/12/11 13:44:59:602 INFO channel switch to Anwesenheit akkmytrnjtb17fchg4rgukymth 11 ms
2023/12/11 13:44:59:603 INFO websocket connecting to wss://HOSTNAME/api/v4/websocket?connection_id=&sequence_number=0
2023/12/11 13:44:59:647 INFO Running "Home
2023/12/11 13:44:59:652 INFO Running "Channel
2023/12/11 13:44:59:914 DEBUG error on fetchBindings Received invalid response from the server.; JSON could not be serialized because of error:
Die Daten konnten nicht gelesen werden, da sie nicht das korrekte Format haben.
2023/12/11 13:44:59:920 INFO websocket connected to wss://HOSTNAME/api/v4/websocket?connection_id=&sequence_number=0
2023/12/11 13:44:59:920 DEBUG Setting the badge count based on database values to 0
2023/12/11 13:44:59:920 INFO wss://HOSTNAME/api/v4/websocket?connection_id=&sequence_number=0 got connection id  9tq8kunruinbxfagt3a1jxkdoo
2023/12/11 13:45:00:520 INFO WEBSOCKET RECONNECT MODELS BATCHING TOOK 57ms
2023/12/11 13:45:00:521 DEBUG Setting the badge count based on database values to 0
2023/12/11 13:45:04:666 DEBUG error on fetchThreads Response with status code 500
2023/12/11 13:45:05:290 INFO Running "Settings
2023/12/11 13:45:08:553 DEBUG error on fetchThreads Response with status code 500
2023/12/11 13:45:12:433 DEBUG error on fetchThreads Response with status code 500
2023/12/11 13:45:12:502 DEBUG error on fetchBindings Received invalid response from the server.; JSON could not be serialized because of error:
Die Daten konnten nicht gelesen werden, da sie nicht das korrekte Format haben.

LukasFiniarel avatar Dec 11 '23 12:12 LukasFiniarel

A year on, the latest on this seems to be https://mattermost.atlassian.net/browse/MM-50383

we’ll move it to the backlog as it is not a priority at this time. (August 30, 2024)

simonwiles avatar Dec 10 '24 18:12 simonwiles