Closed Bug 951888 Opened 11 years ago Closed 11 years ago

[System] Application does not degrade gracefully when `mozMobileConnections` is undefined

Categories

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

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jugglinmike, Assigned: arthurcc)

References

Details

Attachments

(1 file)

When run in contexts that do not implement the `navigator.mozMobileConnections` API, the System application (specifically `airplane_mode.js` [1]) raises an uncaught exception. This is particularly troublesome in automated testing environments, where uncaught exceptions (even non-critical ones) can interrupt test execution. This bug specifically causes an intermittent failures in the integration tests for the JavaScript Marionette client (see bug 950973, along with the failing build on TravisCI [2]). [1] https://github.com/mozilla-b2g/gaia/blob/744f691f670dae93f160dc1199592a033b30b78a/apps/system/js/airplane_mode.js#L157 [2] https://travis-ci.org/mozilla-b2g/marionette-js-client/builds/15585099
Assigning to ej chen since it looks like this came in as part of bug 945140
Assignee: nobody → ejchen
Gaia has already migrated to the new mobile connection API. I would suggest to update the testing environments to the latest gecko instead of patching gaia.
The travis environment has been running on the latest b2g desktop build available at time of test kickoff from b2g-incoming for quite a while now. We can't get any more new than that. It's that we don't build mozMobileConnection into Desktop.
Assignee: ejchen → arthur.chen
Hey Arthur, I guess bug 956428 is because of the same issue. If so, could you take care of it as well?. Thanks.
Flags: needinfo?(arthur.chen)
Depends on: 948847
Took it, thanks for reminding.
Flags: needinfo?(arthur.chen)
This is now blocking both FTE and Rocketbar integration tests since they run on B2G desktop. Will the AirplaneModeHelper be landing soon, and should that help this?
Alive, could you help review this one line patch? Thanks.
Attachment #8360889 - Flags: review?(alive)
Attachment #8360889 - Flags: review?(alive) → review+
master: f976d8d8673753d4816197744ac60880855aaeb7
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
So if I'm reading this patch right, now we just disallow setting of airplane mode if mozMobileConnections doesn't exist? What about wifi and bluetooth?
(In reply to Kyle Machulis [:kmachulis] [:qdot] from comment #10) > So if I'm reading this patch right, now we just disallow setting of airplane > mode if mozMobileConnections doesn't exist? What about wifi and bluetooth? Good point. Currently airplane mode relies on the existence of mozMobileConnections and which does not make sense. Let's fix the undefined error in this patch. I've filed bug 960861 for tracking the issue.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: