Closed
Bug 965143
Opened 11 years ago
Closed 11 years ago
[B2G][RIL] JavaScript error when connecting to a network manually and then set automatically selection
Categories
(Firefox OS Graveyard :: RIL, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.0 S4 (20june)
People
(Reporter: arthurcc, Assigned: edgar)
References
Details
(Whiteboard: [p=1])
Attachments
(1 file, 1 obsolete file)
13.76 KB,
patch
|
edgar
:
review+
|
Details | Diff | Splinter Review |
* Build Number
Inari
Gaia 59e477229162926981cc00cf5d6c53f9614f17dd
Gecko http://hg.mozilla.org/mozilla-central/rev/7e79536aca0a
BuildID 20140128161516
Version 29.0a1
* Steps
1. Go to Settings > Cellular & Data > Network operator
2. Disable automatic selection
3. Connecting to any network
4. Enable automatic selection
* Expected result
No JavaScript error
* Actual Result
E/GeckoConsole( 523): [JavaScript Error: "[Exception... "Error: Already selecting a network: [xpconnect wrapped nsIDOMMozMobileNetworkInfo]'Error: Already selecting a network: [xpconnect wrapped nsIDOMMozMobileNetworkInfo]' when calling method: [nsIMobileConnectionProvider::selectNetworkAutomatically]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "JS frame :: app://settings.gaiamobile.org/js/carrier.js :: cs_initOperatorSelector/opAutoSelectInput.onchange :: line 368" data: no]" {file: "app://settings.gaiamobile.org/js/carrier.js" line: 368}]
E/GeckoConsole( 523): [JavaScript Error: "NS_ERROR_XPC_JS_THREW_JS_OBJECT: Error: Already selecting a network: [xpconnect wrapped nsIDOMMozMobileNetworkInfo]'Error: Already selecting a network: [xpconnect wrapped nsIDOMMozMobileNetworkInfo]' when calling method: [nsIMobileConnectionProvider::selectNetworkAutomatically]" {file: "app://settings.gaiamobile.org/js/carrier.js" line: 368}]
Assignee | ||
Comment 1•11 years ago
|
||
Gecko doesn't allow user switch to automatic selection if the previous selection request is still under processing. In such case, you will get this JavaScript error,
E/GeckoConsole( 523): [JavaScript Error: "NS_ERROR_XPC_JS_THREW_JS_OBJECT: Error: Already selecting a network: [xpconnect wrapped nsIDOMMozMobileNetworkInfo]'Error: Already selecting a network: [xpconnect wrapped nsIDOMMozMobileNetworkInfo]' when calling method: [nsIMobileConnectionProvider::selectNetworkAutomatically]" {file: "app://settings.gaiamobile.org/js/carrier.js" line: 368}]
Thank you.
Assignee: nobody → echen
Assignee | ||
Comment 2•11 years ago
|
||
This is an expected behavior, so close as WONTFIX.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Assignee | ||
Comment 3•11 years ago
|
||
After offline discussion, since electNetwork()/selectNetworkAutomatically() returns a DOMRequest, it seems more reasonable to report error by dispatching an error event instead of thrown an exception. So reopen this bug to address it.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Updated•11 years ago
|
Blocks: b2g-ril-interface
Assignee | ||
Updated•11 years ago
|
Whiteboard: [p=1]
Target Milestone: --- → 2.0 S4 (20june)
Assignee | ||
Comment 4•11 years ago
|
||
Assignee | ||
Comment 5•11 years ago
|
||
Comment on attachment 8437544 [details] [diff] [review]
Patch, v1
Hi Hsinyi, Could you help to review this? Thank you
Attachment #8437544 -
Flags: review?(htsai)
Comment 6•11 years ago
|
||
Comment on attachment 8437544 [details] [diff] [review]
Patch, v1
Review of attachment 8437544 [details] [diff] [review]:
-----------------------------------------------------------------
I like the new behaviour.
::: dom/mobileconnection/tests/marionette/test_mobile_networks.js
@@ +100,5 @@
> }
>
> function testSelectNetworkErrors(aNetworkToSelect, aAnotherNetwork) {
> throwsException(() => mobileConnection.selectNetwork(null));
> throwsException(() => mobileConnection.selectNetwork({}));
These two should be revised accordingly, right?
::: dom/system/gonk/RadioInterfaceLayer.js
@@ +2449,5 @@
> + /**
> + * The networks that are currently trying to be selected (or "automatic").
> + * This helps ensure that only one network per client is selected at a time.
> + */
> + _selectingNetworks: null,
nit: s/_selectingNetworks/_selectingNetwork/
::: dom/system/gonk/ril_worker.js
@@ +6156,5 @@
> RilObject.prototype[REQUEST_SET_NETWORK_SELECTION_AUTOMATIC] = function REQUEST_SET_NETWORK_SELECTION_AUTOMATIC(length, options) {
> if (options.rilRequestError) {
> options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
> + } else {
> + this._updateNetworkSelectionMode(GECKO_NETWORK_SELECTION_AUTOMATIC);
Nice!
Attachment #8437544 -
Flags: review?(htsai)
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #6)
> Comment on attachment 8437544 [details] [diff] [review]
> Patch, v1
>
> Review of attachment 8437544 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I like the new behaviour.
>
> ::: dom/mobileconnection/tests/marionette/test_mobile_networks.js
> @@ +100,5 @@
> > }
> >
> > function testSelectNetworkErrors(aNetworkToSelect, aAnotherNetwork) {
> > throwsException(() => mobileConnection.selectNetwork(null));
> > throwsException(() => mobileConnection.selectNetwork({}));
>
> These two should be revised accordingly, right?
No, we don't need to revise them.
Above two exceptions are both thrown by MozMobileConnectionBinding (not RILContentHelper), because we did not pass a MozMobileNetwork wrapped object as input argument.
Comment 8•11 years ago
|
||
(In reply to Edgar Chen [:edgar][:echen] from comment #7)
> (In reply to Hsin-Yi Tsai [:hsinyi] from comment #6)
> > Comment on attachment 8437544 [details] [diff] [review]
> > Patch, v1
> >
> > Review of attachment 8437544 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > I like the new behaviour.
> >
> > ::: dom/mobileconnection/tests/marionette/test_mobile_networks.js
> > @@ +100,5 @@
> > > }
> > >
> > > function testSelectNetworkErrors(aNetworkToSelect, aAnotherNetwork) {
> > > throwsException(() => mobileConnection.selectNetwork(null));
> > > throwsException(() => mobileConnection.selectNetwork({}));
> >
> > These two should be revised accordingly, right?
> No, we don't need to revise them.
> Above two exceptions are both thrown by MozMobileConnectionBinding (not
> RILContentHelper), because we did not pass a MozMobileNetwork wrapped object
> as input argument.
Got it! Thanks~
Updated•11 years ago
|
Attachment #8437544 -
Flags: review+
Assignee | ||
Comment 9•11 years ago
|
||
Address nit in comment #6:
- s/_selectingNetworks/_selectingNetwork/
Attachment #8437544 -
Attachment is obsolete: true
Attachment #8438907 -
Flags: review+
Assignee | ||
Comment 10•11 years ago
|
||
Assignee | ||
Comment 11•11 years ago
|
||
Comment 12•11 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•