Closed Bug 1115640 Opened 7 years ago Closed 6 years ago
.0][FFOS2 .0][Woodduck][Usage] Can't open Usage when tap nortification of data limit .
CONTACT INFO (Name,Phone number): Dong Quanming, 021-313-62635 DEFECT DESCRIPTION: Can't open Usage when tap nortification of data limit. REPRODUCING PROCEDURES: 1. Open Usage, set moblie usage to 10KB; 2. Open web to use some data; 3. When exceed 10KB, it have a prompt in Nortification; 4. Tap the nortification, Usage can't be opened. -> KO 中文： 1. 打开Usage，设置手机数据流量限制为10KB； 2. 打开网页使用一些数据流量； 3. 当流量超过10KB时，手机会有流量使用超标警告 4. 在通知中点击提示信息，Usage app不会被打开 -> KO EXPECTED BEHAVIOUR: Tap the nortification, Usage can be opened. ASSOCIATE SPECIFICATION: TEST PLAN REFERENCE: TOOLS AND PLATFORMS USED: USER IMPACT: REPRODUCING RATE: 100% For FT PR, Please list reference mobile's behavior:
It works fine in FFOS1.3.
I'll have a look on this shortly.
Assignee: nobody → yliao
It can't be reproduced on flame v2.0, reproduce rate is 0/5. Will try it on woodduck. Gaia-Rev ce83ea7b8e3fa2d1c3fd771fc22b654c18b3c381 Gecko-Rev https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/b41c344ed82d Build ID 20141228160215 Version 32.0 Device Name flame FW-Release 4.4.2 FW-Incremental 39 FW-Date Thu Oct 16 18:19:14 CST 2014 Bootloader L1TC00011880
The data connection on woodduck doesn't work currently. This problem stops me from completing the reproducing procedure. Need 1109392 to be fixed first. Gaia-Rev 688e86b46229e3281beb22fd29f723724eda9df5 Gecko-Rev aa9ece9c8a749095834e7a980166543d985a3af5 Build ID 20141218102657 Version 32.0 Device Name jrdhz72_w_ff FW-Release 4.4.2 FW-Incremental 1418712706 FW-Date Tue Dec 16 14:51:55 CST 2014
Just got a working woodduck image. This issue can't be reproduced on today's build. Reproducing rate is 0/5. Gaia-Rev 688e86b46229e3281beb22fd29f723724eda9df5 Gecko-Rev bb95bcf5c2033a59b3261b93804151d1addb75eb Build ID 20141230150818 Version 32.0 Device Name jrdhz72_w_ff FW-Release 4.4.2 FW-Incremental 1419818614 FW-Date Mon Dec 29 10:03:53 CST 2014
Hi Reporter, We cannot repo this issue on our side. Can you try repo the issue with Mozilla Gaia/Gecko? Thanks! User build image link is: http://pan.baidu.com/s/1hqnDBtM Access code: 9c9u unzip password: erT14moz
(In reply to comment #8) > Comment from Mozilla:Hi Reporter, > We cannot repo this issue on our side. Can you try repo the issue with Mozilla > Gaia/Gecko? Thanks! > > User build image link is: http://pan.baidu.com/s/1hqnDBtM > Access code: 9c9u > unzip password: erT14moz > I can repo this PR,on this step: 1. Open Usage, set moblie usage to 10KB; 2. Open web to use some data; 3. When exceed 10KB, it have a prompt in Nortification; 4. Kill the Usage APP. 5. Tap the nortification, Usage can't be opened.
Please see the video: url: http://pan.baidu.com/s/1o61Fhzk password：7wdz
Dear YiFan, Can you help to verify the STR provided per comment 10 can reproduce this issue? Thanks!
Yes, will work on it shortly.
Without applying step 4, the usage app will be successfully launched once the 'webapps-launch' event is received in gaia. When usage app gets killed, gaia doesn't receive the event. Need gecko support on this one.
Hi Shawn, Could you please help to check the problem? Thanks!
I probably missed something here. Will check first.
Just a correction: the event that launches the usage app is 'open-app' not 'webapps-launch'. Tried reading gecko code but not being able to do much help here. Seems gaia has nothing to do with this issue. Please feel free to ni me if the assumption is wrong.
Assignee: yliao → nobody
Hi Alive: May we have your comment on this bug first? Thanks!! Shawn
Flags: needinfo?(sku) → needinfo?(alive)
I believe this is a general notification issue - if an app had fired a notification and then being killed, the onclick callback will be reset so it will not launch itself. NI michael to confirm.
Flags: needinfo?(alive) → needinfo?(mhenretty)
(In reply to Alive Kuo [:alive][NEEDINFO!] from comment #19) > I believe this is a general notification issue - if an app had fired a > notification and then being killed, the onclick callback will be reset so it > will not launch itself. NI michael to confirm. Cost control uses the shared/js/notification_helper object, which in 2.0 used the old desktop mozNotification API. I'm no expert of this API, but I believe it works like the new notification API in that when an app gets killed (either manually or through LMK) an existing notification click will fire a system message that will wake the app. Cost Control handles that system message here  in v2.0. We should check if we ever get that system message. If we don't we should check Gecko here  to see why it is not firing that system message after finding there is no live callback. 1.) https://github.com/mozilla-b2g/gaia/blob/71c64c4a914c8d4fb1e217b2a081fbc258e34622/apps/costcontrol/js/app.js#L288 2.) http://hg.mozilla.org/releases/mozilla-b2g32_v2_0/file/c6fd5db59e0e/b2g/components/AlertsService.js#l138
Since we've spent time on this issue, it deserve to be triaged.
blocking-b2g: --- → 2.0M?
Is there have any progress?
I'm investigating AlertsService.js and found that calling listener.observer.observe in ln:133 will cause an exception when following the STR. Need more time to trace notification source. I'm new in debugging Gecko source so please feel free to suggest possible causes, thanks!
(In reply to yifan [:yifan][:yliao] from comment #23) > I'm investigating AlertsService.js and found that calling > listener.observer.observe in ln:133 will cause an exception when following > the STR. Need more time to trace notification source. I'm new in debugging > Gecko source so please feel free to suggest possible causes, thanks! Hi Yifan. That exception is expected when the the app is not running. We should then catch that exception and then on ln:139 we will use the "system message" mechanism to wake the app and pass it the notification details. If that works properly, we should see that system message show up in the cost control app here . Do we ever see that system message in cost control? 1.) https://github.com/mozilla-b2g/gaia/blob/71c64c4a914c8d4fb1e217b2a081fbc258e34622/apps/costcontrol/js/app.js#L280
Thank you Michael! Found that the system message handler has never executed either the costcontrol app is launched normally or unsuccessfully in https://github.com/mozilla-b2g/gaia/blob/71c64c4a914c8d4fb1e217b2a081fbc258e34622/apps/costcontrol/js/app.js#L280 . Please see the attached log for more details. The log recorded a successful attempt and a failed one.
It seems the system message handler in the costcontrol app is never used? The view change in costcontrol seems to be all handled by the activity handler. I'll trace the activity part next.
Correction for the 'system message handler' above, it should be the system message handler for notification. The activity handler should be the system message handler for activity.
Attachment #8551042 - Attachment description: system app and costcontrol app log → v2.0 system app and costcontrol app log
Attachment #8551044 - Attachment description: log.patch → v2.0 log.patch
Tried it on mozilla-central, v2.2 and v2.1, gaia + gecko. All branches are affected.
Update: Communicate to partner will not fix in 2.0M. Will try fix in the future.
In https://dxr.mozilla.org/mozilla-central/source/dom/notification/DesktopNotification.h#159 mNotification is a nullptr when it fails. Keep tracing the cause.
1. Discovered that when a notification popped with costcontrol app off, the DesktopNotification instance will be deleted. https://dxr.mozilla.org/mozilla-central/source/dom/notification/DesktopNotification.h?from=desktopnotification.h&case=true#172 Here the Line DesktopNotification* mNotification; sould be nsRefPtr<DesktopNotification> mNotification; 2. After 1. fixed, when a notification popped with costcontrol app off, the system app will get an 'open-app' event to launch the costcontrol app in the background. But right after the app launched, the system app will receive a 'mozbrowserclose' event which in turn close the costcontrol app. I'm still working on why this happens. 3. When a notification popped with costcontrol app on, manually close the costcontrol app and then click the notification won't open the costcontrol app. Will look into this after 2. Here's the line that fails to launch the app without warning: https://dxr.mozilla.org/mozilla-central/source/dom/notification/DesktopNotification.h?from=desktopnotification.h&case=true#161
Yifan, thank you for your investigation. Since we are no longer fixing this issue for 2.0, we no longer need to worry about DesktopNotification.cpp. In 2.2+, cost control app uses the new Notification API , which means we use the Notification.cpp instead of DesktopNotification.cpp. And since we have the same problem in 2.2, it means it is for a different reason. Unfortunately, it seems you will need to do the same investigation from comment 32, but with the Notification.cpp code path. 1.) https://github.com/mozilla-b2g/gaia/blob/b09d45e0c28be573a0d95696c9df3e1d69ac0294/shared/js/notification_helper.js#L43
[Blocking Requested - why for this release]: Continue investigating in next release.
Any update here?
Couldn't be reproduced on foxfooding phone.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.