Closed
Bug 980132
Opened 11 years ago
Closed 7 years ago
[B2G][Notifications API][Browser] "onclose" is not fire in logcat when notification is replaced
Categories
(Firefox OS Graveyard :: Gaia::System, defect, P2)
Tracking
(tracking-b2g:backlog, b2g-v1.3T affected, b2g-v1.4 affected, b2g-v2.0 affected, b2g-v2.1 affected, b2g-v2.2 affected)
RESOLVED
WONTFIX
tracking-b2g | backlog |
People
(Reporter: sarsenyev, Assigned: mikehenrty)
References
Details
(Whiteboard: [systemsfe], permafail)
Attachments
(3 files)
Description:
When replacing WebAPI Notification, "onclose isn't fire up in logcat
Repro Steps:
1) Updated Buri to Build ID: 20140304040200.
2) Go to http://mozqa.com/qa-testcase-data/webapi/notifications/index.html
3) Tap on "Request permission"
4) Upon permission granted, have title alone as "A" with tag x
5) Tap "Show Notification"
6) Replace title with letter "B"
7) Tap "Show Notification"
Actual:
The notification is replaced but doesn't show "onclose" in logcat
Expected:
The notification is replaced and "onclose" fires up in logcat
1.4 Environmental Variables:
Device: Buri 1.4 MOZ
BuildID: 20140304040200
Gaia: 6df4533f14ec2645bb13d8a803a5151583ca13a8
Gecko: 529b86b92b1d
Version: 30.0a1
Firmware Version: v1.2-device.cfg
Repro frequency: 100%,
https://moztrap.mozilla.org/manage/cases/?filter-id=9954
See attached: logcat
The issue doesn't reproduce on 1.3
1.3 Environmental Variables:
Device: Buri 1.3 MOZ
BuildID: 20140304004001
Gaia: 242e477761643a440e6b244d291fb9d0ce204993
Gecko: 8b90bef8738c
Version: 28.0
Firmware Version: v1.2-device.cfg
status-b2g-v1.3:
--- → unaffected
status-b2g-v1.4:
--- → affected
Updated•11 years ago
|
blocking-b2g: --- → 1.4?
Component: Gaia::System → DOM: Device Interfaces
Product: Firefox OS → Core
Whiteboard: burirun1.4-1 → burirun1.4-1 [systemsfe]
Version: unspecified → Trunk
Updated•11 years ago
|
Blocks: b2g-notifications
Updated•11 years ago
|
Keywords: regression,
regressionwindow-wanted
Comment 2•11 years ago
|
||
I suspect it's a regression in the console API. I take this.
Assignee: nobody → amarchesini
Comment 3•11 years ago
|
||
Unblocking since this is web console regression, which is minor overall.
Comment 4•11 years ago
|
||
On desktop I cannot reproduce it. I'm flashing the device to see there.
Comment 5•11 years ago
|
||
It doesn't seem a regression in the Console API but some notification/gaia issue.
ConsoleAPI is not called at all. It means that 'close' event is not dispatched (?!?)
Comment 6•11 years ago
|
||
Ok - reverting blocking flag then since this is a notifications API regression.
blocking-b2g: --- → 1.4?
Keywords: regressionwindow-wanted
Updated•11 years ago
|
Blocks: b2g-notifications
Comment 7•11 years ago
|
||
I don't know how the Notifications are displayed/dismissed on B2G. Alive, do you know if what and when should an alert div be closed?
On Desktop an alert is a window and the 'close' event is dispatched when that window receives the unload event. What about B2G?
Flags: needinfo?(alive)
Assignee | ||
Comment 8•11 years ago
|
||
(In reply to Andrea Marchesini (:baku) from comment #7)
> On Desktop an alert is a window and the 'close' event is dispatched when
> that window receives the unload event. What about B2G?
In B2G, we have a special case for when we detect a notification replacement by tag [1]. We need to manually fire a close event here (like we do here [2]) in order to follow the spec [3]. Should be a simple fix. Baku, you are welcome to still take this, but if you want someone from B2G to help out I or gerard-max could take it.
1.) https://github.com/mozilla-b2g/gaia/blob/98cf46/apps/system/js/notifications.js#L338
2.) https://github.com/mozilla-b2g/gaia/blob/98cf46/apps/system/js/notifications.js#L459
3.) http://notifications.spec.whatwg.org/#replacing-a-notification
Flags: needinfo?(alive)
Comment 9•11 years ago
|
||
> In B2G, we have a special case for when we detect a notification replacement
> by tag [1]. We need to manually fire a close event here (like we do here
> [2]) in order to follow the spec [3]. Should be a simple fix. Baku, you are
> welcome to still take this, but if you want someone from B2G to help out I
> or gerard-max could take it.
Ok. Thanks.
Assignee: amarchesini → nobody
Updated•11 years ago
|
Assignee: nobody → mhenretty
blocking-b2g: 1.4? → 1.4+
Target Milestone: --- → 1.4 S3 (14mar)
Updated•11 years ago
|
QA Contact: mvaughan
Comment 10•11 years ago
|
||
Looks like don't need me here, clear.
Comment 11•11 years ago
|
||
This issue started reproducing on the 12/18/13 1.4 build. One thing I notice in the builds that this issue reproduces in is that notifications cannot be dismissed from the notifications dropdown. Even after being tapped in some way, the notification will persist and therefore not trigger the "onclose".
- Last Working -
Device: Buri v1.4 MOZ RIL
BuildID: 20131217040201
Gaia: 545aacf3feff6430140cc9ade757002df4895b77
Gecko: b1e5ade62913
Version: 29.0a1
Firmware Version: V1.2-device.cfg
- First Broken -
Device: Buri v1.4 MOZ RIL
BuildID: 20131218040201
Gaia: e2f0e09e980b1cb3275a0bb033931cb48f9d521c
Gecko: 862cb6a1cc88
Version: 29.0a1
Firmware Version: V1.2-device.cfg
**After swapping the builds' geckos/gaias, this looks to be a gaia issue**
last working gaia/first broken gecko = NO REPRO
Gaia 545aacf3feff6430140cc9ade757002df4895b77
Gecko 862cb6a1cc88
first broken gaia/last working gecko = REPRO
Gaia e2f0e09e980b1cb3275a0bb033931cb48f9d521c
Gecko b1e5ade62913
Push log: https://github.com/mozilla-b2g/gaia/compare/545aacf3feff6430140cc9ade757002df4895b77...e2f0e09e980b1cb3275a0bb033931cb48f9d521c
Keywords: regressionwindow-wanted
Updated•11 years ago
|
Component: DOM: Device Interfaces → Gaia::System
Product: Core → Firefox OS
Version: Trunk → unspecified
Assignee | ||
Comment 12•11 years ago
|
||
(In reply to Matthew Vaughan from comment #11)
> [snip]... One thing I notice
> in the builds that this issue reproduces in is that notifications cannot be
> dismissed from the notifications dropdown. Even after being tapped in some
> way, the notification will persist and therefore not trigger the "onclose".
This was an intentional change. See https://bugzilla.mozilla.org/show_bug.cgi?id=980593#c4
Assignee | ||
Comment 13•11 years ago
|
||
Hrm, looking at the code at the code it's hard for me to believe that B2G ever fired the onclose handler when replacing notifications. I tried with the last known working version of Gaia (545aacf3feff6430140cc9ade757002df4895b77), and I didn't see the onclose logcat entry. I also tried with the 1.3 build specified in comment 1, but still no "onclose". The only time I see the "onclose" entry is if I background and then foreground the browser, which is a bug we fixed (bug 890440).
Matthew, would you mind attaching the logcat dump from your last working build so I can poke around?
Flags: needinfo?(mvaughan)
Comment 14•11 years ago
|
||
(In reply to Michael Henretty [:mhenretty] from comment #13)
> Hrm, looking at the code at the code it's hard for me to believe that B2G
> ever fired the onclose handler when replacing notifications. I tried with
> the last known working version of Gaia
> (545aacf3feff6430140cc9ade757002df4895b77), and I didn't see the onclose
> logcat entry. I also tried with the 1.3 build specified in comment 1, but
> still no "onclose". The only time I see the "onclose" entry is if I
> background and then foreground the browser, which is a bug we fixed (bug
> 890440).
>
> Matthew, would you mind attaching the logcat dump from your last working
> build so I can poke around?
Note as a point of comparison - onclose fires correctly in the Desktop Firefox case just fine when replacing a notification.
Comment 15•11 years ago
|
||
If the regression range is correct here, then bug 890440 is definitely the cause.
Blocks: 890440
Comment 16•11 years ago
|
||
Leaving qawanted for getting the logcat for the last working build.
Keywords: qawanted
Reporter | ||
Comment 17•11 years ago
|
||
Logcat from the last working build
Reporter | ||
Comment 19•11 years ago
|
||
Note: "onclose" fires up only when closing browser app by tapping the home screen
And notification disappears from the notification screen when tapping the home button
On broken build "onclose" doesn't fire up at all
Comment 20•11 years ago
|
||
(In reply to sarsenyev from comment #19)
> Note: "onclose" fires up only when closing browser app by tapping the home
> screen
> And notification disappears from the notification screen when tapping the
> home button
> On broken build "onclose" doesn't fire up at all
That's the not the bug here. The bug here doesn't include STR that includes hitting the home button.
QA Wanted to reclarify STR.
Keywords: qawanted
Assignee | ||
Comment 21•11 years ago
|
||
While we are figuring out the regression window, let's have Alexandre take a look at the fix.
Attachment #8389536 -
Flags: review?(lissyx+mozillians)
Comment 22•11 years ago
|
||
(In reply to Michael Henretty [:mhenretty] from comment #21)
> Created attachment 8389536 [details]
> Github PR
>
> While we are figuring out the regression window, let's have Alexandre take a
> look at the fix.
If you've already got a patch at this point, then I don't think we need to continue QA analysis.
Keywords: qawanted
Comment 23•11 years ago
|
||
(In reply to Michael Henretty [:mhenretty] from comment #21)
> Created attachment 8389536 [details]
> Github PR
>
> While we are figuring out the regression window, let's have Alexandre take a
> look at the fix.
I'm having a look. One of the travis jobs timed out, I've restarted it.
Comment 24•11 years ago
|
||
Unblocking this as checking this myself, I'm not seeing onclose fire in the logcat when replacing a notification. So this is not a regression.
No longer blocks: 890440
blocking-b2g: 1.4+ → ---
status-b2g-v1.3:
unaffected → ---
Keywords: regression
Updated•11 years ago
|
blocking-b2g: --- → backlog
Comment 25•11 years ago
|
||
Comment on attachment 8389536 [details]
Github PR
This is working fine after live testing. There is a few factoring that we may need to do before landing this, but other than that, I'm fine with this change.
I took time, also, to check whether this will work when we will land the notification after reboot support, and good news, it should be okay by then.
Attachment #8389536 -
Flags: review?(lissyx+mozillians) → review+
Updated•11 years ago
|
Target Milestone: 1.4 S3 (14mar) → 1.4 S4 (28mar)
Assignee | ||
Comment 26•11 years ago
|
||
Comment on attachment 8389536 [details]
Github PR
Ugh, unfortunately this is not the right approach. We need to fire the close event on the old notification, not the new one. But sadly the system app has no way to distinguish between the two right now. This is because the unique identifier for each notification, which comes from gecko's alert service, is a combo of origin(app)/tag, which is shared by both the old and new notification. To fix this properly it will require changes to the alert service.
Whiteboard: burirun1.4-1 [systemsfe] → burirun1.4-1 [systemsfe], burirun1.4-2
Assignee | ||
Updated•11 years ago
|
Target Milestone: 1.4 S4 (28mar) → ---
Updated•11 years ago
|
status-b2g-v1.3T:
--- → affected
Whiteboard: burirun1.4-1 [systemsfe], burirun1.4-2 → [systemsfe], permafail
Updated•10 years ago
|
status-b2g-v2.0:
--- → affected
Comment 27•10 years ago
|
||
(In reply to Michael Henretty [:mhenretty] (PTO until June 30th) from comment #26)
> Comment on attachment 8389536 [details]
> Github PR
>
> Ugh, unfortunately this is not the right approach. We need to fire the close
> event on the old notification, not the new one. But sadly the system app has
> no way to distinguish between the two right now. This is because the unique
> identifier for each notification, which comes from gecko's alert service, is
> a combo of origin(app)/tag, which is shared by both the old and new
> notification. To fix this properly it will require changes to the alert
> service.
We have timestamp available now.
Comment 28•10 years ago
|
||
This bug may lead to inconsistent user UX when dealing with resent notifications.
Flags: needinfo?(mhenretty)
Flags: needinfo?(anygregor)
Assignee | ||
Comment 29•10 years ago
|
||
(In reply to Alexandre LISSY :gerard-majax from comment #28)
> This bug may lead to inconsistent user UX when dealing with resent
> notifications.
Can you be more specific? What use case are you concerned about with resent notifications?
Flags: needinfo?(mhenretty)
Comment 30•10 years ago
|
||
(In reply to Michael Henretty [:mhenretty] from comment #29)
> (In reply to Alexandre LISSY :gerard-majax from comment #28)
> > This bug may lead to inconsistent user UX when dealing with resent
> > notifications.
>
> Can you be more specific? What use case are you concerned about with resent
> notifications?
That's a good question, now that you are back from PTO :). I think my point was to remind that we had not fixed this now, and that the missing bit you were asking for is now available. So:
- we now have timestamp
- not having timestamp was a problem
- not closing notification will lead to strange UX for user
Do you think we can fix this now?
Assignee | ||
Comment 31•10 years ago
|
||
I think instead of timestamp, you mean dbID? So yes I think we can fix this now!
(In reply to Alexandre LISSY :gerard-majax from comment #28)
> This bug may lead to inconsistent user UX when dealing with resent
> notifications.
Still not sure what this means. Do you mean by fixing this bug, we get inconsistent behavior, or not fixing this bug?
Updated•10 years ago
|
Updated•10 years ago
|
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(dharris)
Updated•10 years ago
|
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][lead-review+]
Assignee | ||
Updated•10 years ago
|
Priority: -- → P2
Updated•10 years ago
|
QA Whiteboard: [QAnalyst-Triage+][lead-review+] → [QAnalyst-Triage?][lead-review+]
status-b2g-v2.2:
--- → affected
Flags: needinfo?(dharris)
Updated•10 years ago
|
QA Whiteboard: [QAnalyst-Triage?][lead-review+] → [QAnalyst-Triage+][lead-review+]
Flags: needinfo?(dharris)
Updated•10 years ago
|
blocking-b2g: backlog → ---
tracking-b2g:
--- → backlog
Updated•9 years ago
|
Flags: needinfo?(anygregor)
Comment 32•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•