[HNT] Starting new private tab from tabstray doesn't always create notification
Categories
(Firefox for Android :: Homepage, defect)
Tracking
()
People
(Reporter: tcampbell, Assigned: npoon)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid] [group5])
Attachments
(1 file, 1 external file)
|
3.37 MB,
video/mp4
|
Details |
This one is intermittent and I haven't been able to get a video yet.
When I open first private tab from tab tray, I'll see a tabcount of 1 but sometimes the notification doesn't appear. Without HNT, the notification would not appear until we create first tab but in this case we did create the tab and it isn't show. Some sort of race condition likely.
| Reporter | ||
Comment 1•2 months ago
|
||
Ah, this seems to be related to Android deferring notifications in some cases: https://developer.android.com/about/versions/12/behavior-changes-all#foreground-service-notification-delay
If I wait 10 seconds, the notification eventually appears. There seems to be some sort of NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE escape hatch that might work.
Comment 2•2 months ago
|
||
| frontend-triage | ||
AbstractPrivateNotificationService.kt builds the foreground-service notification without setForegroundServiceBehavior(FOREGROUND_SERVICE_IMMEDIATE), and the browsing-session channel is IMPORTANCE_LOW with lights and vibration disabled and no notification actions (#255-260), so the notification matches none of the exemptions from the Android 12+ 10-second display deferral you linked. HNT only changes when the first private tab is created, which is what makes the deferral visible.
Fix: Add .setForegroundServiceBehavior(NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE) to the builder chain in createNotification(), the way ProfilerService.kt already does for the profiler notification, and extend AbstractPrivateNotificationServiceTest.kt, which already captures the notification passed to startForeground, to assert the behavior field.
Suggested severity: S3. The notification is the only way to erase private tabs from outside the app and it is absent for up to 10 seconds after the first private tab opens, but it does arrive on its own without user action.
If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-wrong-file, ai-triage-wrong-cause, ai-triage-hallucination, ai-triage-out-of-scope, ai-triage-wrong-fix, ai-triage-shallow-fix.
Needinfo hackbot@mozilla.tld to have a patch generated for this bug, include any questions or directions as needed in your comment.
| Assignee | ||
Updated•2 months ago
|
Updated•2 months ago
|
| Assignee | ||
Updated•1 month ago
|
Comment 3•1 month ago
|
||
(via GitHub webhook, authenticated as shared-secret)
| Assignee | ||
Updated•1 month ago
|
| Comment hidden (hide) |
Comment 6•1 month ago
|
||
| bugherder | ||
Comment 7•1 month ago
|
||
Verified as fixed on the latest Nightly 161.0a1 from 26.10.2026 with Pixel 7 PRO (Android 17) and Samsung S25 (Android 15).
Updated•1 month ago
|
Description
•