Closed Bug 1136791 Opened 5 years ago Closed 5 years ago

test_marketplace_packaged_app times out after opening Marketplace, unable to search

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
2.2 S7 (6mar)
Tracking Status
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: onelson, Assigned: martijn.martijn)

References

()

Details

(Whiteboard: [3.0-Daily-Testing])

Attachments

(4 files)

Attached file feb25_searchApp.html
Description:
Jenkins reported a failure at test_marketplace_packaged_app.TestSearchMarketplaceAndInstallApp in the latest smoke report. The test opens the marketplace app then appears to timeout attempting to locate the search bar. This issue does not reproduce manually, as the UI remains functional: user may tap the search bar and locate apps.

Tracebacks (Consecutive Errors):
Traceback (most recent call last):
  File "/home/flash/Desktop/oliverthor/git/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.8.7-py2.7.egg/marionette/marionette_test.py", line 283, in run
    testMethod()
  File "/home/flash/Desktop/oliverthor/git/gaia/tests/python/gaia-ui-tests/gaiatest/tests/functional/marketplace/test_marketplace_packaged_app.py", line 29, in test_search_and_install_app
    marketplace.search(self.app_search)
  File "/home/flash/Desktop/oliverthor/git/gaia/tests/python/gaia-ui-tests/gaiatest/apps/marketplace/app.py", line 60, in search
    search_box.send_keys(term)
  File "/home/flash/Desktop/oliverthor/git/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.8.7-py2.7.egg/marionette/marionette.py", line 113, in send_keys
    return self.marionette._send_message('sendKeysToElement', 'ok', id=self.id, value=typing)
  File "/home/flash/Desktop/oliverthor/git/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.8.7-py2.7.egg/marionette/decorators.py", line 36, in _
    return func(*args, **kwargs)
  File "/home/flash/Desktop/oliverthor/git/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.8.7-py2.7.egg/marionette/marionette.py", line 615, in _send_message
    "Connection timed out", status=errors.ErrorCodes.TIMEOUT)
TimeoutException: TimeoutException: Connection timed out


Most recent errors/exceptions are:
... [show in html report attached]

Traceback (most recent call last):
  File "/home/flash/Desktop/oliverthor/git/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.8.7-py2.7.egg/marionette/marionette_test.py", line 311, in run
    self.tearDown()
  File "/home/flash/Desktop/oliverthor/git/gaia/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 996, in tearDown
    MarionetteTestCase.tearDown(self)
  File "/home/flash/Desktop/oliverthor/git/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.8.7-py2.7.egg/marionette/marionette_test.py", line 531, in tearDown
    (self.filepath.replace('\\', '\\\\'), self.methodName))
  File "/home/flash/Desktop/oliverthor/git/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.8.7-py2.7.egg/marionette/marionette.py", line 1293, in execute_script
    filename=os.path.basename(frame[0]))
  File "/home/flash/Desktop/oliverthor/git/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.8.7-py2.7.egg/marionette/decorators.py", line 36, in _
    return func(*args, **kwargs)
  File "/home/flash/Desktop/oliverthor/git/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.8.7-py2.7.egg/marionette/marionette.py", line 634, in _send_message
    self._handle_error(response)
  File "/home/flash/Desktop/oliverthor/git/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.8.7-py2.7.egg/marionette/marionette.py", line 663, in _handle_error
    "Malformed packet, expected key 'error' to be a dict: %s" % response)
MarionetteException: MarionetteException: Malformed packet, expected key 'error' to be a dict: {u'message': u'this.curBrowser is null', u'error': u"error occurred while processing 'executeScript"}


Environmental Variables:
Device firmware (base)	L1TC100118D0
Device firmware (date)	25 Feb 2015 01:37:14
Device firmware (incremental)	eng.cltbld.20150225.043702
Device firmware (release)	4.4.2
Device identifier	flame
Gaia date	24 Feb 2015 13:10:44
Gaia revision	f6bfd854fe47
Gecko build	20150225010244
Gecko revision	0a8b3b67715a
Gecko version	39.0a1

Reproducible manually: No

Repro frequency: 2/12

Unsure of regression range as jenkins as somewhat sporadic failures for this test in the b2g.inbound.tinderbox suite:
http://jenkins1.qa.scl3.mozilla.com/job/flame-kk-319.b2g-inbound.tinderbox.ui.functional.smoke/2771/testReport/junit/%28root%29/test_marketplace_packaged_app_py%20TestSearchMarketplaceAndInstallApp_test_search_and_install_app/test_marketplace_packaged_app_py_TestSearchMarketplaceAndInstallApp_test_search_and_install_app/history/
QA Whiteboard: [QAnalyst-Triage?][fxosqa-auto-backlog?]
Flags: needinfo?(pbylenga)
Whiteboard: [3.0-Daily-Testing]
QA Whiteboard: [QAnalyst-Triage?][fxosqa-auto-backlog?] → [QAnalyst-Triage+][fxosqa-auto-backlog?]
Flags: needinfo?(pbylenga)
Yeah, I've seen that sometimes too. For some I thought there was a gaia Marionette issue there also, I remember vaguely I had a similar issue in bug 1086680, comment 45, but that was when replacing an external website with another one.
Increasing the time.sleep() value here seems to solve the issue:
http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/apps/marketplace/app.py#55
Assignee: nobody → martijn.martijn
Comment on attachment 8571439 [details] [review]
[gaia] mwargers:packaged_app > mozilla-b2g:master

This makes the test pass locally all the time.

I suspect that the loading Marionette is somehow interfering with the loading of a page when using Wait().
Attachment #8571439 - Flags: review?(npark)
Attachment #8571439 - Flags: review?(npark) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Hi Martijn,

Could you please uplift this patch to v2.2? 
Since 2.2 also has this problem, and I got 20/20 passed when I tried with this solution.
Flags: needinfo?(martijn.martijn)
Duplicate of this bug: 1151172
Ok, I made the v2.2 pull request. However, uplifting is blocked on the redness of Treeherder Try. See for discussion in bug 1151902. James Lal need to be contacted about this.
I think he might misunderstand these pull requests. They are meant to fix test failures in v2.2 for Gaia UI tests, so they should make the Treeherder Try v2.2 at least more green than red.
Flags: needinfo?(martijn.martijn) → needinfo?(ashiue)
Blocks: 1155747
ok, thanks for this info.
Flags: needinfo?(ashiue)
Alison, it seems like v2.2 Treeherder Try is green now. Perhaps the v2.2 pull request can be checked in?
Flags: needinfo?(ashiue)
Flags: needinfo?(ashiue)
Hi Martijn,
Can you help to merge this pull request? The Treeherder Try is green.

https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=d0f2a04f20d4a659d2630a77e8b9df720c866e4d
Thanks Ryan!
Blocks: 1138809
You need to log in before you can comment on or make changes to this bug.