Closed Bug 1083760 Opened 11 years ago Closed 11 years ago

[Loop] Doesn't always clear the "Connecting" display (mainly audio-only calls?)

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Assigned: jaoo)

References

Details

(Whiteboard: [mobile app][blocking][tef-triage][loop in v1.1])

Attachments

(1 file)

Using revision c52321f9bb4d9ad2ade8b0d43ad719f8bae01972 on Gaia 2.2, and Firefox Nightly. STR: 1) On Firefox desktop, initiate an audio-only call to a flame device 2) Accept the call with audio-only Actual Results - The call is connected, and audio can be heard at both ends - The Flame device continues displaying "Connecting" Expected Results - The Flame device shows "Connected" and/or the avatar of the contact (or a default image as desktop currently does)
I've just gone back to video calls, and I've noticed that "Connecting" is remaining on those as well. Not sure if I just didn't notice it earlier, but I've restarted both ends, and "Connecting" still doesn't go away during video calls even when its fully connected.
Summary: [Loop] Audio-only calls have confusing UI → [Loop] Doesn't always clear the "Connecting" display (mainly audio-only calls?)
Hey Song, we need your help here. We wait for the 'loaded' event (see at [1] please) on the subscriber object to change the UI, drop the string 'Connecting' and show the counter. Sometimes this function is not called and the A/V is available on both ends. I don't know how we could poke around. Any ideas? Thanks! [1] https://github.com/mozilla-b2g/firefoxos-loop-client/blob/master/app/call_screen/js/call_manager.js#L402
Flags: needinfo?(song)
Just reproduced this issue and something wrong showed up in the logs. Hope it helps Song. E/GeckoConsole( 1146): [JavaScript Error: "TypeError: stream.connection is undefined" {file: "app://loop.services.mozilla.com/libs/tokbox/v2.2.9.1/js/TB.js" line: 20485}]
@Jose, the error stream.connection is a race condition caused when streamCreated event gets fired before connectionCreated event. This bug is fixed in OpenTok 2.2.9.3 patch. This should not cause this particular issue. I can reliable reproduce this issue on my device, and here is what I discovered: * I added some console log statements in [1] to see if subscriber loaded event is getting called and if CallScreenUI.setCallStatus("connected") gets fired. They are. No problems here. * I added some console log statements in [2] to see what states are being set. The resulting logs shows that somewhere in the code, setCallStatus("connecting") is getting called again, AFTER setCallStatus("connecting"). Here are the logs: :336 in CallScreenUI.setCallStatus: ********* :337 in CallScreenUI.setCallStatus: ********* :338 in CallScreenUI.setCallStatus: setting call status: connecting :339 in CallScreenUI.setCallStatus: ********* :340 in CallScreenUI.setCallStatus: ********* :420 in CallManager.join/<.streamCreated: SETTING EVENT HANDLER :423 in CallManager.join/<.streamCreated/<.loaded: OpenTok SUBSCRIBER LOADED :336 in CallScreenUI.setCallStatus: ********* :337 in CallScreenUI.setCallStatus: ********* :338 in CallScreenUI.setCallStatus: setting call status: connected :339 in CallScreenUI.setCallStatus: ********* :340 in CallScreenUI.setCallStatus: ********* :427 in CallManager.join/<.streamCreated/<.loaded: setting call status to connected :336 in CallScreenUI.setCallStatus: ********* :337 in CallScreenUI.setCallStatus: ********* :338 in CallScreenUI.setCallStatus: setting call status: connecting :339 in CallScreenUI.setCallStatus: ********* :340 in CallScreenUI.setCallStatus: ********* :336 in CallScreenUI.setCallStatus: ********* :337 in CallScreenUI.setCallStatus: ********* :338 in CallScreenUI.setCallStatus: setting call status: ending :339 in CallScreenUI.setCallStatus: ********* :340 in CallScreenUI.setCallStatus: ********* :336 in CallScreenUI.setCallStatus: ********* :337 in CallScreenUI.setCallStatus: ********* :338 in CallScreenUI.setCallStatus: setting call status: ended :339 in CallScreenUI.setCallStatus: ********* :340 in CallScreenUI.setCallStatus: ********* * I think a possible fix would be to check to make sure that call is not currently is progress before setting callstatus to connecting. In a statemachine, a transition from connected to connecting should not be possible anyways. It seems that connecting status is getting set in [3]. Hope this helps! [1] https://github.com/mozilla-b2g/firefoxos-loop-client/blob/master/app/call_screen/js/call_manager.js#L425 [2] https://github.com/mozilla-b2g/firefoxos-loop-client/blob/master/app/call_screen/js/call_screen_ui.js#L336 [3] https://github.com/mozilla-b2g/firefoxos-loop-client/blob/master/app/call_screen/js/call_manager.js#L143
Thanks for these findings here Song. It seems the A/V media element start playing even before the call set up protocol finishes. The fix might be on the client (app) side then.
Flags: needinfo?(song)
Assignee: nobody → borja.bugzilla
Assignee: borja.bugzilla → josea.olivera
Let's pair up for this review Borja so we could land this soon. Thanks!
Attachment #8529264 - Flags: review?(borja.bugzilla)
Comment on attachment 8529264 [details] [review] Pointer to Github PR https://github.com/mozilla-b2g/firefoxos-loop-client/pull/336 R+. Please rebase properly when the other bug will be merged! Thanks!
Attachment #8529264 - Flags: review?(borja.bugzilla) → review+
Blocks: 1036490
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [mobile app][blocking][tef-triage][loop approved for 1.1]
Whiteboard: [mobile app][blocking][tef-triage][loop approved for 1.1] → [mobile app][blocking][tef-triage][loop in v1.1]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: