Closed Bug 1147237 Opened 10 years ago Closed 10 years ago

Intermittent lockscreen_conn_info_manager_test.js | system/LockScreenConnInfoManager > Single sim devices "after each" hook - TypeError: voice is null

Categories

(Firefox OS Graveyard :: Gaia::System::Lockscreen, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: KWierso, Assigned: gsvelto)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

11:56:32 INFO - JavaScript warning: app://sharedtest.gaiamobile.org/common/vendor/chai/chai.js?time=1427223392421, line 3564: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create 11:56:32 INFO - TEST-START | sharedtest/test/unit/manifest_helper_test.js 11:56:32 INFO - TEST-PASS | sharedtest/test/unit/manifest_helper_test.js | Manifest Helper displayName with short name 11:56:32 INFO - TEST-PASS | sharedtest/test/unit/manifest_helper_test.js | Manifest Helper displayName with no short name 11:56:32 INFO - TEST-OK | sharedtest/test/unit/manifest_helper_test.js | took 62ms 11:56:32 INFO - suite results (pass/fail): 2/0 11:56:33 INFO - JavaScript warning: app://sharedtest.gaiamobile.org/common/vendor/chai/chai.js?time=1427223393247, line 3564: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create 11:56:33 INFO - TEST-START | sharedtest/test/unit/lockscreen_conn_info_manager_test.js 11:56:33 INFO - TEST-PASS | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | system/LockScreenConnInfoManager > Update conn states when events voicechange 11:56:33 INFO - TEST-PASS | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | system/LockScreenConnInfoManager > Update conn states when events simslot-cardstatechange 11:56:33 INFO - TEST-PASS | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | system/LockScreenConnInfoManager > Update conn states when events simslot-iccinfochange 11:56:33 INFO - TEST-PASS | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | system/LockScreenConnInfoManager > Update conn states when events cellbroadcastmsgchanged 11:56:33 INFO - TEST-PASS | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | system/LockScreenConnInfoManager > Update conn states when events ril.radio.disabled 11:56:33 INFO - TEST-PASS | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | system/LockScreenConnInfoManager > Update conn states when events ril.telephony.defaultServiceId 11:56:34 INFO - TEST-PASS | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | system/LockScreenConnInfoManager > Single sim devices 2G Mode: should update cell broadcast info on connstate Line 2 11:56:34 INFO - TEST-INFO | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | warn: L10nError: "operator-info" not found in en-US in app://sharedtest.gaiamobile.org/test/unit/_sandbox.html?time=1427223393056 11:56:34 INFO - TEST-PASS | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | system/LockScreenConnInfoManager > Single sim devices 3G Mode: should update carrier and region info on connstate Line 2 11:56:34 INFO - TEST-INFO | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | warn: L10nError: "operator-info" not found in en-US in app://sharedtest.gaiamobile.org/test/unit/_sandbox.html?time=1427223393056 11:56:34 INFO - TEST-INFO | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | warn: L10nError: "operator-info" not found in en-US in app://sharedtest.gaiamobile.org/test/unit/_sandbox.html?time=1427223393056 11:56:34 INFO - TEST-INFO | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | warn: L10nError: "operator-info" not found in en-US in app://sharedtest.gaiamobile.org/test/unit/_sandbox.html?time=1427223393056 11:56:34 INFO - TEST-PASS | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | system/LockScreenConnInfoManager > Single sim devices Show no network 11:56:34 INFO - TEST-INFO | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | warn: L10nError: "noNetwork" not found in en-US in app://sharedtest.gaiamobile.org/test/unit/_sandbox.html?time=1427223393056 11:56:34 INFO - TEST-INFO | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | warn: L10nError: "noNetwork" not found in en-US in app://sharedtest.gaiamobile.org/test/unit/_sandbox.html?time=1427223393056 11:56:34 INFO - TEST-INFO | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | warn: L10nError: "noNetwork" not found in en-US in app://sharedtest.gaiamobile.org/test/unit/_sandbox.html?time=1427223393056 11:56:34 INFO - TEST-PASS | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | system/LockScreenConnInfoManager > Single sim devices Show searching 11:56:34 INFO - JavaScript error: app://sharedtest.gaiamobile.org/shared/js/lockscreen_connection_info_manager.js?time=1427223393577, line 273: TypeError: voice is null 11:56:34 INFO - TEST-INFO | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | warn: L10nError: "searching" not found in en-US in app://sharedtest.gaiamobile.org/test/unit/_sandbox.html?time=1427223393056 11:56:34 INFO - TEST-INFO | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | warn: L10nError: "searching" not found in en-US in app://sharedtest.gaiamobile.org/test/unit/_sandbox.html?time=1427223393056 11:56:34 INFO - TEST-UNEXPECTED-FAIL | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | system/LockScreenConnInfoManager > Single sim devices "after each" hook - TypeError: voice is null (app://sharedtest.gaiamobile.org/shared/js/lockscreen_connection_info_manager.js?time=1427223393577:273) 11:56:34 INFO - Error: TypeError: voice is null (app://sharedtest.gaiamobile.org/shared/js/lockscreen_connection_info_manager.js?time=1427223393577:273) 11:56:34 INFO - at onerror (app://sharedtest.gaiamobile.org/common/vendor/mocha/mocha.js:4959:10) 11:56:34 INFO - TEST-OK | sharedtest/test/unit/lockscreen_conn_info_manager_test.js | took 793ms 11:56:34 INFO - suite results (pass/fail): 10/1 11:56:34 INFO - JavaScript warning: app://sharedtest.gaiamobile.org/common/vendor/chai/chai.js?time=1427223394834, line 3564: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create 11:56:35 INFO - TEST-START | sharedtest/test/unit/lazy_loader_test.js 11:56:35 INFO - TEST-PASS | sharedtest/test/unit/lazy_loader_test.js | lazy loader everything looks ok 11:56:35 INFO - TEST-PASS | sharedtest/test/unit/lazy_loader_test.js | lazy loader load json 11:56:35 INFO - TEST-PASS | sharedtest/test/unit/lazy_loader_test.js | lazy loader load malformed json 11:56:35 INFO - TEST-PASS | sharedtest/test/unit/lazy_loader_test.js | lazy loader load inexisting json 11:56:35 INFO - TEST-PASS | sharedtest/test/unit/lazy_loader_test.js | lazy loader append single js script 11:56:35 INFO - TEST-PASS | sharedtest/test/unit/lazy_loader_test.js | lazy loader append the same js script 11:56:35 INFO - TEST-PASS | sharedtest/test/unit/lazy_loader_test.js | lazy loader append css script 11:56:35 INFO - TEST-PASS | sharedtest/test/unit/lazy_loader_test.js | lazy loader lazyload HTML node 11:56:35 INFO - TEST-PASS | sharedtest/test/unit/lazy_loader_test.js | lazy loader lazyload the same HTML node 11:56:35 INFO - TEST-PASS | sharedtest/test/unit/lazy_loader_test.js | lazy loader append the same css script 11:56:35 INFO - TEST-PASS | sharedtest/test/unit/lazy_loader_test.js | lazy loader Loaded callback is invoked correctly if node already exists on the DOM 11:56:35 INFO - TEST-PASS | sharedtest/test/unit/lazy_loader_test.js | lazy loader appending multiple nodes works 11:56:35 INFO - TEST-PASS | sharedtest/test/unit/lazy_loader_test.js | lazy loader populate web components 11:56:35 INFO - TEST-OK | sharedtest/test/unit/lazy_loader_test.js | took 349ms 11:56:35 INFO - suite results (pass/fail): 13/0 11:56:35 INFO - JavaScript warning: app://sharedtest.gaiamobile.org/common/vendor/chai/chai.js?time=1427223395840, line 3564: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create 11:56:36 INFO - TEST-START | sharedtest/test/unit/lazy_l10n_test.js
Frequent since the TC switch.
Flags: needinfo?(kgrandon)
Flags: needinfo?(jlal)
Summary: Intermittent lockscreen_conn_info_manager_test.js | system/LockScreenConnInfoManager > Single sim devices "after each" hook - TypeError: voice is null (lockscreen_connection_info_manager.js?time=1427223393577:273) → Intermittent lockscreen_conn_info_manager_test.js | system/LockScreenConnInfoManager > Single sim devices "after each" hook - TypeError: voice is null
Mass clear of needinfo as lots of TC changes have recently been deployed. I am still tracking and working on getting these issues fixed, but will work with the most egregious offenders first. Flag me again if needed.
Flags: needinfo?(kgrandon)
Flags: needinfo?(jlal)
Still happening regularly.
Flags: needinfo?(kgrandon)
German - looks like you've been the most recently active in this file, wondering if you can take a look at this test. (Alternatively we can disable it). Thanks!
Flags: needinfo?(kgrandon) → needinfo?(gtorodelvalle)
Hi Kevin, I am sorry but I am no longer involved in the Firefox OS project in Telefónica... :) Passing it over to Gabrielle so he can decide how to proceed... ;) Thanks!
Flags: needinfo?(gtorodelvalle) → needinfo?(gsvelto)
I think that the problem here stems from the fact that we're registering the updateConnStates() function as a callback for mozL10n.ready: https://github.com/mozilla-b2g/gaia/blob/dbf21c3546909109240200c66c1329f7962d96c3/shared/js/lockscreen_connection_info_manager.js#L72 The mozL10n mock implements mozL10n.ready() as a simple timeout which I believe is causing updateConnStates() to be called either during the test or right after them. In either case since it's being called asynchronously it's probably failing when running after the teardown() function has been called. Bug 1041403 has removed all the dependencies for the legacy mozL10n bits so I'll get rid of the mozL10n.ready callback too as I don't think we need it anymore.
Flags: needinfo?(gsvelto)
Assignee: nobody → gsvelto
Status: NEW → ASSIGNED
Comment on attachment 8634696 [details] [review] [gaia] gabrielesvelto:bug-1147237-do-not-listen-to-mozl10n-ready > mozilla-b2g:master What I thought would be a one-line change turned out to require a lot more fixing to clean up completely. The mozL10n.ready callback was the obvious issue but while running the tests I've noticed plenty of l10n-related errors being spewed on the command-line. Those were caused by the real l10n mutation observer running on the document body so I've got rid of the bits where we were adding the test nodes to the document. Additionally while checking if other event listeners were being called twice I noticed that we leaked quite a few in the tests so I've fixed that too by adding a proper teardown procedure to remove the window event listeners. Last but not least as I cleaned up the tests I've noticed that the mocks were being used improperly without proper cleanup of the mock data between each test. I've cleaned up that stuff too so now the tests should be fully stateless (all the mocks setup/teardown methods are now called between the tests). Note that the actual tests have not been touched, only their setup. Quite ironically, after my changes, the tests run a fair bit faster on my machine (~250ms vs ~350ms) possibly as a result of all the leaks being addressed.
Attachment #8634696 - Flags: review?(kgrandon)
Comment on attachment 8634696 [details] [review] [gaia] gabrielesvelto:bug-1147237-do-not-listen-to-mozl10n-ready > mozilla-b2g:master Very nice, thank you so much!
Attachment #8634696 - Flags: review?(kgrandon) → review+
Thanks for the quick review Kevin, landed in gaia/master 8c009877aff6b8b2f4a60756e2d09c0182393721 https://github.com/mozilla-b2g/gaia/commit/8c009877aff6b8b2f4a60756e2d09c0182393721 I'm closing the bug, let's reopen in case the problem shows up again.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Unfortunately this patch makes the connection info manager takes a super long time (~8 secs) to show the info on LockScreen, while it only appears when you reboot your phone. I'm firing a bug to describe it with a video. Just quickly mention my current bisected result here (and I manually test it to double check).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: