Open manuroe opened 6 years ago
A way to reproduce missing notifications:
-> The device will never show a notification for the message.
Looking at OS logs, Riot fired the watchdog described above.
After testing, the bug described in the previous comment is fixed by https://github.com/vector-im/riot-ios/commit/9f2fe587e38465778e4250706688d10aa04385fa.
Further push notification crash logs:
Push-notification-crash-logs.zip
At least for the last one, 18.12. 13:32 I know I missed a push notification for a message sent 13:31 to me. The other logs look very similar anyway.
Thanks @csett86 for your logs that confirm the fix I made is the right one.
Dave now receives a burst of notifications when he unlocks his phone in the morning.
The solution seems to move the storage of MXAccount credentials from NSUserDefaults to a simple file with the appropriate read access right like NSFileProtectionCompleteUntilFirstUserAuthentication
.
The reason of this move is explained at https://forums.developer.apple.com/thread/15685#45849: "IMO the best way around this is to avoid NSUserDefaults for stuff that you rely on in code paths that can execute in the background."
Is there any updates on this issue? Most of our employees on iOS are experiencing it to varying degree. Android works fine.
Happy to help with additional info if needed.
I have noticed that I don't get push notifications at all on iphone X but they work for the most part on an older ipad.
There are several reports of people complaining Riot sometimes misses to notify them like in the Riot iOS room.
I reproduced a possible similar bug at https://github.com/matrix-org/riot-ios-rageshakes/issues/748 where the notification happened with a 3 min delay. Looking at system logs, they show that the app tried to start at the time of the notification but it fired a 30s watchdog because it was infinitely looping at https://github.com/vector-im/riot-ios/blob/898353e47d0b70486885e322a2bd3620176e2383/Riot/AppDelegate.m#L315-L320
Note: this piece of code was for fixing spontaneous logout (https://github.com/vector-im/riot-ios/pull/1653)