Closed Bug 1825357 Opened 3 years ago Closed 3 years ago

The “message_expired” event is not sent for messaging notifications without "style": "NOTIFICATION" set

Categories

(Firefox for Android :: Experimentation and Telemetry, defect)

Desktop
Android
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox112 --- affected
firefox113 --- affected

People

(Reporter: mheres, Unassigned)

References

Details

[Affected versions]:

  • Firefox Beta 112 (local build set to Stage) (Build #2015940741), 4219b85b96+ GV: 112.0-20230313153916 AS: 97.2.0
  • Firefox Nightly 113.0a1 (local build set to Stage) (Build #2015941677), 274454fada GV: 113.0a1 - 20230328163437, AS: 97.2.0

[Affected Platforms]:

  • Android 9 - Samsung Galaxy S8.

[Prerequisites]:

  • Have an experiment using the messaging feature, set to display a notification.
  • The notification has "surface": "notification" set, but not "style": "NOTIFICATION".

[Steps to reproduce]:

  1. Enroll in the experiment (observe that the appropriate branch is checked in Debug menu > Nimbus Experiments > name of experiment).
  2. Close the app and open it with a telemetry command (e.g. for Firefox Beta: adb shell am start -n org.mozilla.firefox_beta/mozilla.telemetry.glean.debug.GleanDebugActivity --ez logPings true --es sendPing metrics --es debugViewTag <name>).
  3. Change the time to 4 hours in the future.
  4. Confirm that the message has been displayed in the notifications view.
  5. Send the app in the background a few times.
  6. Navigate to the Glean viewer (https://debug-ping-preview.firebaseapp.com/pings/<name>) and search the “message_expired” ping through the events received.

[Expected result]:

  • The “message_expired” event is sent together with the “message_shown” event.

[Actual result]:

  • The “message_expired” event is not sent together with the “message_shown” event.

[Notes]:

  • The issue is not reproducible for messaging notifications with both style and platform set.
See Also: → 1822899

After a discussion with :jhugman, this behavior is expected because notifications without a style set default to max-display-count: 5.
This is consistent with the results seen in testing. After the notification was displayed for the first time, the device was restarted. The time was changed to 4h in the future again to trigger the notification and the notification was displayed again. In total, the notification was displayed exactly 5 times, and at the 5th time it was displayed, a "message_expired" event was sent together with the "message_shown" event.
Tested on a local Firefox Nightly (nightly build variant set to Stage) 113.0a1 (Build #2015941859), c56db2d798 GV: 113.0a1-20230329095653 AS: 97.3.0 and Firefox Beta (beta build variant set to Stage) 112 (Build #2015941835), f09703fe4e+ GV: 112.0-20230328180038 AS: 97.2.0 using Android 9 - Samsung Galaxy S8.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.