Closed Bug 1187819 Opened 9 years ago Closed 9 years ago

Failure in test_settings_media_storage.py in self.apps.kill(settings.app)

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: martijn.martijn, Assigned: gsvelto)

References

()

Details

Attachments

(1 file)

See http://jenkins1.qa.scl3.mozilla.com/view/Bitbar/job/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1.bitbar/191/HTML_Report/
Traceback (most recent call last):
File "/var/lib/jenkins/jobs/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_client-0.16-py2.7.egg/marionette/marionette_test.py", line 296, in run
testMethod()
File "/var/lib/jenkins/jobs/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1.bitbar/workspace/tests/python/gaia-ui-tests/gaiatest/tests/functional/settings/test_settings_media_storage.py", line 23, in test_settings_media_storage
self.apps.kill(settings.app)
File "/var/lib/jenkins/jobs/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1.bitbar/workspace/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 129, in kill
result = self.marionette.execute_async_script("GaiaApps.kill('%s');" % app.origin)
File "/var/lib/jenkins/jobs/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_driver-0.9-py2.7.egg/marionette_driver/marionette.py", line 1561, in execute_async_script
debug_script=debug_script)
File "/var/lib/jenkins/jobs/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_driver-0.9-py2.7.egg/marionette_driver/decorators.py", line 36, in _
return func(*args, **kwargs)
File "/var/lib/jenkins/jobs/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_driver-0.9-py2.7.egg/marionette_driver/marionette.py", line 715, in _send_message
    self._handle_error(response)
  File "/var/lib/jenkins/jobs/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_driver-0.9-py2.7.egg/marionette_driver/marionette.py", line 751, in _handle_error
    raise errors.lookup(status)(message, stacktrace=stacktrace)
JavascriptException: JavascriptException: TypeError: this.element is null@app://system.gaiamobile.org/js/app_window.js, line 1617

This seems to have started failing in the 336 run of non smoke.1 on mozilla-central.
From the tinderbox Jenkins download job console log output, I see these times:
2015-07-23 14:44:01
2015-07-24 04:14:01
This vaguely should corresponds to some check-ins in that time area.

When I run this test with 512MB memory, this test doesn't fail. I get the impression this is a regression from bug 1186587 somehow.
Blocks: 1186587
Ok, this can also be reproduced manually:
1 - Make sure the Flame device uses the latest engineering build using 319MB
2 - Open Settins app
3 - In the console, do: adb shell kill $(adb shell b2g-info | grep Settings | cut -b16-21)
4 - In the console, do: adb shell b2g-info

Expected result:
Homescreen should show in the running processes.

Actual result:
Homescreen not shown in the running processes.

Etienne or Gabriele, can you take a look at this?
Assignee: martijn.martijn → nobody
Component: Gaia::UI Tests → Gaia::System
Flags: needinfo?(gsvelto)
Flags: needinfo?(etienne)
The failure also happens with test_cost_control_reset_wifi.py.
This is happening because some of the existing code was requesting the homescreen to be relaunched conditionally, but since the homescreen was always relaunched regardless it hid a bug when going back to the homescreen when the visible app was killed.
Assignee: nobody → gsvelto
Status: NEW → ASSIGNED
Flags: needinfo?(gsvelto)
Flags: needinfo?(etienne)
Comment on attachment 8639715 [details] [review]
[gaia] gabrielesvelto:bug-1187819-relaunch-the-homescreen-when-killed > mozilla-b2g:master

Looking at app_window_manager.js it seems to me that whenever awm_display() was called w/o parameters it meant we were displaying the homescreen. Bug 1076613 made this conditional to the 'home' event type but didn't update all the call sites nor it did motivate why the change was made. Since this wasn't used anywhere else and all other event types are ignored I think it's safe to assume that calling awm_display() without parameters means "we're going back to the homescreen so make sure it's launched".
Attachment #8639715 - Flags: review?(etienne)
Comment on attachment 8639715 [details] [review]
[gaia] gabrielesvelto:bug-1187819-relaunch-the-homescreen-when-killed > mozilla-b2g:master

Thanks! Looks better that way :)
Attachment #8639715 - Flags: review?(etienne) → review+
Thanks for the review! Merged to gaia/master 266b8bfe9144cfb1f2508b3ad52a21c8465c5ed0

https://github.com/mozilla-b2g/gaia/commit/266b8bfe9144cfb1f2508b3ad52a21c8465c5ed0
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: