Closed
Bug 1037371
Opened 9 years ago
Closed 9 years ago
Notification close event handler not called
Categories
(Firefox OS Graveyard :: Gaia::System, defect)
Firefox OS Graveyard
Gaia::System
Tracking
(blocking-b2g:2.0+, b2g-v1.3 ?, b2g-v1.3T ?, b2g-v1.4 ?, b2g-v2.0 fixed, b2g-v2.1 fixed)
People
(Reporter: gerard-majax, Assigned: gerard-majax)
References
Details
(Keywords: regression, Whiteboard: [systemsfe])
Attachments
(2 files, 2 obsolete files)
While having a look at the intermittent bug 1010415, I wanted to improve the gaia integration test suite and make it less race-risky by using events listener. I noticed that 'show' event gets dispatched correctly, but 'close' was not. I have no idea why this was never caught by our current mochitests. So far my current understanding is the following: - on .close(), in Notification.cpp we get into Notification::CloseInternal() and we call CloseAlert() on the alertService - this gets handled in b2g/components/AlertsService.js where we send an |alert-notification-close| message to AlertsHelper - AlertsHelper received it and calls this.closeAlert() - AlertsHelper.closeAlert() sends a MozChromeNotificationEvent to Gaia
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
This Gecko patch is a WIP workaround that does the job, but as far as I can say we should be getting desktop-notification-close back from Gaia.
Assignee | ||
Comment 3•9 years ago
|
||
I'm suspecting this may be a regression that I introduced back in bug 963234.
Depends on: 963234
Keywords: regression
Assignee | ||
Comment 4•9 years ago
|
||
Fixing by just sending the mozContentNotificationEvent when we should have been doing this.
Attachment #8454354 -
Attachment is obsolete: true
Attachment #8454358 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Component: DOM: Events → Gaia::System
Product: Core → Firefox OS
Version: Trunk → unspecified
Assignee | ||
Updated•9 years ago
|
status-b2g-v1.3:
--- → ?
status-b2g-v1.3T:
--- → ?
status-b2g-v1.4:
--- → ?
status-b2g-v2.0:
--- → affected
status-b2g-v2.1:
--- → affected
Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8454405 [details] [review] Gaia fix That was my fault after all :)
Attachment #8454405 -
Flags: review?(mhenretty)
Attachment #8454405 -
Flags: review?(alive)
Assignee | ||
Comment 6•9 years ago
|
||
I'm taking the opportunity to remove executeScript() and use executeAsyncScript().
Assignee | ||
Comment 7•9 years ago
|
||
It's all clean locally, tested with OOP Mulet: Notification.get(): ✓ promise is fulfilled ✓ promise returns a new notification (55ms) ✓ get works with tag option (53ms) ✓ should work across domains (5184ms) ✓ notifications should persist even after closing app (6615ms) ✓ bug 931307, empty title should not cause crash (64ms) Notification events ✓ click event starts application (5935ms) ✓ close event removes notification (5607ms) ✓ click event on resent notification starts application (6409ms) ✓ close event removes resent notification (7062ms) mozChromeNotifications: ✓ Checking mozResendAllNotifications API (112ms) ✓ Sending no notification, resends none (3723ms) ✓ Sending one notification, resends one (3499ms) ✓ Sending two notifications, resends two (3712ms) ✓ Sending two notifications, close one, resends one (3872ms) ✓ Sending one notification, remove from tray, resend (4955ms) 16 passing (2m)
Assignee | ||
Comment 8•9 years ago
|
||
One unrelated failure on Gaia-Try: https://tbpl.mozilla.org/?rev=bf2c350dfdd36bcda34fb76d30dfb5d880e09d13&tree=Gaia-Try I triggered 30 jobs of integration tests to check if maybe we fixed bug 1010415.
Comment 9•9 years ago
|
||
Will this only happen in automation or can this be triggered in real developer use cases in an app context using onclose?
Assignee | ||
Comment 10•9 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #9) > Will this only happen in automation or can this be triggered in real > developer use cases in an app context using onclose? I'm not sure. For now, given the lack of reports, I'd say that this only happens on automation.
Assignee | ||
Comment 11•9 years ago
|
||
(In reply to Alexandre LISSY :gerard-majax from comment #8) > One unrelated failure on Gaia-Try: > https://tbpl.mozilla.org/ > ?rev=bf2c350dfdd36bcda34fb76d30dfb5d880e09d13&tree=Gaia-Try > > I triggered 30 jobs of integration tests to check if maybe we fixed bug > 1010415. This try was wrong, I forgot to remove the files from the exclusion list. This one makes sure it's the case: https://tbpl.mozilla.org/?rev=ccd987879afa6a759d2d43423bd4d5325be50d3f&tree=Gaia-Try It shows green, and checking the full log shows that we executes the tests. I've retriggered a set of 50 jobs for Gaia Integration tests, to make sure. Kevin, do you have figures regarding the intermittence?
Flags: needinfo?(kgrandon)
Updated•9 years ago
|
Whiteboard: [systemsfe]
Target Milestone: --- → 2.0 S6 (18july)
Comment 12•9 years ago
|
||
(In reply to Alexandre LISSY :gerard-majax from comment #11) > (In reply to Alexandre LISSY :gerard-majax from comment #8) > > One unrelated failure on Gaia-Try: > > https://tbpl.mozilla.org/ > > ?rev=bf2c350dfdd36bcda34fb76d30dfb5d880e09d13&tree=Gaia-Try > > > > I triggered 30 jobs of integration tests to check if maybe we fixed bug > > 1010415. > > This try was wrong, I forgot to remove the files from the exclusion list. > This one makes sure it's the case: > https://tbpl.mozilla.org/ > ?rev=ccd987879afa6a759d2d43423bd4d5325be50d3f&tree=Gaia-Try > > It shows green, and checking the full log shows that we executes the tests. > I've retriggered a set of 50 jobs for Gaia Integration tests, to make sure. > > Kevin, do you have figures regarding the intermittence? I've disabled a bunch of those tests that failed yesterday, sorry for the noise on your run. This test felt intermittent around ~5% of the time, but I don't have exact numbers.
Flags: needinfo?(kgrandon)
Comment 13•9 years ago
|
||
Comment on attachment 8454405 [details] [review] Gaia fix r+ if this fixes the failure.
Attachment #8454405 -
Flags: review?(alive) → review+
Assignee | ||
Comment 14•9 years ago
|
||
(In reply to Alive Kuo [:alive][NEEDINFO!] from comment #13) > Comment on attachment 8454405 [details] [review] > Gaia fix > > r+ if this fixes the failure. That does fix a bug, but saldy Gaia-Try failures seems to be unrelated :(
Comment 15•9 years ago
|
||
Comment on attachment 8454405 [details] [review] Gaia fix Good catch! I'll also add an integration test for this.
Attachment #8454405 -
Flags: review?(mhenretty) → review+
Comment 16•9 years ago
|
||
Alex, can you take a look at this test? Locally it fails for me before your patch, and passes after.
Attachment #8455354 -
Flags: review?(lissyx+mozillians)
Comment 17•9 years ago
|
||
I suggest we block on this. There are a couple of places inside of gaia where we use notification close handlers (like [1]), and also we want any 3rd-party apps to be able to use this ability too. This is a low-risk, high-reward patch that is already r+'ed. 1.) https://github.com/mozilla-b2g/gaia/blob/10b286513fe6719d739620a7a9153cda34b63c11/apps/system/js/voicemail.js#L145
Updated•9 years ago
|
blocking-b2g: --- → 2.0?
Assignee | ||
Comment 18•9 years ago
|
||
Comment on attachment 8455354 [details] [review] Gaia PR, integration test for close handler Simple and clear test case, there's not much to argue about :). Let's wait for Gaia Try result :)
Attachment #8455354 -
Flags: review?(lissyx+mozillians) → review+
Comment 19•9 years ago
|
||
(In reply to Alexandre LISSY :gerard-majax from comment #18) > Comment on attachment 8455354 [details] [review] > Gaia PR, integration test for close handler > > Simple and clear test case, there's not much to argue about :). Let's wait > for Gaia Try result :) Well, we also need your patch to land first too :)
Updated•9 years ago
|
blocking-b2g: 2.0? → 2.0+
Updated•9 years ago
|
Whiteboard: [systemsfe] → [systemsfe][ETA=7/15]
Assignee | ||
Comment 20•9 years ago
|
||
(In reply to Michael Henretty [:mhenretty] from comment #19) > (In reply to Alexandre LISSY :gerard-majax from comment #18) > > Comment on attachment 8455354 [details] [review] > > Gaia PR, integration test for close handler > > > > Simple and clear test case, there's not much to argue about :). Let's wait > > for Gaia Try result :) > > Well, we also need your patch to land first too :) Just rebased to not remove the tbpl test exclusion list
Assignee | ||
Comment 21•9 years ago
|
||
Only intermittents: https://tbpl.mozilla.org/?rev=48a4c5a22be97c2c0ef0d1a4df03fbdc2ed2dc4e&tree=Gaia-Try
Assignee | ||
Comment 22•9 years ago
|
||
https://github.com/mozilla-b2g/gaia/commit/49644a1e836356a4096bf2fda8b3b19a8f113d56 https://github.com/mozilla-b2g/gaia/commit/b64cb6f3f2a47582565b3fb06203477fb45c9d5a
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 23•9 years ago
|
||
Yuh oh, I think we are seeing some integration test failures related to this: https://tbpl.mozilla.org/?tree=Gaia-Try&rev=28b72374cdd5 Investigating.
Comment 24•9 years ago
|
||
(In reply to Michael Henretty [:mhenretty] from comment #23) > Yuh oh, I think we are seeing some integration test failures related to this: > > https://tbpl.mozilla.org/?tree=Gaia-Try&rev=28b72374cdd5 > > Investigating. Nm, the above failures were related to bug 1035430.
Comment 25•9 years ago
|
||
v2.0: https://github.com/mozilla-b2g/gaia/commit/d24d1744f8548a4b44280641dd77a7bd43238320 v2.0: https://github.com/mozilla-b2g/gaia/commit/cae98909946319d2b0a9436be21df64b8975c9d0
Whiteboard: [systemsfe][ETA=7/15] → [systemsfe]
You need to log in
before you can comment on or make changes to this bug.
Description
•