Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS App badge count off by 5+ (follow up on closed issue #6829) #7135

Closed
ArneNostitz opened this issue Dec 2, 2022 · 9 comments
Closed

iOS App badge count off by 5+ (follow up on closed issue #6829) #7135

ArneNostitz opened this issue Dec 2, 2022 · 9 comments
Labels
A-Notifications O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@ArneNostitz
Copy link

Steps to reproduce

  1. Where are you starting? What can you see?
    iOS notification badge on App Icon is off by 5.
  • a new msg comes in, badge count is 6;
  • reading it on another device it goes to 5;
  • OR opening the app and closing it again without reading it somewhere else or in the app itself: it corrects to 1

As the badge count on mac is correct, I dont think it is a server issue as mentioned in the old thread.
wrong count ios

Outcome

What did you expect?

correct count: 1

What happened instead?

incorrect count: 6

Your phone model

iphone XS, iPad Pro 2020

Operating system version

ios 15/16

Application version

1.9.10

Homeserver

Synapse (Ansible Docker installation updated yesterday, 2022/12/01

Will you send logs?

Yes

@ArneNostitz ArneNostitz added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Dec 2, 2022
@pixlwave
Copy link
Member

pixlwave commented Dec 5, 2022

@ArneNostitz Do you use threads in some rooms. From my testing this seems related to #7090 but would like to double check this. Do you seen some rooms in the Unread filter even after long pressing and marking as read?

@ArneNostitz
Copy link
Author

no, this did not yet happen to me - at least not that i realized ;-) . the unread msg count inside the app is correct. it's the badge count on OS level (on the app icon) that's wrong ...

@pixlwave
Copy link
Member

pixlwave commented Dec 5, 2022

When you say unread msg count inside the app where are you seeing this value?

@ArneNostitz
Copy link
Author

the "unread msg count inside the app" is the value next to the single rooms. and the "summary" on top of the list. also on the "spaces" (although i cant say if the spaces have a summary on iOS right now). these numbers are correct. these also "update" correctly when read on another device.

only on iOS the App Icon holds a 5 extra when there is a new msg (showing 6 unread instad of 1) - and when i read the msg on another device it goes to 5 instead of 0.
I dont have any "real" matrix rooms. they are all bridged. but it happens across multiple different bridges. and ONLY on iOS. the mac app is correct.

@toshanmugaraj
Copy link
Contributor

I see there is a random merge conflict happening, when storing the MXRoomSummaryMO, not sure if this happens here:

https://github.com/matrix-org/matrix-ios-sdk/blob/f4e268fdb4e950b2ca92f6f18fe8bd1311f47cba/MatrixSDK/Data/MXRoomSummary.m#L890

This is the place to where notification count should have gone wrong.

 🚨 [MXCoreDataRoomSummaryStore] saveIfNeeded failed Error Domain=NSCocoaErrorDomain Code=133020 "Could not merge changes." UserInfo={conflictList=(
    "NSMergeConflict (0x280a4b1c0) for NSManagedObject (0x2832b80f0) with objectID '0xae94cc1ca5c85f6a <x-coredata://D9D6C83A-8B8B-434C-8AA9-4AF3C0DF5ECB/MXRoomLastMessage/p272>' with oldVersion = 21 and newVersion = 24 and

@toshanmugaraj
Copy link
Contributor

toshanmugaraj commented Dec 8, 2022

@pixlwave Not sure if many matrix.org users bug report logs have this error:

[MXCoreDataRoomSummaryStore] saveIfNeeded failed Error Domain=

@toshanmugaraj
Copy link
Contributor

toshanmugaraj commented Dec 8, 2022

@ArneNostitz Can you Clear Cache from settings, and check if the notification count mismatch gets resolved.

@ArneNostitz
Copy link
Author

@toshanmugaraj omg!!! i didn't knew that this was an option. i had to do it twice but it's solved! thanks so much

it reintroduced 5 old linked in conversations ... apprently they got stuck in a unread state without being unread.

after clearing cache twice and also "set all read" they disappeared back to the bottom of the rooms and the Overcount is gone. thank you so.

@pixlwave pixlwave added A-Notifications S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Occasional Affects or can be seen by some users regularly or most users rarely labels Dec 9, 2022
@toshanmugaraj
Copy link
Contributor

the space invites are added to the notification count and the recent release with badge count over spaces should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Notifications O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

No branches or pull requests

3 participants