Standalone UI doesn't always show "Something went wrong" if the network connection dies

RESOLVED FIXED in Firefox 40

Status

Hello (Loop)
Client
P3
normal
Rank:
32
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: standard8, Assigned: standard8)

Tracking

unspecified
mozilla40
Points:
2
Bug Flags:
firefox-backlog +

Firefox Tracking Flags

(firefox40 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
STR

1) Set up a room
2) Join the room in the standalone UI (the link generator doesn't need to be in the room)
3) Do something to make the network disconnect, on Mac I turned off the Wifi
4) Wait

Expected Results => "Something went wrong" is displayed.

Actual Results => "You're the first one here" is displayed and stays there.

If you have set dispatcher debugging on [1], then you see:

"[Dispatcher] Dispatching action caused an exception: " Exception { message: "", result: 2147500037, name: "NS_ERROR_FAILURE", filename: "https://hello.firefox.com/shared/libs/jquery-2.1.0.js", lineNumber: 8556, columnNumber: 0, inner: null, data: null, stack: ".send@https://hello.firefox.com/shared/libs/jquery-2.1.0.js:8556:8
.ajax@https://hello.firefox.com/shared/libs/jquery-2.1.0.js:8084:8
loop.StandaloneMozLoop</StandaloneMozLoopRooms.prototype._postToRoom@https://hello.firefox.com/js/standaloneMozLoop.js:123:16
loop.StandaloneMozLoop</StandaloneMozLoopRooms.prototype.leave@https://hello.firefox.com/js/standaloneMozLoop.js:219:0
loop.store.ActiveRoomStore</ActiveRoomStore<._leaveRoom@https://hello.firefox.com/shared/js/activeRoomStore.js:750:0
loop.store.ActiveRoomStore</ActiveRoomStore<.connectionFailure@https://hello.firefox.com/shared/js/activeRoomStore.js:512:6
loop.Dispatcher</Dispatcher.prototype._dispatchNextAction/<@https://hello.firefox.com/shared/js/dispatcher.js:76:10
loop.Dispatcher</Dispatcher.prototype._dispatchNextAction@https://hello.firefox.com/shared/js/dispatcher.js:74:6
loop.Dispatcher</Dispatcher.prototype.dispatch@https://hello.firefox.com/shared/js/dispatcher.js:48:6
loop.OTSdkDriver</OTSdkDriver.prototype._onSessionDisconnected@https://hello.firefox.com/shared/js/otSdkDriver.js:376:0
executeListenersAsyncronously/</<@https://hello.firefox.com/shared/libs/sdk.js:2098:13
handleMessage@https://hello.firefox.com/shared/libs/sdk.js:1972:10
" }

[1] in the web console with the room page loaded, enter

 localStorage.setItem("debug.dispatcher", true);

and then reload the page.
(Assignee)

Comment 1

3 years ago
Note: If you're on an https server, then at step 4, the video streams are removed from the display, but it can take another 30 seconds or so for anything else to be displayed - if at all.

I've tracked the fundamental issue down to jquery - its not catching the exception thrown by $.ajax, and as a result, we're getting the uncaught exception. Upgrading jquery fixes this.
(Assignee)

Comment 2

3 years ago
Created attachment 8602025 [details] [diff] [review]
Standalone UI doesn't always show 'Something went wrong' if the network connection dies. Upgrade jquery due to not always properly catching errors from $.ajax.

This updates jquery which fixes the error. I think the error was fixed around 2.1.2, but we might as well update to the latest anyway.

I don't think there's much we can easily test here as this requires setting up a call and then killing the network connection etc - although it basically feels like we'd be testing jquery, and not our code anyway.
Attachment #8602025 - Flags: review?(dmose)

Updated

3 years ago
Flags: firefox-backlog+

Updated

3 years ago
Rank: 32
Comment on attachment 8602025 [details] [diff] [review]
Standalone UI doesn't always show 'Something went wrong' if the network connection dies. Upgrade jquery due to not always properly catching errors from $.ajax.

Review of attachment 8602025 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me.  Interestingly, I couldn't find a changelog or history file for jQuery anywhere, but I didn't see anything obvious crazy in the various release-related blog posts for it.  :-/
Attachment #8602025 - Flags: review?(dmose) → review+
sorry had to back this out i think this caused https://treeherder.mozilla.org/logviewer.html#?job_id=2969824&repo=fx-team
Flags: needinfo?(standard8)
(Assignee)

Comment 8

3 years ago
The issue was elsewhere, this has been re-landed (comment 7).
Flags: needinfo?(standard8)
https://hg.mozilla.org/mozilla-central/rev/1459f300eca0
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox40: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.