Closed Bug 1148453 Opened 9 years ago Closed 9 years ago

Test errors when connecting to Wi-Fi: "self.connect_to_local_area_network()"

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: onelson, Unassigned)

References

Details

http://jenkins1.qa.scl3.mozilla.com/user/oliverthor/my-views/view/Smoke%20Team%20Reporting/job/flame-kk-319.mozilla-central.nightly.ui.functional.smoke/123/HTML_Report/

Numerous tests are failing the mozilla-central.smoke run due to failing to connect to a Wi-Fi network. Cases in question are:

test_browser_lan
test_browser_play_video
test_setup_basic_gmail
test_IMAP_email_notification
test_rocketbar_add_collection_save_bookmark
test_homescreen_delete_app_packaged
test_homescreen_launch_app
test_marketplace_launch
test_marketplace_packaged_app

Tracebacks are appear very similar (below is taken from test_homescreen_delete_app_packaged.py):

  File "/var/jenkins/1/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_client-0.9-py2.7.egg/marionette/marionette_test.py", line 272, in run
    self.setUp()
  File "/var/jenkins/1/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.smoke/tests/python/gaia-ui-tests/gaiatest/tests/functional/homescreen/test_homescreen_delete_app_packaged.py", line 15, in setUp
    self.connect_to_local_area_network()
  File "/var/jenkins/1/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.smoke/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 911, in connect_to_local_area_network
    self.data_layer.connect_to_wifi()
  File "/var/jenkins/1/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.smoke/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 327, in connect_to_wifi
    script_timeout=max(self.marionette.timeout, 60000))
  File "/var/jenkins/1/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_driver-0.2-py2.7.egg/marionette_driver/marionette.py", line 1420, in execute_async_script
    debug_script=debug_script)
  File "/var/jenkins/1/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_driver-0.2-py2.7.egg/marionette_driver/decorators.py", line 36, in _
    return func(*args, **kwargs)
  File "/var/jenkins/1/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_driver-0.2-py2.7.egg/marionette_driver/marionette.py", line 670, in _send_message
    self._handle_error(response)
  File "/var/jenkins/1/workspace/flame-kk-319.mozilla-central.nightly.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_driver-0.2-py2.7.egg/marionette_driver/marionette.py", line 739, in _handle_error
    raise errors.ScriptTimeoutException(message=message, status=status, stacktrace=stacktrace)
ScriptTimeoutException: ScriptTimeoutException: timed out


Screenshots show the phone idling at homescreen.
Issue does not reproduce manually, no problems connecting to a wi-fi network.



Non-smoke tests also failing under the same issue:

test_browser_save_image
test_import_contacts_menu_no_network
test_rocketbar_search
test_persona_app
test_browser_navigation
test_browser_share_link
test_sync_facebook_contacts
test_import_gmail_no_network
test_cost_control_reset_wifi
test_email_one_header_displayed
test_findmydevice
QA Whiteboard: [QAnalyst-Triage?][fxosqa-auto-backlog?]
Flags: needinfo?(pbylenga)
Whiteboard: [fromAutomation]
I can reproduce in today's build, not in yesterday's build.
The device is still succesfully connected to the wifi when the timeout occurs, that makes it seem that onsuccess is never called: http://mxr.mozilla.org/gaia/source/tests/atoms/gaia_data_layer.js#280

Could this perhaps be a regression from bug 1123680?
Amy, could this be a regression from your patch in bug 1123680?
Tested tinderbox builds:
20150325073832 : works
20150325165808 : works - https://hg.mozilla.org/mozilla-central/rev/37d3dcbf23a9
20150326112345 : works - https://hg.mozilla.org/mozilla-central/rev/8a1bac74ed80
20150326154544 : works - https://hg.mozilla.org/mozilla-central/rev/59554288b4eb
20150326164545 : does not work - https://hg.mozilla.org/mozilla-central/rev/47c1e9a82e01

Not sure how to get a working pushloghtml out of that, it doesn't seem to return anything when I fill out the hash id's at: https://hg.mozilla.org/mozilla-central/pushloghtml
Well, https://hg.mozilla.org/mozilla-central/rev/47c1e9a82e01 at least contains the patch from bug 1123680, so I guess that makes it more likely to be a regression from bug 1123680.
Blocks: 1123680
Flags: needinfo?(amchung)
QA Whiteboard: [QAnalyst-Triage?][fxosqa-auto-backlog?] → [QAnalyst-Triage+][fxosqa-auto-backlog?]
Flags: needinfo?(pbylenga)
Whiteboard: [fromAutomation]
This happens when the previous script was connected to wifi as well.  I locally reversed the gecko patch for bug 1123680, and the bug did not reproduce on the tip of the gecko in master branch.
I've updated in https://bugzilla.mozilla.org/show_bug.cgi?id=1123680#c37 -- there's a bug in the code, but when No Jun tried testing with the bug fixed the first run succeeded through several tests; a later run did not. Unfortunately, he had to take off and I don't have a viable custom Gecko right now to check.

