Page MenuHomePhabricator

Notifications - missing message and broken navigation for non-latin user talk page messages
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
Tsevener
May 3 2022, 10:16 PM
Referenced Files
F35102738: IMG_0716.PNG
May 4 2022, 2:51 PM
F35102721: IMG_0718.PNG
May 4 2022, 2:51 PM
F35102718: IMG_0717.PNG
May 4 2022, 2:51 PM
F35102733: IMG_0714.PNG
May 4 2022, 2:51 PM
F35102727: IMG_0720.PNG
May 4 2022, 2:51 PM
F35102730: IMG_0713.PNG
May 4 2022, 2:51 PM
F35102736: IMG_0715.PNG
May 4 2022, 2:51 PM
F35102724: IMG_0719.PNG
May 4 2022, 2:51 PM

Description

How many times were you able to reproduce it?

Every time

Steps to reproduce

  1. Write a new topic message on a user talk page, be sure to put special characters in the topic title. Here's my example from ES Wikipedia.
  2. Load Notifications Center

Note: screenshots are taken from a real notification that surfaced this bug from Gujarati Wikipedia. Expected results screenshots are taken from the PR branch, Actual results screenshots are taken from our current main branch.

Expected results

  1. Notifications message area is populated with specific notification body text.

IMG_0717.PNG (667×375 px, 276 KB)

IMG_0718.PNG (667×375 px, 192 KB)

  1. Link to "Your talk page" goes to correct native talk page on that language Wiki.

IMG_0719.PNG (667×375 px, 81 KB)

  1. Link to diff goes to diff screen of user talk message being added.

IMG_0720.PNG (667×375 px, 213 KB)

Actual results

  1. Notifications message area is empty or generic on cell and detail screen.

IMG_0713.PNG (667×375 px, 230 KB)

IMG_0714.PNG (667×375 px, 140 KB)

  1. Link to "Your talk page" goes to corrupted native talk page (it's always empty, like it's missing the project name or something).

IMG_0715.PNG (667×375 px, 130 KB)

  1. Link to diff goes to diff screen of random EN revision (?!)

IMG_0716.PNG (667×375 px, 206 KB)

Environments observed

App version: 6.9.0 (1921)
OS versions: 15.4.1
Device model: iPhone 7
Device language: EN

Event Timeline

@Tsevener Haven't figured out a fix yet, but here's a haphazard look at where I left it today:

  • Followed the path of a problematic notification from NotificationsCenterActionData up through RemoteNotificationsAPIController and to Session
  • NotificationsCenterCommonViewModel.LinkData seems to be nil, missing the primary link host for the problematic actions
  • It seems like the raw HTTP API response received in Session for a notification result does indeed contain the expected from the API content (link URLs)
  • BUT it seems like RemoteNotificationsAPIController is having trouble decoding the Message struct: https://github.com/wikimedia/wikipedia-ios/blob/0da19f3e796ab042fdc201af10a1ce42a6be5155/WMF%20Framework/Remote%20Notifications/RemoteNotificationsAPIController.swift#L151
  • Specifically, it seems to be having trouble decoding RemoteNotificationLink on the problem notifications
  • I don't know if this is the fundamental problem, but it does seem to be a problem at least

A good place to start might be getting Message to decode for the problematic notifications. I hope this helps.

@Dmantena awesome, thanks for the investigation and pointers! It saved me some time this morning. Here's the PR:

https://github.com/wikimedia/wikipedia-ios/pull/4207

Tsevener updated the task description. (Show Details)
JMinor claimed this task.
JMinor subscribed.

Great catch @Tsevener