Closed
Bug 983059
Opened 11 years ago
Closed 11 years ago
test_ftu_skip_tour.py failed with JavascriptException: TypeError: window.navigator.mozWifiManager is null
Categories
(Firefox OS Graveyard :: Gaia::UI Tests, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: askeing, Unassigned)
Details
Attachments
(1 file)
Need more investigation.
Buri
Gaia e61dc0019d9d6135d88ba15153c37f73a952567e
Gecko https://hg.mozilla.org/mozilla-central/rev/a10d0ba50f64
BuildID 20140312160210
Version 30.0a1
ro.build.version.incremental=eng.archermind.20131114.105818
ro.build.date=Thu Nov 14 10:58:33 CST 2013
Traceback (most recent call last):
File "/var/lib/jenkins/jobs/B2G.master.pvt.hamachi.gaiatest/workspace/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette_test.py", line 145, in run
self.setUp()
File "/var/lib/jenkins/jobs/B2G.master.pvt.hamachi.gaiatest/workspace/tests/python/gaia-ui-tests/gaiatest/tests/functional/ftu/test_ftu_skip_tour.py", line 92, in setUp
self.wait_for_condition(lambda m: self.data_layer.is_wifi_enabled)
File "/var/lib/jenkins/jobs/B2G.master.pvt.hamachi.gaiatest/workspace/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 1043, in wait_for_condition
Wait(self.marionette, timeout).until(method, message=message)
File "/var/lib/jenkins/jobs/B2G.master.pvt.hamachi.gaiatest/workspace/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/wait.py", line 122, in until
rv = condition(self.marionette)
File "/var/lib/jenkins/jobs/B2G.master.pvt.hamachi.gaiatest/workspace/tests/python/gaia-ui-tests/gaiatest/tests/functional/ftu/test_ftu_skip_tour.py", line 92, in <lambda>
self.wait_for_condition(lambda m: self.data_layer.is_wifi_enabled)
File "/var/lib/jenkins/jobs/B2G.master.pvt.hamachi.gaiatest/workspace/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 254, in is_wifi_enabled
return self.marionette.execute_script("return window.navigator.mozWifiManager.enabled;")
File "/var/lib/jenkins/jobs/B2G.master.pvt.hamachi.gaiatest/workspace/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette.py", line 1114, in execute_script
filename=os.path.basename(frame[0]))
File "/var/lib/jenkins/jobs/B2G.master.pvt.hamachi.gaiatest/workspace/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette.py", line 613, in _send_message
self._handle_error(response)
File "/var/lib/jenkins/jobs/B2G.master.pvt.hamachi.gaiatest/workspace/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette.py", line 648, in _handle_error
raise JavascriptException(message=message, status=status, stacktrace=stacktrace)
JavascriptException: JavascriptException: TypeError: window.navigator.mozWifiManager is null
stacktrace:
execute_script @gaia_test.py, line 254
inline javascript, line 1083
src: "let __marionetteFunc = function(){return window.navigator.mozWifiManager.enabled;};__marionetteFunc.apply(null, __marionetteParams);"
Comment 1•11 years ago
|
||
Attachment #8392516 -
Flags: review?(fyen)
Attachment #8392516 -
Flags: review?(florin.strugariu)
Reporter | ||
Comment 2•11 years ago
|
||
Comment on attachment 8392516 [details] [review]
git pr
LGTM
Attachment #8392516 -
Flags: review?(fyen) → review+
Comment 3•11 years ago
|
||
Comment on attachment 8392516 [details] [review]
git pr
remove the double lambda declaration
Attachment #8392516 -
Flags: review?(florin.strugariu) → review-
Comment 4•11 years ago
|
||
Nice catch bebe!
Except that comment the wait looks good.
Comment 5•11 years ago
|
||
Comment on attachment 8392516 [details] [review]
git pr
re-r?
Attachment #8392516 -
Flags: review- → review?(florin.strugariu)
Updated•11 years ago
|
Attachment #8392516 -
Flags: review?(florin.strugariu) → review+
Comment 6•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 7•11 years ago
|
||
This was merged with outstanding concerns:
davehunt: That's a very broad exception you're ignoring.
zac: what's your point @davehunt ?
davehunt: My point is that you're not ignoring the very specific exception of the wifi manager not being ready. You're ignoring any potential JavaScript exception that could occur. That's not something we should be doing. Really we should fix this in the correct way by waiting for the wifi manager to be ready, rather than simply ignoring the exception.
zac: If I wait for it to be present rather than enabled then I will get a JavascriptException in this same case. I don't see why I should be catching some other javascript exceptions. If one is raised related to this then the wait can just timeout and fail.
davehunt: I'm not suggesting catching any exceptions. If you update the atom to either return false when the wifi manager is undefined, or to wait for the wifi manager to be defined, then you don't have to ignore any exceptions.
Making these comments in github probably meant they went unnoticed. In future I'll r- and comment in bugzilla. Can we please address these concerns in a new bug?
Updated•11 years ago
|
Flags: needinfo?(florin.strugariu)
Comment 8•11 years ago
|
||
I think Bebe probably missed the comments because they were hidden in an outdated diff.
Do you want us to back it out Dave?
We can just change this bug to be a task to refactor the atom.
Flags: needinfo?(florin.strugariu)
Comment 9•11 years ago
|
||
No need to back it out as it's not going to cause problems, it's just not the ideal fix. I'm okay with using this bug to do a follow-up patch, or doing it in a new bug.
You need to log in
before you can comment on or make changes to this bug.
Description
•