I can pick this up again a little on Monday, but hopefully Amy either has some quick insight or is willing to back out the change so our tests can run again.
Hi Martijn,
I have tested the smoke test manually after removed my patch from Bug 1123680.
But some test cases are fail:
1. test_browser_lan
   Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/marionette_client-0.9-py2.7.egg/marionette/marionette_test.py", line 290, in run
    testMethod()
  File "/home/amy/B2G/gaia/tests/python/gaia-ui-tests/gaiatest/tests/functional/browser/test_browser_lan.py", line 25, in test_browser_lan
    browser = search.go_to_url(self.test_url)
  File "/usr/local/lib/python2.7/dist-packages/gaiatest-0.32-py2.7.egg/gaiatest/apps/search/app.py", line 27, in go_to_url
    return search_panel.go_to_url(url)
  File "/usr/local/lib/python2.7/dist-packages/gaiatest-0.32-py2.7.egg/gaiatest/apps/homescreen/regions/search_panel.py", line 51, in go_to_url
    self.keyboard.send(url)
  File "/usr/local/lib/python2.7/dist-packages/gaiatest-0.32-py2.7.egg/gaiatest/apps/keyboard/app.py", line 252, in send
    self._tap(val)
  File "/usr/local/lib/python2.7/dist-packages/gaiatest-0.32-py2.7.egg/gaiatest/apps/keyboard/app.py", line 188, in _tap
    Actions(self.marionette).press(key).release().perform()
  File "/usr/local/lib/python2.7/dist-packages/marionette_driver-0.2-py2.7.egg/marionette_driver/marionette.py", line 410, in perform
    self.current_id = self.marionette._send_message('actionChain', 'value', chain=self.action_chain, nextId=self.current_id)
  File "/usr/local/lib/python2.7/dist-packages/marionette_driver-0.2-py2.7.egg/marionette_driver/decorators.py", line 36, in _
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/marionette_driver-0.2-py2.7.egg/marionette_driver/marionette.py", line 670, in _send_message
    self._handle_error(response)
  File "/usr/local/lib/python2.7/dist-packages/marionette_driver-0.2-py2.7.egg/marionette_driver/marionette.py", line 755, in _handle_error
    raise errors.MarionetteException(message=message, status=status, stacktrace=stacktrace)
TEST-INFO took 57598ms

And the test case test_marketplace_launch is pass after added my patch from Bug 1123680.



SUMMARY
-------
passed: 0
failed: 1
todo: 0

2. test_play_video

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/marionette_client-0.9-py2.7.egg/marionette/marionette_test.py", line 290, in run
    testMethod()
  File "/home/amy/B2G/gaia/tests/python/gaia-ui-tests/gaiatest/tests/functional/browser/test_browser_play_video.py", line 29, in test_play_video
    browser = search.go_to_url(self.video_URL)
  File "/usr/local/lib/python2.7/dist-packages/gaiatest-0.32-py2.7.egg/gaiatest/apps/search/app.py", line 27, in go_to_url
    return search_panel.go_to_url(url)
  File "/usr/local/lib/python2.7/dist-packages/gaiatest-0.32-py2.7.egg/gaiatest/apps/homescreen/regions/search_panel.py", line 51, in go_to_url
    self.keyboard.send(url)
  File "/usr/local/lib/python2.7/dist-packages/gaiatest-0.32-py2.7.egg/gaiatest/apps/keyboard/app.py", line 251, in send
    self._switch_to_correct_layout(val)
  File "/usr/local/lib/python2.7/dist-packages/gaiatest-0.32-py2.7.egg/gaiatest/apps/keyboard/app.py", line 114, in _switch_to_correct_layout
    self._tap(self._upper_case_key)
  File "/usr/local/lib/python2.7/dist-packages/gaiatest-0.32-py2.7.egg/gaiatest/apps/keyboard/app.py", line 188, in _tap
    Actions(self.marionette).press(key).release().perform()
  File "/usr/local/lib/python2.7/dist-packages/marionette_driver-0.2-py2.7.egg/marionette_driver/marionette.py", line 410, in perform
    self.current_id = self.marionette._send_message('actionChain', 'value', chain=self.action_chain, nextId=self.current_id)
  File "/usr/local/lib/python2.7/dist-packages/marionette_driver-0.2-py2.7.egg/marionette_driver/decorators.py", line 36, in _
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/marionette_driver-0.2-py2.7.egg/marionette_driver/marionette.py", line 670, in _send_message
    self._handle_error(response)
  File "/usr/local/lib/python2.7/dist-packages/marionette_driver-0.2-py2.7.egg/marionette_driver/marionette.py", line 755, in _handle_error
    raise errors.MarionetteException(message=message, status=status, stacktrace=stacktrace)
TEST-INFO took 80894ms

SUMMARY
-------
passed: 0
failed: 1
todo: 0
Flags: needinfo?(amchung)
(In reply to Amy Chung from comment #7)
> Hi Martijn,
> I have tested the smoke test manually after removed my patch from Bug
> 1123680.
> But some test cases are fail:
> 1. test_browser_lan

test_browser_lan is passing for me in today's nightly build.
The error you get is after this original error occured, so I think this bug is fixed anyway.

I don't know why you get those errors, perhaps this is related to bug 1075670 (which is already backed out on inbound). Did you test this on a Flame device with 1GB memory or with 319MB?
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
(In reply to Amy Chung from comment #7)
> Hi Martijn,
> I have tested the smoke test manually after removed my patch from Bug
> 1123680.
> But some test cases are fail:

Oh this is Actions object bug, which is also fixed with the backout of bug 1075670.  I verified that this original bug is now fixed in nightly.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.