Closed Bug 1106934 Opened 8 years ago Closed 8 years ago

"Create Conversation" shows "unexpected error" before asking for a room name

Categories

(Hello (Loop) :: Client, defect, P1)

defect

Tracking

(firefox35+ fixed, firefox36 fixed, firefox37 fixed)

RESOLVED FIXED
mozilla37
Iteration:
36.3
Tracking Status
firefox35 + fixed
firefox36 --- fixed
firefox37 --- fixed
backlog Fx35+

People

(Reporter: drno, Assigned: standard8)

References

Details

(Keywords: regression)

Attachments

(1 file)

Console log from what appears to be a race condition:

GET https://loop.services.mozilla.com/v0/rooms [HTTP/1.1 200 OK 2056ms]
"[Dispatcher] Dispatching action" Object { windowId: "o_z7FAUGZOs", name: "getWindowData" } dispatcher.js:71:8
"[Dispatcher] Dispatching action" Object { publisherConfig: Object, getLocalElementFunc: function (), getRemoteElementFunc: function (), name: "setupStreamElements" } dispatcher.js:71:8
"[Dispatcher] Dispatching action" Object { windowId: "o_z7FAUGZOs", roomToken: "o_z7FAUGZOs", type: "room", name: "setupWindowData" } dispatcher.js:71:8
GET https://loop.services.mozilla.com/v0/rooms/o_z7FAUGZOs [HTTP/1.1 200 OK 1874ms]
TypeError: can't access dead object tab-firefox.js:98:0
POST https://loop.services.mozilla.com/v0/rooms/undefined [HTTP/1.1 404 Not Found 1201ms]
POST https://hlg.tokbox.com/prod/logging/ClientEvent [HTTP/1.1 200 OK 77ms]
"[Dispatcher] Dispatching action" Object { name: "gotMediaPermission" } dispatcher.js:71:8
no element found ClientEvent:1:1
"Loop hawkRequest error:" Object { code: 404, errno: 105, error: "Token not found." } MozLoopService.jsm:516
"[Dispatcher] Dispatching action" Object { error: Object, name: "roomFailure" } dispatcher.js:71:8
"Error in state `room-gather`:" Object { code: 404, errno: 105, error: "Token not found." } activeRoomStore.js:112:0

"[Dispatcher] Dispatching action" Object { roomList: Array[8], name: "updateRoomList" } dispatcher.js:71:8
"[Dispatcher] Dispatching action" Object { roomList: Array[9], name: "updateRoomList" } dispatcher.js:71:8
"[Dispatcher] Dispatching action" Object { roomToken: "o_z7FAUGZOs", roomName: "Conversation 8", roomOwner: "Guest", roomUrl: "https://hello.firefox.com/o_z7FAUGZOs", name: "setupRoomInfo" } dispatcher.js:71:8
"[Dispatcher] Dispatching action" Object { name: "joinRoom" } dispatcher.js:71:8
TypeError: can't access dead object tab-firefox.js:98:0
GET https://blocklist.addons.mozilla.org/blocklist/3/%7Bec8030f7-c20a-464f-9b0e-13a3a9e97384%7D/37.0a1/Firefox/20141202030201/Darwin_x86_64-gcc3-u-i386-x86_64/en-US/nightly/Darwin%2014.0.0/default/default/1/19/7/ [HTTP/1.1 200 OK 305ms]
POST http://ocsp.digicert.com/ [HTTP/1.1 200 OK 13ms]
TypeError: can't access dead object
Regression from bug 1097742. The issue here is that on the desktop side, we've now got this flow:

1) Window starts displaying views
2) Dispatches SetupStreamElements on first display
3) Starts to get room information.

Depending on what happens in which order, the media might complete before getting the room information. If that's the case then the room setup will fail, as the window hasn't got all the information necessary to join the room.

I have a simple patch for this coming up, that makes the desktop behave the same way as standalone.
Assignee: nobody → standard8
Blocks: 1097742
backlog: --- → Fx35+
Keywords: regression
OS: Mac OS X → All
Priority: -- → P1
Hardware: x86 → All
[Tracking Requested - why for this release]:
We need to fix this before the first release of Rooms (Fx35)
This fixes the race condition - don't attempt to get media, until the store is in the correct state.
Attachment #8531398 - Flags: review?(nperriault)
Comment on attachment 8531398 [details] [diff] [review]
Opening a Loop room can show an unexpected error due to race conditions.

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

LGTM.
Attachment #8531398 - Flags: review?(nperriault) → review+
https://hg.mozilla.org/mozilla-central/rev/0bb911bec5af
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Comment on attachment 8531398 [details] [diff] [review]
Opening a Loop room can show an unexpected error due to race conditions.

Approval Request Comment
[Feature/regressing bug #]: bug 1105520

[User impact if declined]: inability to land uplift of bug 1105520 (and there may still be less-frequent user-initiated race conditions if the user opens the room quickly).  Bug 1105520 is beta+, and is on aurora (it landed before uplift; this fix landed a day after uplift).

[Describe test coverage new/current, TBPL]: on fxteam for most of a week; on m-c for 4-5 days.  Manually tested creating 15+ rooms on m-c builds (opt and debug), and on aurora after applying this patch.  Previous failure rate on aurora was very high on the 2nd or higher room.  On beta (with the bug 1105520 patch applied, which is beta+ but I haven't landed), the race failure rate was much lower; 4-6 rooms created before failure normally.  I'm blocking the beta landing of bug 1105520 on this.

[Risks and why]: fairly low risk - one isolated change to wait on a stable state before popping open the room view.  Includes test updates.

[String/UUID change made/needed]: none
Attachment #8531398 - Flags: approval-mozilla-beta?
Attachment #8531398 - Flags: approval-mozilla-aurora?
Attachment #8531398 - Flags: approval-mozilla-beta?
Attachment #8531398 - Flags: approval-mozilla-beta+
Attachment #8531398 - Flags: approval-mozilla-aurora?
Attachment #8531398 - Flags: approval-mozilla-aurora+
Opened 20 rooms at once on Beta (and Aurora), no problems where before it was very flakey
Flags: qe-verify-
Flags: in-testsuite+
Iteration: --- → 36.3
You need to log in before you can comment on or make changes to this bug.