Page MenuHomePhabricator

Mobile notifications showing as the integer limit
Open, LowPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Let your phone memory get full (to the point where taking photos via the "Camera" app is impossible).
  • Open the Wikipedia mobile app.
  • Open the profile button on the top-right
  • It may show that you have 9,223,372,036,854,775,807 notifications, although I've only ever encountered this once so I'm not sure. Clicking on the "notifications" button will show that you have zero notifications.
  • Restarting your cellular device fixes the issue.

What happens?:
See above.

What should have happened instead?:

it should have showed me that I had 513 notifications, the amount I had at the time of the bug.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Mobile app 7.6.4 (4819). My iPhone 14 version is 17.6.1.
Other information (browser name/version, screenshots, etc.):

image.png (2×1 px, 400 KB)

unnamed.jpg (2×1 px, 89 KB)

For those on the WM discord where I originally brought this up, I did end up getting a screenshot, apparently it just didn't show up in my "Photos" app until I restarted my cellular device.
Apologies if this is formatted incorrectly, I've never filed a bug report before. (en.wiki username is User:EF5, not sure why my username never updated).

Event Timeline

GOlson-WMF moved this task from Needs Triage to Bug Backlog on the Wikipedia-iOS-App-Backlog board.

Engineering notes:

On RemoteNotificationsController, verify the numberOfUnreadNotifications method to handle this case. Also check the updateCacheWithCurrentUnreadNotificationsCount method.

To repro the low memory state on simulator, you can refer to Apple Documentation here.

Hello. I believe this is a storage issue, not memory. When iOS storage is full, writing new data like photos or videos fails. The large notification number 9,223,372,036,854,775,807 most likely indicates an integer overflow from the app mishandling storage errors when retrieving the notification count.

I'm going to see if I can reproduce this.

Anvitha098 changed the task status from Open to In Progress.Mar 19 2025, 12:21 PM

@Sir_MemeGod Can I reproduce and test this without logging in? I have an IP address block and it does not seem to get fixed

Hi @Anvitha098, only logged-in users have access to notifications.

Got it.
Here is my PR: https://github.com/wikimedia/wikipedia-ios/pull/5230
Please review and give feedback. Thank you.

@Anvitha098 I reviewed your PR and requested some changes. Let me know if you need any help.

@Mazevedo thanks for the review. I was caught up with something very urgent. I will work on this immediately.

Mazevedo changed the task status from In Progress to Open.Jun 13 2025, 6:19 PM
Mazevedo removed Anvitha098 as the assignee of this task.