Closed Bug 1116878 Opened 10 years ago Closed 10 years ago

[2.1] Most bluetooth tests fail with "app = null" error

Categories

(Firefox OS Graveyard :: Certification Suite, defect)

defect
Not set
normal

Tracking

(blocking-b2g:2.1+)

RESOLVED WORKSFORME
blocking-b2g 2.1+

People

(Reporter: jgriffin, Assigned: atsai)

References

Details

Attachments

(1 file, 1 obsolete file)

On a 2.1 KK Flame, most of the bluetooth tests fail with the same stack trace: JavascriptException: NS_ERROR_FAILURE: stacktrace: execute_script @bluetooth_test.py, line 110 inline javascript, line 176 src: " app = null;"
This occurs because the returned value of getDefaultAdapter() contains a 'uuids' field which can't be serialized by Marionette.
(In reply to Jonathan Griffin (:jgriffin) from comment #1) > This occurs because the returned value of getDefaultAdapter() contains a > 'uuids' field which can't be serialized by Marionette. The problem is actually that this field cannot be accessed at all; attempting to access 'uuids' (even just calling typeof() on it) generates a NS_ERROR_FAILURE exception. Although we could work around this with a little work, this seems like a bug in the Flame KK build. Al, how do you want to handle it? (We had a similar problem with an OEM a few months ago, is this a bug in our bluetooth stack?)
Flags: needinfo?(atsai)
This potentially seems related to bug 1059136.
I'll take care of this one on finding resource to fix it if possible.
Flags: needinfo?(atsai)
Ben, do you think it's possible to provide solution from Mozilla side? Or, we'll need partners' input?
Flags: needinfo?(btian)
I'll take a look. :)
Assignee: nobody → jaliu
Clear my ni? per comment 6.
Flags: needinfo?(btian)
[Blocking Requested - why for this release]: Mozilla QA team is working on the release of MCTS for v2.1. Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=970615#c44 The MCTS bluetooth tests would fail on v2.1 when it attempts to access 'BluetoothAdapter.uuids'. 'BluetoothAdapter.uuids' was exposed on Bug 1059136, however, it didn't uplifted to v2.1 yet. Request for 2.1? since this bug blocks the release of MCTS v2.1 (Bug 970615)
blocking-b2g: --- → 2.1?
Decided to put it to 2.1.
blocking-b2g: 2.1? → 2.1+
Depends on: 1125033
Comment on attachment 8553497 [details] [diff] [review] (for 2.1) [bluedroid] Expose adapter uuids field. (v0) Move the review process to Bug 1125033 since the patch is belong to Bluetooth.
Attachment #8553497 - Attachment is obsolete: true
Hi Jonathan, This bug was caused by Bug 1125033. Since the Bug 1125033 has been fixed, would you mind if I close this bug ?
Flags: needinfo?(jgriffin)
I'll do a test locally and close the bug if it's fixed. Thanks for your kindly help, Jamin.
Flags: needinfo?(jgriffin)
Still encounter failure: JavascriptException: JavascriptException: InternalError: too much recursion stacktrace: execute_script @bluetooth_test.py, line 110 inline javascript, line 176 src: " app = null;" I am going to look into the issue.
The failure happens in webapi_tests/app_management.js Line 176
The failure is trapped in gecko/dom/apps/AppsService.js Line 68~70 getAppLocalIdByStoreId: function getAppLocalIdByStoreId(aStoreId) { debug("getAppLocalIdByStoreId( " + aStoreId + " )"); return DOMApplicationRegistry.getAppLocalIdByStoreId(aStoreId); },
(In reply to Al Tsai [:atsai] from comment #16) > The failure is trapped in gecko/dom/apps/AppsService.js Line 68~70 > > getAppLocalIdByStoreId: function getAppLocalIdByStoreId(aStoreId) { > debug("getAppLocalIdByStoreId( " + aStoreId + " )"); > return DOMApplicationRegistry.getAppLocalIdByStoreId(aStoreId); > }, E/GeckoConsole( 2386): [JavaScript Error: "too much recursion" {file: "jar:file:///system/b2g/omni.ja!/components/AppsService.js" line: 69}]
Attached file pr234 (deleted) —
return attributes as an object instead of returning whole javascript object https://developer.mozilla.org/en-US/docs/Web/API/BluetoothAdapter
Attachment #8571220 - Flags: review?(oouyang)
Attachment #8571220 - Flags: review?(fyen)
Attachment #8571220 - Flags: review?(oouyang) → review+
Comment on attachment 8571220 [details] pr234 comment on github
Attachment #8571220 - Flags: review?(fyen) → review+
Assignee: jaliu → atsai
merged
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
This does not fix the problem, at least on my Flame. It just changes the error. The root of the problem is the bluetooth adapter's 'uuids' field. To fix the issue, you'd have to omit line 120 of https://github.com/mozilla-b2g/fxos-certsuite/pull/234/files Do the tests now pass for you on a Flame?
Status: RESOLVED → REOPENED
Flags: needinfo?(atsai)
Resolution: FIXED → ---
from my side, uuids problem has been fixed and I can correct grab the uuids field. However, there's a new issue happened that the bt_adapter cannot be returned as a object. On my device, the code ''' marionette.execute_script("return window.wrappedJSObject.bt_adapter;") ''' will simply return an empty object. I was told that some of the JSObject return by gecko cannot be stringified. That's why I change the return value with grab the attributes we need only. What's the build you are using now? I'd like to flash to your build and re-test it again. Thank you for letting me know.
Flags: needinfo?(atsai)
I'd like to know the build you are using. We tested with the latest v2.1 build w/ v18D-1 as base image and it works for us.
Flags: needinfo?(jgriffin)
Hi Al, I didn't realize something in the build had changed to improve this situation. I flashed the latest 2.1 build and confirm the problem does not repeat.
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Flags: needinfo?(jgriffin)
Resolution: --- → FIXED
Great. Thanks a lot.
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: