Closed Bug 1173819 Opened 9 years ago Closed 8 years ago

JavascriptException: TypeError: window.wrappedJSObject.Service.query(...) is undefined

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: martijn.martijn, Unassigned, NeedInfo)

References

()

Details

Attachments

(1 file)

I saw this failure coming by in the Jenkins reports:

http://jenkins1.qa.scl3.mozilla.com/job/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1/284/HTML_Report/
UNEXPECTED_ERROR 	test_sms_contact_match.py TestContactMatch.test_contact_match 	53.23 	Source Screenshot Settings
Traceback (most recent call last):
  File "/var/jenkins/2/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1/.env/local/lib/python2.7/site-packages/marionette_client-0.13-py2.7.egg/marionette/marionette_test.py", line 277, in run
    self.setUp()
  File "/var/jenkins/2/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 905, in setUp
    self.cleanup_gaia(full_reset=False)
  File "/var/jenkins/2/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 949, in cleanup_gaia
    self.device.turn_screen_off()
  File "/var/jenkins/2/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 728, in turn_screen_off
    apps.switch_to_displayed_app()
  File "/var/jenkins/2/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 121, in switch_to_displayed_app
    self.marionette.switch_to_frame(self.displayed_app.frame)
  File "/var/jenkins/2/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 113, in displayed_app
    result = self.marionette.execute_script('return GaiaApps.getDisplayedApp();')
  File "/var/jenkins/2/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1/.env/local/lib/python2.7/site-packages/marionette_driver-0.7-py2.7.egg/marionette_driver/marionette.py", line 1452, in execute_script
    filename=os.path.basename(frame[0]))
  File "/var/jenkins/2/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1/.env/local/lib/python2.7/site-packages/marionette_driver-0.7-py2.7.egg/marionette_driver/decorators.py", line 36, in _
    return func(*args, **kwargs)
  File "/var/jenkins/2/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1/.env/local/lib/python2.7/site-packages/marionette_driver-0.7-py2.7.egg/marionette_driver/marionette.py", line 711, in _send_message
    self._handle_error(response)
  File "/var/jenkins/2/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.non-smoke.1/.env/local/lib/python2.7/site-packages/marionette_driver-0.7-py2.7.egg/marionette_driver/marionette.py", line 747, in _handle_error
    raise errors.lookup(status)(message, stacktrace=stacktrace)
JavascriptException: JavascriptException: TypeError: window.wrappedJSObject.Service.query(...) is undefined
stacktrace:
	execute_script @gaia_test.py, line 113
	inline javascript, line 370
	src: "      app = window.wrappedJSObject.Service"

The screenshot show a homescreen with no icons, perhaps that has got something to do with it?

Alive, I think this might have something to do with the work you did in bug 1094759. Do you know how this could happen?
Flags: needinfo?(alegnadise+moz)
This works for me, is it intermittent?

mip2/bin/gaiatest --address=localhost:2828 --testvars=/Users/alive/Projects/testvars.json --restart gaiatest/tests/functional/messages/test_sms_contact_match.py
Results will not be posted to Treeherder. Please set the following environment variables to enable Treeherder reports: TREEHERDER_KEY, TREEHERDER_SECRET
starting httpd
running httpd on http://10.247.38.170:56281/
mozversion application_buildid: 20150527160204
mozversion application_changeset: 2c815cc65cc9
mozversion application_display_name: B2G
mozversion application_id: {3c2e2abc-06d4-11e1-ac3b-374f68613e61}
mozversion application_name: B2G
mozversion application_remotingname: b2g
mozversion application_repository: https://hg.mozilla.org/mozilla-central
mozversion application_vendor: Mozilla
mozversion application_version: 41.0a1
mozversion device_firmware_date: 1428967910
mozversion device_firmware_version_base: L1TC000118D0
mozversion device_firmware_version_incremental: eng.cltbld.20150413.193139
mozversion device_firmware_version_release: 4.4.2
mozversion device_id: flame
mozversion gaia_changeset: 188a64245893e51cfafec021f7ad3c6a9c484fa6
mozversion gaia_date: 1433844921
mozversion platform_buildid: 20150527160204
mozversion platform_changeset: 2c815cc65cc9
mozversion platform_repository: https://hg.mozilla.org/mozilla-central
mozversion platform_version: 41.0a1
SUITE-START | Running 1 tests
TEST-START | test_sms_contact_match.py TestContactMatch.test_contact_match
TEST-PASS | test_sms_contact_match.py TestContactMatch.test_contact_match | took 18291ms

SUMMARY
-------
passed: 1
failed: 0
todo: 0
SUITE-END | took 18s




====

Reading comment 0 again, this looks like the 10.1s timeout we always see in normal CI run when executing clean_gaia. It looks like homescreen is killed and we are going to switch to the homescreen before it is respawned.... I need to know why (why do we need to switch to an app between tests?)?
Flags: needinfo?(pyang)
Flags: needinfo?(atsai.moztw)
Flags: needinfo?(alegnadise+moz)
Martijn, I saw the picture, Is it just a snapshot or the device hung for a while?
Flags: needinfo?(pyang)
(In reply to Paul Yang [: pyang] from comment #2)
> Martijn, I saw the picture, Is it just a snapshot or the device hung for a
> while?

I think it was just a snapshot. If the device was hung, then the connection to the device would time out, no?

Anyway, if we don't see this happening recently, then we can just close this bug.
I'll mark it wfm, if it happens again, I'll reopen.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
I saw it couple times right after flashing device.
Might relate to delay load strategy of gaia.
You mean bug 1094759? Yes, I suspect this to be a regression of that, too.
JavascriptException: TypeError: window.wrappedJSObject.Service.query(...) is undefined

I saw this in our first test right after flashed.
Marking WONTFIX, sorry for the bug spam. If somebody still wants to work on this, please file a new bug for it.
Status: REOPENED → RESOLVED
Closed: 9 years ago8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: