Closed
Bug 834293
Opened 8 years ago
Closed 8 years ago
Video app persists when we kill it with window_manager's kill()
Categories
(Firefox OS Graveyard :: Gaia, defect)
Tracking
(blocking-b2g:-)
RESOLVED
WORKSFORME
blocking-b2g | - |
People
(Reporter: mdas, Unassigned)
References
Details
Attachments
(1 file)
829 bytes,
text/plain
|
Details |
We can't seem to terminate a running video app by calling WindowManager.kill('app://video.gaiamobile.org') on it. I've traced the code while running the attached test, and it successfully calls the WindowManager.kill command, as well as removeFrame and the `delete runningApps[origin]` line (https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/window_manager.js#L1240), but the video app is still running, and if we call WindowManager.getRunningApps(), then we still see it being listed there, and its plugin-containers still persist. You also can't kill it using the cards view. Running the test case requires a few steps. First in the B2G repository, go to gecko/testing/marionette/client/marionette and run `sh venv_test.sh <path to python2.6 or 2.7>` This creates a python virtual environment in B2G/gecko/testing/marionette/client/marionette_venv. go into that directory and call `. bin/activate` Plug in your phone and forward the marionette port: `adb forward tcp:2828 tcp:2828` then clone the https://github.com/mozilla/gaia-ui-tests repo and in that repository, you can pull down the attached test and run it: `gaiatest --address=localhost:2828 <file>` If you watch the phone, it will run the test, load the video app, and apparently closes it since it transitions to the homescreen. If you hold down the home button to load the cards view, you'll see that the app hasn't actually closed! You can't close it by pressing on the X button in cards view either. The test will fail. If you want, you can deactivate your virtual environment using: `deactivate` If you're curious about how we're calling the kill command, we do it here: https://github.com/mozilla/gaia-ui-tests/blob/master/gaiatest/atoms/gaia_apps.js#L149 We call kill, and then we keep calling getRunningApps to check if the video app is no longer listed. (https://github.com/mozilla/gaia-ui-tests/blob/master/gaiatest/atoms/gaia_apps.js#L143_
Comment 1•8 years ago
|
||
I've now also seen this with other apps. The b2gperf tests launch a number of apps 30 times in a row, and my device is currently showing the Phone app as a running app but I can't close it.
Updated•8 years ago
|
Severity: normal → critical
David/Dietrich - know a Gonk/Gaia owner for this? Thanks.
Comment 3•8 years ago
|
||
I am seeing this same issue with the Facebook everything.me app. Tests are failing trying to call GaiaApps.killAll() when it is running.
Reporter | ||
Comment 4•8 years ago
|
||
(In reply to Bob Silverberg from comment #3) > I am seeing this same issue with the Facebook everything.me app. Tests are > failing trying to call GaiaApps.killAll() when it is running. I thought on IRC you said you updated your image and said this wasn't happening, but maybe I misunderstood. Can you confirm this?
Comment 5•8 years ago
|
||
That was a different issue that resolved itself.
Comment 6•8 years ago
|
||
Sounds like a larger Gaia issue -- Vivien, do you want to take a look or reassign?
Assignee: nobody → 21
blocking-b2g: --- → tef?
Comment 7•8 years ago
|
||
Since this seems to only be affecting testing and doesn't have user-visible impacts, the triage decision was that we can't hold the release for this.
blocking-b2g: tef? → -
Comment 8•8 years ago
|
||
You may want to find someone that use the python tests. I can reproduce by calling WindowManager.kill('app://video.gaiamobile.org') manually in JS directly :/
Assignee: 21 → nobody
Reporter | ||
Comment 9•8 years ago
|
||
(In reply to Vivien Nicolas (:vingtetun) (:21) from comment #8) > You may want to find someone that use the python tests. I can reproduce by > calling WindowManager.kill('app://video.gaiamobile.org') manually in JS > directly :/ You can reproduce it manually? If so, why would it be the python test?
Comment 10•8 years ago
|
||
(In reply to Vivien Nicolas (:vingtetun) (:21) from comment #8) > You may want to find someone that use the python tests. I can reproduce by > calling WindowManager.kill('app://video.gaiamobile.org') manually in JS > directly :/ can -> can't :/
Dale/James, know you're both slammed too, but can you help us look into this? Thanks.
Updated•8 years ago
|
Attachment #705911 -
Attachment mime type: text/x-python-script → text/plain
Comment 12•8 years ago
|
||
I did start to look into trying to replicate this in JavaScript, but there appears to be a lot of boilerplate necessary to add an integration test. If someone more familiar with these tests would like to give it a go, it should be pretty straightforward. The Python test simply launches the video application and taps the first video in the list to start playing it, once it verifies the video is playing it attempts to close the app.
Comment 13•8 years ago
|
||
https://github.com/lightsofapollo/gaia/compare/video-launch-kill ^^^ my branch with launch/kill of video then (with marionette running on 2828) APP=video make test-integration
Comment 14•8 years ago
|
||
I must be doing something wrong... any thoughts? $ APP=video make test-integration xpcshell is not found adding xulrunner-sdk using /Users/dhunt/workspace/gaia/xulrunner-sdk/bin/xpcshell. /Users/dhunt/workspace/gaia/tools/xpcwindow/lib/loader.js -> file:///Users/dhunt/workspace/gaia/tools/xpcwindow/lib/window/import-scripts.js:20: Error: importScript failed while trying to load: "/Users/dhunt/workspace/gaia/apps/video/test/integration/kill_test.js" /Users/dhunt/workspace/gaia/tools/xpcwindow/lib/loader.js -> file:///Users/dhunt/workspace/gaia/tools/xpcwindow/lib/window/import-scripts.js:20: /Users/dhunt/workspace/gaia/tools/xpcwindow/lib/loader.js -> file:///Users/dhunt/workspace/gaia/tools/xpcwindow/lib/window/import-scripts.js:20: Error: importScript failed while trying to load: "/Users/dhunt/workspace/gaia/apps/calendar/test/integration/calendar_integration.js" /Users/dhunt/workspace/gaia/tools/xpcwindow/lib/loader.js -> file:///Users/dhunt/workspace/gaia/tools/xpcwindow/lib/window/import-scripts.js:20: /Users/dhunt/workspace/gaia/tools/xpcwindow/lib/loader.js -> file:///Users/dhunt/workspace/gaia/tools/xpcwindow/lib/window/import-scripts.js:20: Error: importScript failed while trying to load: "/Users/dhunt/workspace/gaia/apps/calendar/js/calendar.js" /Users/dhunt/workspace/gaia/tools/xpcwindow/lib/loader.js -> file:///Users/dhunt/workspace/gaia/tools/xpcwindow/lib/window/import-scripts.js:20: /Users/dhunt/workspace/gaia/tools/xpcwindow/lib/loader.js -> file:///Users/dhunt/workspace/gaia/tools/xpcwindow/lib/window/import-scripts.js:20: TypeError: window.addEventListener is not a function make: *** [test-integration] Error 3
Reporter | ||
Comment 15•8 years ago
|
||
I have that problem too...
Comment 16•8 years ago
|
||
We're working on fixing the integration tests in bug 837139. If you try the code in https://github.com/mozilla-b2g/gaia/pull/7929, does it help?
Reporter | ||
Comment 17•8 years ago
|
||
ah, thanks for responding, I hadn't had a chance to test till now. I pulled the latest gaia repo and now I'm seeing: Error: done() invoked with non-Error: NoSuchFrame: (8) Unable to locate frame: [object Object] Remote Stack: <none> at Runnable.prototype.run/< (/Users/mdas/code/gaia/test_apps/test-agent/common/vendor/mocha/mocha.js:3711) at overload/wrapDone/< (/Users/mdas/code/gaia/test_apps/test-agent/common/test/mocha_generators.js:46) at overload/window[type]/wrapper/< (/Users/mdas/code/gaia/test_apps/test-agent/common/test/mocha_generators.js:69) at MochaTask.nextNodeStyle (/Users/mdas/code/gaia/test_apps/test-agent/common/test/mocha_task.js:96) at next (/Users/mdas/code/gaia/tests/js/app_integration.js:159) at Client.prototype._handleCallback (/Users/mdas/code/gaia/tests/js/vendor/marionette.js:1304) at Client.prototype._sendCommand/< (/Users/mdas/code/gaia/tests/js/vendor/marionette.js:1324) at _onDeviceResponse (/Users/mdas/code/gaia/tests/js/vendor/marionette.js:2138) at Tcp.prototype._onClientCommand (/Users/mdas/code/gaia/tests/js/vendor/marionette.js:2366) at emit/< (/Users/mdas/code/gaia/tests/js/vendor/marionette.js:156) at emit (/Users/mdas/code/gaia/tests/js/vendor/marionette.js:155) at _handleCommand (/Users/mdas/code/gaia/tests/js/vendor/marionette.js:813) at _readBuffer (/Users/mdas/code/gaia/tests/js/vendor/marionette.js:853) at add (/Users/mdas/code/gaia/tests/js/vendor/marionette.js:892) at emit/< (/Users/mdas/code/gaia/tests/js/vendor/marionette.js:156) at emit (/Users/mdas/code/gaia/tests/js/vendor/marionette.js:155) at SocketWrapper/</rawSocket[method]< (/Users/mdas/code/gaia/tests/js/vendor/marionette.js:2283) at ts_callListener (/Users/mdas/code/gaia/xulrunner-sdk/bin/components/TCPSocket.js:253) at ts_onDataAvailable (/Users/mdas/code/gaia/xulrunner-sdk/bin/components/TCPSocket.js:508) So it can't seem to find the frame. I tested this with APP=calendar and APP=email and I get the same result. I know that https://github.com/mozilla-b2g/gaia/pull/7919 landed, so the problem lies somewhere else in the harness code, and I won't be able to look into that just yet.
Blocks: 801898
Has anyone tried this in a while? Are we still experiencing it?
Comment 19•8 years ago
|
||
Closing as WORKSFORME. I had to update the reduced test case - which may invalidate the original conditions - but I was unable to replicate this on a recent build.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•