Push notifications missing when app in foreground, but device locked

Bug #1507510 reported by Michał Karnicki on 2015-10-19
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Canonical System Image
High
Bill Filler
The Savilerow project
Critical
Yuan-Chen Cheng
ubuntu-push (Ubuntu)
High
Jonas G. Drange

Bug Description

This bug has been reproduced with Telegram (both v1 and alpha2 v2), but would affect any app that makes use of our push API.

Prerequisite:
- application is in foreground
- power button pressed, screen is off

Action:
- send a message to device

Expected:
- notification arrives (led, sound, notification visible at top after power button pressed)

Actual:
- no notification (no led, no sound, not even a persistent notification*)

* I would expect to see a notification even though the app is in foreground, but behind the lock screen.

Misc:
I have confirmed the push comes through, as the ubuntu-push-client.log does show it correctly (while the screen is off, but there was no visible/audible notification)
https://pastebin.canonical.com/142042/

phablet@ubuntu-phablet:~$ system-image-cli -i
current build number: 28
device name: krillin
channel: ubuntu-touch/rc/bq-aquaris.en
last update: 2015-10-19 07:22:32
version version: 28
version ubuntu: 20151015
version device: 20150821-736d127
version custom: 20150925-901-35-40-vivid

Device: BQ Aquarius E4.5

Related branches

Changed in canonical-devices-system-image:
assignee: nobody → Bill Filler (bfiller)
milestone: none → backlog
Changed in canonical-devices-system-image:
importance: Undecided → Medium
status: New → Confirmed
Bill Filler (bfiller) on 2015-10-19
Changed in ubuntu-push (Ubuntu):
assignee: nobody → Jonas G. Drange (jonas-drange)
importance: Undecided → High
XiaoGuo, Liu (liu-xiao-guo) wrote :

I just did a testing, and I did receive the notification on my MX4 device. I did the following:

1) Install the "hello" from our Ubuntu store. It is a push notification client
2) Register an account with any name (nick) in the client
3) Open the webpage link at http://direct.ralsina.me:8001/

When the app is in the foreground and press the power button, On the webpage, just send a message to your client (to the nick). Then unlock the phone again, you will see that the message comes in and it is shown there in the app.

However, the problem is that there is no indication of the LED flashing or sound for the newly received notification. I think this is a must for a messaging app. An end user should not miss the reminding of the new messages.

Changed in savilerow:
status: New → Triaged
assignee: nobody → Yuan-Chen Cheng (ycheng-twn)
importance: Undecided → Critical
Michał Karnicki (karni) wrote :

Thank you for looking into this XiaoGuo. I will elaborate further on your comment, as it seems some important details seem to be missing.

> When the app is in the foreground and press the power button, On the webpage, just send a message to your client (to the nick).
> Then unlock the phone again, you will see that the message comes in and it is shown there in the app.

You will see the message comes in only because you turn the device back on. I saw multiple times (but not always!) the persistent notification would show up only *after* turning the device back on. Which misses the whole point of a notification concept.
Essentially, you're seeing the message show up in the app only because you just turned the device on.

> However, the problem is that there is no indication of the LED flashing or sound for the newly received notification.

There's no sound or LED or, occasionally, even no persistent notification for the newly received notification. When I tested this, I saw two different cases:
[before: device off, message sent, device stays silent even though it did receive a notification]
- I turn the device back on, and the notification immediately shows up (and is audible + LED)
- I turn the device back on, and there is even NO persistent notification (the one at the top), which is even more serious

To summarize: app in foreground && screen off == no audio/LED, possibly not even a persistent notification once screen is back on

Michał Karnicki (karni) wrote :

PS When I mention lack of persistent notification, I mean I would expect the notification to show up (or at least highlight the messaging indicator) even though the app is theoretically in foreground, but behind the screen lock.

I am aware that when the screen is on and the app is in foreground, there would be no notification, but the use case covered by this bug is real.

description: updated
Changed in canonical-devices-system-image:
importance: Medium → High
Pat McGowan (pat-mcgowan) wrote :

Seems in client/service/postal.go it needs to check not just if the app is focused but also if the greeter is active and if so proceed with the notification.

Changed in canonical-devices-system-image:
milestone: backlog → ww46-2015
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-push (Ubuntu):
status: New → Confirmed
Changed in ubuntu-push (Ubuntu):
status: Confirmed → In Progress
Changed in canonical-devices-system-image:
status: Confirmed → In Progress
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Changed in ubuntu-push (Ubuntu):
status: In Progress → Fix Released
status: Fix Released → Fix Committed
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Changed in ubuntu-push (Ubuntu):
status: Fix Committed → Fix Released
Changed in savilerow:
status: Triaged → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers