Gaia UI tests failing with JavascriptException: TypeError: settings is null

RESOLVED WORKSFORME

Status

Testing
Marionette
RESOLVED WORKSFORME
4 years ago
4 years ago

People

(Reporter: Armen - back on June 11th, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
After bug 826901 landed we have increased the number of tests and passed none of them. They all fail in a similar way though.

06:41:11     INFO -  SUMMARY
06:41:11     INFO -  -------
06:41:11     INFO -  passed: 11
06:41:11     INFO -  failed: 25
06:41:11     INFO -  todo: 0
https://tbpl.mozilla.org/php/getParsedLog.php?id=18670846&tree=Cedar&full=1

07:49:35     INFO -  SUMMARY
07:49:35     INFO -  -------
07:49:35     INFO -  passed: 0
07:49:35     INFO -  failed: 46
07:49:35     INFO -  todo: 0
https://tbpl.mozilla.org/php/getParsedLog.php?id=18672921&tree=Cedar&full=1

A lot of the errors are similar though:
07:48:29     INFO -  Traceback (most recent call last):
07:48:29     INFO -    File "/builds/panda-0099/test/build/venv/lib/python2.7/site-packages/gaiatest/gaia_test.py", line 216, in setUp
07:48:29     INFO -      self.cleanUp()
07:48:29     INFO -    File "/builds/panda-0099/test/build/venv/lib/python2.7/site-packages/gaiatest/gaia_test.py", line 220, in cleanUp
07:48:29     INFO -      self.lockscreen.unlock()
07:48:29     INFO -    File "/builds/panda-0099/test/build/venv/lib/python2.7/site-packages/gaiatest/gaia_test.py", line 35, in unlock
07:48:29     INFO -      result = self.marionette.execute_async_script('GaiaLockScreen.unlock()')
07:48:29     INFO -    File "/builds/panda-0099/test/build/venv/lib/python2.7/site-packages/marionette/marionette.py", line 469, in execute_async_script
07:48:29     INFO -      specialPowers=special_powers)
07:48:29     INFO -    File "/builds/panda-0099/test/build/venv/lib/python2.7/site-packages/marionette/marionette.py", line 222, in _send_message
07:48:29     INFO -      self._handle_error(response)
07:48:29     INFO -    File "/builds/panda-0099/test/build/venv/lib/python2.7/site-packages/marionette/marionette.py", line 257, in _handle_error
07:48:29     INFO -      raise JavascriptException(message=message, status=status, stacktrace=stacktrace)
07:48:29     INFO -  TEST-UNEXPECTED-FAIL | test_settings.py TestSettings.test_get_all_settings | JavascriptException: TypeError: settings is null
(Reporter)

Comment 1

4 years ago
Bug 830431 is now happening instead of this bug.
This would seem to imply that gaia isn't loading on the panda correctly, but I won't have time to investigate today.
We're currently seeing this on the unagi too. See http://qa-selenium.mv.mozilla.com:8080/job/b2g.unagi.gaia.master.ui/877/console (VPN required)

Snippet:

ERROR: test_capture_a_video (test_camera.TestCamera)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/jenkins/workspace/b2g.unagi.gaia.master.ui/gaia-ui-tests/gaiatest/tests/test_camera.py", line 19, in setUp
    GaiaTestCase.setUp(self)
  File "/var/jenkins/workspace/b2g.unagi.gaia.master.ui/gaia-ui-tests/gaiatest/gaia_test.py", line 228, in setUp
    self.cleanUp()
  File "/var/jenkins/workspace/b2g.unagi.gaia.master.ui/gaia-ui-tests/gaiatest/gaia_test.py", line 232, in cleanUp
    self.lockscreen.unlock()
  File "/var/jenkins/workspace/b2g.unagi.gaia.master.ui/gaia-ui-tests/gaiatest/gaia_test.py", line 35, in unlock
    result = self.marionette.execute_async_script('GaiaLockScreen.unlock()')
  File "/var/jenkins/workspace/b2g.unagi.gaia.master.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.5.15-py2.7.egg/marionette/marionette.py", line 469, in execute_async_script
    specialPowers=special_powers)
  File "/var/jenkins/workspace/b2g.unagi.gaia.master.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.5.15-py2.7.egg/marionette/marionette.py", line 222, in _send_message
    self._handle_error(response)
  File "/var/jenkins/workspace/b2g.unagi.gaia.master.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.5.15-py2.7.egg/marionette/marionette.py", line 257, in _handle_error
    raise JavascriptException(message=message, status=status, stacktrace=stacktrace)
TEST-UNEXPECTED-FAIL | test_camera.py TestCamera.test_capture_a_video | JavascriptException: TypeError: settings is null
I saw this issue with someone else's unagi, and it was because there was something wrong with either gecko or gaia, but not marionette. The logcat had:
E/GeckoConsole(  109): [JavaScript Error: "NO SETTINGS PERMISSION FOR: app://system.gaiamobile.org
E/GeckoConsole(  109): [JavaScript Error: "NS_ERROR_FAILURE: Denied" {file: "jar:file:///system/b2g/omni.ja!/components/Webapps.js" line: 649}]
E/GeckoConsole(  109): [JavaScript Error: "TypeError: navigator.mozSettings is null" {file: "app://system.gaiamobile.org/js/value_selector/value_selector.js" line: 108}]
E/GeckoConsole(  109): [JavaScript Error: "SecurityError: The operation is insecure." {file: "app://system.gaiamobile.org/shared/js/idletimer.js" line: 101}]
E/GeckoConsole(  109): [JavaScript Error: "TypeError: settings is null" {file: "app://system.gaiamobile.org/js/sleep_menu.js" line: 41}]
E/GeckoConsole(  109): [JavaScript Error: "TypeError: settings is null" {file: "app://system.gaiamobile.org/shared/js/settings_listener.js" line: 34}]
E/GeckoConsole(  109): [JavaScript Error: "SecurityError: The operation is insecure." {file: "app://system.gaiamobile.org/shared/js/idletimer.js" line: 101}]

So the settings module wasn't loading correctly. I updated my unagi phone to the latest eng build (Jan 16th) and it's working fine. I then updated gaia to be the latest as well (commit hash bb015b4cd6a09583e332dd8f51c38850b0d799e9), and it's still working. The jenkins jobs don't have this problem now either.

I'm guessing it was some gecko or gaia problem that's now resolved. Can either of you reproduce it?
(Reporter)

Comment 5

4 years ago
Should we close as worksforme?
I'm not having this issue anymore.
problem no longer shows up.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.