Closed Bug 1056448 Opened 10 years ago Closed 10 years ago

[MTBF][Cards View] It will stuck in cards view and can't select any app to launch within 30 minutes

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.0+, b2g-v2.0 fixed, b2g-v2.1 fixed)

VERIFIED FIXED
2.1 S3 (29aug)
blocking-b2g 2.0+
Tracking Status
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed

People

(Reporter: wachen, Assigned: sfoster)

References

Details

(Whiteboard: [ft:systems-fe][systemsfe])

Attachments

(5 files, 1 obsolete file)

Flame with pvt engineer build (build id: ) STR: A combination of different tests cases, including "runlist": ["test_mtbf_settings_wifi.py", "test_mtbf_cards_view_with_two_apps.py", "test_mtbf_call_log_all_calls.py", "test_mtbf_camera_multiple_shots.py"] The code is currently in: https://github.com/ypwalter/MTBF-Driver/tree/new_testcases you may run the test with this command: MOZ_IGNORE_NUWA_PROCESS=true MTBF_TIME=30m MTBF_CONF=conf/flame_experiment.json mtbf --address=localhost:2828 --testvars=testvars.json tests/test_dummy_case.py Here is the exception JavascriptException: JavascriptException: TypeError: app is undefined execute_script @gaia_test.py, line 69 inline javascript, line 337 src: " while (app.frontWindow && app.frontWindow.isActive()) {" E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): [JavaScript Error: "TypeError: this._activeApp is undefined" {file: "app://system.gaiamobile.org/js/app_window_manager.js" line: 712}] E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216 E/GeckoConsole( 298): Content JS WARN at app://system.gaiamobile.org/js/app_window_manager.js:702 in awm__changeActiveApp: no active app alive: AppWindow_216
Attached file adb logcat of the bug (obsolete) —
Gaia 9e5907995c9327f14cb5d182cee5ff16b1743ed4 Gecko https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/3f7db58a354c BuildID 20140803160201 Version 32.0 ro.build.version.incremental=eng.cltbld.20140801.033755 ro.build.date=Fri Aug 1 03:38:05 EDT 2014
Blocks: MTBF-B2G
Flags: needinfo?(alive)
Please take this logging patch and try again, thanks! https://github.com/mozilla-b2g/gaia/pull/22695
Flags: needinfo?(alive) → needinfo?(wachen)
Alive, thanks for the helping! I am running MTBF(stability) testing now. I will let you know whenever I caught that bug. What information should I be providing if I meet the bug again? adb logcat? any other information?
Flags: needinfo?(wachen) → needinfo?(alive)
(In reply to Walter Chen[:ypwalter][:wachen] from comment #4) > Alive, thanks for the helping! > > I am running MTBF(stability) testing now. I will let you know whenever I > caught that bug. What information should I be providing if I meet the bug > again? adb logcat? any other information? Adb logcat is enough!
Flags: needinfo?(alive)
Attached file new_logcat_1056448
here you go.
Attachment #8476433 - Attachment is obsolete: true
Flags: needinfo?(alive)
I guess the problem is the app is killed during task manager, and then the instance is removed from the list of appWindowManager. hence we are updating activeApp to undefined.
Flags: needinfo?(alive)
It's not a regression.. we did not handle this well in the past. We have suspending app but it is turned off in 2.0 and 2.1 now. One possible solution for 2.0 is just returned to homescreen if the app is killed..
In this situation, the question is that when we do "window.wrappedJSObject.dispatchEvent(new Event('home'));", it doesn't work.
Is there alternative ways to handle it or make it back to the homescreen
Flags: needinfo?(alive)
[Blocking Requested - why for this release]: 2 issues found in this bug, but I suspect it has the same cause - cards view doesn't work correctly. (1) Can't launch apps by cards view. (2) Causing testing framework javasccript not working - go back to home screen Cards view is a basic functionality. Most people use it everyday just like the alt+tab in windows/linux. Even if the app is killed by app manager, the cards view should be updated accordingly. This might be a blocker for QC MTBF testing since they might be running cards view test cases
blocking-b2g: --- → 2.0?
I thought we were already listening for the appterminated event that gets fired when an app is killed. Apparently not. We could try and handle this gracefully by removing the corresponding card in cards view. Then, we already have code in place that will ensure cards view is closed and we return to the homescreen if its the last/only card.
(In reply to Sam Foster [:sfoster] from comment #14) > I thought we were already listening for the appterminated event that gets > fired when an app is killed. Apparently not. We could try and handle this > gracefully by removing the corresponding card in cards view. Then, we > already have code in place that will ensure cards view is closed and we > return to the homescreen if its the last/only card. That works for me. This might be a blocker and we need to fix it in 2.0, would you mind taking it?
Flags: needinfo?(alive)
Yes, I assume we want to land on 2.1/master and uplift? As we need it on master as well.
Assignee: nobody → sfoster
This is for master/2.1. It needs small change for 2.0 as we use cardsByOrigin there not cardsByAppID
Attachment #8477237 - Flags: review?(alive)
Whiteboard: [ft:systems-fe][systemsfe]
Comment on attachment 8477237 [details] [review] TaskManager listens for appterminated and removes any associated card object/view. + unit test. Thank you for doing this quickly!
Attachment #8477237 - Flags: review?(alive) → review+
Thanks for quick patch!
This is the same as attachment 8477237 [details] [review], adjusted for 2.0. In 2.1 we replaced cardsByOrigin with cardsByAppID, this version uses cardsByOrigin. Carrying alive's r+
Attachment #8477300 - Flags: review+
attachment 8477300 [details] [review] is ready to land if this bug is deemed a 2.0 blocker.
Component: Stability → Gaia::System
The patch is in the master alrdy according to comment 21
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
verified in today's pvt master build. I am not seeing the same issue again. Alive and Sam, Thanks for helping.
Status: RESOLVED → VERIFIED
blocking-b2g: 2.0? → ---
[Blocking Requested - why for this release]: (In reply to Walter Chen[:ypwalter][:wachen] from comment #24) > verified in today's pvt master build. I am not seeing the same issue again. > > Alive and Sam, > Thanks for helping. Your comment doesn't indicate if you tested with 2.0. Why did you remove the removing 2.0 flag?
blocking-b2g: --- → 2.0?
Flags: needinfo?(wachen)
Keywords: qawanted
Not sure why Qa-Wanted tag was added - AFAIK it has no connection with Walter - so I'm removing it because just the NI should be sufficient to get an answer from him.
Keywords: qawanted
It happens in v2.0 & master. It actually should be uplifted to v2.0. However, there would be a performance issue as I talked with alive about this. I think that's why I removed this.
Flags: needinfo?(wachen)
blocking-b2g: 2.0? → 2.0+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: