Closed
Bug 1197134
Opened 10 years ago
Closed 10 years ago
[v2.5][Gaia::UI Tests]test_delete_contact.py:"Services.obs.removeObserver(window.wrappedJSObject.permObserver, "perm-changed");"
Categories
(Firefox OS Graveyard :: Gaia::UI Tests, defect)
Tracking
(b2g-master verified)
VERIFIED
FIXED
Tracking | Status | |
---|---|---|
b2g-master | --- | verified |
People
(Reporter: liuke, Assigned: martijn.martijn)
References
()
Details
Attachments
(3 files)
[Description]
test_delete_contact.py fails
[Steps to Reproduce]
test_delete_contact.py
[Reproduction Frequency]
Always, 5/5
Traceback (most recent call last):
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.smoketest/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.18-py2.7.egg/marionette/marionette_test.py", line 296, in run
testMethod()
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.smoketest/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/test_dialer_receive_call.py", line 39, in test_receive_call
Wait(self.marionette).until(lambda m: self.data_layer.active_telephony_state == 'connected')
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.smoketest/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_driver-0.12-py2.7.egg/marionette_driver/wait.py", line 122, in until
rv = condition(self.marionette)
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.smoketest/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/test_dialer_receive_call.py", line 39, in <lambda>
Wait(self.marionette).until(lambda m: self.data_layer.active_telephony_state == 'connected')
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.smoketest/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 405, in active_telephony_state
return self.marionette.execute_script("return GaiaDataLayer.getMozTelephonyState()")
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.smoketest/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_driver-0.12-py2.7.egg/marionette_driver/marionette.py", line 1519, in execute_script
filename=os.path.basename(frame[0]))
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.smoketest/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_driver-0.12-py2.7.egg/marionette_driver/decorators.py", line 36, in _
return func(*args, **kwargs)
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.smoketest/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_driver-0.12-py2.7.egg/marionette_driver/marionette.py", line 725, in _send_message
self._handle_error(response)
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.smoketest/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_driver-0.12-py2.7.egg/marionette_driver/marionette.py", line 761, in _handle_error
raise errors.lookup(status)(message, stacktrace=stacktrace)
JavascriptException: JavascriptException: TypeError: window.navigator.mozTelephony.active is null
stacktrace:
execute_script @gaia_test.py, line 405
inline javascript, line 795
src: " return window.navigator.mozTelephony.active.state;"
[Build info]
Build ID 20150820150207
Gaia Revision c6705f739fb605031eb2a0b943ba55c64bee5a03
Gaia Date 2015-08-20 14:36:40
Gecko Revision https://hg.mozilla.org/mozilla-
central/rev/095988abdc560bf8ba07a94a425c6922a3e9bfd6
Gecko Version 43.0a1
Device Name flame
Firmware(Release) 4.4.2
Firmware(Incremental) eng.cltbld.20150820.183055
Firmware Date Thu Aug 20 18:31:07 EDT 2015
Firmware Version v18D v4
Bootloader L1TC000118D0
[Attachments]
Non-Smoketest report
Reporter | ||
Comment 1•10 years ago
|
||
Reporter | ||
Updated•10 years ago
|
status-b2g-master:
--- → affected
Assignee | ||
Comment 2•10 years ago
|
||
The error message is very confusing, it's about a different test. The actual error in test_delete_contact.py based on the report is:
Traceback (most recent call last):
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.non-smoketest/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.18-py2.7.egg/marionette/marionette_test.py", line 296, in run
testMethod()
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.non-smoketest/tests/python/gaia-ui-tests/gaiatest/tests/functional/contacts/test_delete_contact.py", line 36, in test_delete_contact
message='Should have no contacts after running this test')
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.non-smoketest/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 1121, in wait_for_condition
Wait(self.marionette, timeout).until(method, message=message)
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.non-smoketest/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_driver-0.12-py2.7.egg/marionette_driver/wait.py", line 122, in until
rv = condition(self.marionette)
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.non-smoketest/tests/python/gaia-ui-tests/gaiatest/tests/functional/contacts/test_delete_contact.py", line 35, in <lambda>
lambda m: len(self.data_layer.all_contacts) == 0,
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.non-smoketest/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 208, in all_contacts
self.marionette.push_permission('contacts-read', True)
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.non-smoketest/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_driver-0.12-py2.7.egg/marionette_driver/marionette.py", line 874, in push_permission
""", sandbox='system')
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.non-smoketest/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_driver-0.12-py2.7.egg/marionette_driver/marionette.py", line 1519, in execute_script
filename=os.path.basename(frame[0]))
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.non-smoketest/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_driver-0.12-py2.7.egg/marionette_driver/decorators.py", line 36, in _
return func(*args, **kwargs)
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.non-smoketest/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_driver-0.12-py2.7.egg/marionette_driver/marionette.py", line 725, in _send_message
self._handle_error(response)
File "/var/lib/jenkins/workspace/B2G.master.PVT.FlameKK.gaiatest.non-smoketest/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_driver-0.12-py2.7.egg/marionette_driver/marionette.py", line 761, in _handle_error
raise errors.lookup(status)(message, stacktrace=stacktrace)
JavascriptException: JavascriptException: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIObserverService.removeObserver]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: dummy file :: __marionetteFunc :: line 1028" data: no]
stacktrace:
execute_script @marionette.py, line 874
inline javascript, line 1028
src: " Services.obs.removeObserver(window.wrappedJSObject.permObserver, "perm-changed");"
And it's happening at this place:
http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/tests/functional/contacts/test_delete_contact.py#36
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → martijn.martijn
Comment 3•10 years ago
|
||
Assignee | ||
Comment 4•10 years ago
|
||
Comment on attachment 8651006 [details] [review]
[gaia] mwargers:1197134 > mozilla-b2g:master
This fixes it for me. The scrollIntoView thing was necessary, otherwise I would already fail on trying to tap the delete button.
I'm not sure why we now have to add these switch_to_frame() methods to go into the system app.
Attachment #8651006 -
Flags: review?(npark)
Attachment #8651006 -
Flags: review?(jlorenzo)
Assignee | ||
Comment 5•10 years ago
|
||
Borja, you happen to know why we have to switch to the system app now to avert this javascript error from happening? Something changed in the Contacts app?
Normally, the contacts app should be able to deal with this, I think.
Flags: needinfo?(borja.bugzilla)
Assignee | ||
Comment 6•10 years ago
|
||
Btw, to fix this test, it was only needed for all_contacts, iirc, but it seemed better to me to change it then for all contacts related methods.
Comment 7•10 years ago
|
||
Take into account that previously all views were available within the app. It means that all tests were executing 'wait_for_element' or 'scrollIntoView', but currently we must wait until the new view is loaded (it's based in change of URLs, as the web does). I hope it helps!
Flags: needinfo?(borja.bugzilla)
Comment 8•10 years ago
|
||
Comment on attachment 8651006 [details] [review]
[gaia] mwargers:1197134 > mozilla-b2g:master
r+ modulo https://github.com/mozilla-b2g/gaia/pull/31462/files#r37650880. I don't remember in which bug, but I thought we put the scrollIntoViews at 1 single place.
Attachment #8651006 -
Flags: review?(jlorenzo) → review+
Assignee | ||
Comment 9•10 years ago
|
||
(In reply to Johan Lorenzo [:jlorenzo] (QA) from comment #8)
> Comment on attachment 8651006 [details] [review]
> [gaia] mwargers:1197134 > mozilla-b2g:master
>
> r+ modulo https://github.com/mozilla-b2g/gaia/pull/31462/files#r37650880. I
> don't remember in which bug, but I thought we put the scrollIntoViews at 1
> single place.
Yeah, that's bug 1195341.
Comment 10•10 years ago
|
||
Comment on attachment 8651006 [details] [review]
[gaia] mwargers:1197134 > mozilla-b2g:master
LGTM
Attachment #8651006 -
Flags: review?(npark) → review+
Assignee | ||
Comment 11•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 12•9 years ago
|
||
This bug has been verified as "pass" on the latest build of Flame KK v2.5 by the STR in comment 0.
Reproduce rate: 0/10
Actual results: No error happened.
See report:test_delete_contact.html
Device: Flame KK v2.5(pass)
Build ID 20150905150219
Gaia Revision 03be7d8918bed58c92a40bba211bbbc97a0e516a
Gaia Date 2015-09-04 11:56:30
Gecko Revision https://hg.mozilla.org/mozilla-central/rev/139446daedab3d00b9f0faba25e1e82191c8c8d1
Gecko Version 43.0a1
Device Name flame
Firmware(Release) 4.4.2
Firmware(Incremental) eng.cltbld.20150905.183746
Firmware Date Sat Sep 5 18:38:03 EDT 2015
Updated•9 years ago
|
Updated•9 years ago
|
QA Whiteboard: [MGSEI-Triage+]
You need to log in
before you can comment on or make changes to this bug.
Description
•