Closed Bug 1603887 Opened 4 years ago Closed 4 years ago

dataChannel closes unexpectedly, after two rounds of negotiation

Categories

(Core :: WebRTC: Networking, defect, P2)

71 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox71 --- wontfix
firefox72 --- wontfix
firefox73 --- wontfix
firefox74 --- wontfix
firefox75 --- wontfix
firefox76 --- fixed

People

(Reporter: makarandp, Assigned: bwc)

Details

Attachments

(5 files)

Attached file datatracks.html

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36

Steps to reproduce:

I am seeing that dataChannel close unexpected after a round of negotiation.
To reproduce, Please run this JSFiddle

https://jsfiddle.net/makarandp/wynouqhp/

Actual results:

Notice that after Alice and Bob finish 2nd round of negotiation
the dataChannel got closed for no reason.

Expected results:

dataChannel should instead get opened and they should be able to send / receive data on it.

Notice that same sample works as expected on Chrome.

Reproducible on the latest Firefox Nightly 73.0a1, Firefox 72.0b8 and on Firefox 71.0 on Windows 10 x 64, Mac OS X 10.14 and on Ubuntu 18.04 x64.

Status: UNCONFIRMED → NEW
Component: Untriaged → WebRTC: Networking
Ever confirmed: true
Product: Firefox → Core

Looks like this goes back at least as far back as at least 53. This is most likely not a regression.

Flags: needinfo?(na-g)

@Nico, any update on this one ?

Priority: -- → P3

Hi, any chance this bug can get some movement? Our customers have reported it, data tracks are not very usable in Firefox because of this.

So, it looks like this is because of this code:

https://searchfox.org/mozilla-central/rev/6cd54550a27e2f6ca0755a25328f769e41e524f4/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp#1076-1079

The spec doesn't say to do this at all. Let me see if things behave better when I remove this.

Assignee: nobody → docfaraday
Priority: P3 → P2

Fiddle seems to be working better with the patches, although the DataChannel is still closing after the open event because the other end hasn't registered on the 'datachannel' event handler, causing the DataChannel to be garbage-collected.

Can you verify that the binary here fixes your issue?

https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Ne4w_OWXRIiA-MowvOei6Q/runs/0/artifacts/public/build/target.dmg

Flags: needinfo?(na-g) → needinfo?(makarandp)
Bryon, I tried to launch the you binary, but got an error while opening it:
=======

Bryon, I tried to launch the you binary, but got an error while opening it. I have attached the error.

Flags: needinfo?(makarandp)
Flags: needinfo?(makarandp)

Byron, still no luck with new binary. This time the browser launches, but shows beachball for about 30 seconds, The beachball goes away but browser does not navigate to anything entered in address bar.

Flags: needinfo?(makarandp) → needinfo?(docfaraday)

That's extremely weird. Nothing I touched would effect startup, so this must be some sort of build problem.

Flags: needinfo?(docfaraday)

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

Honestly, I'm not sure this ever worked properly.

Waiting on some retriggers.

Pushed by bcampen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/081cfce87dbe
Drive closing of DataChannels with transport events, not negotiation events. r=ng
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
Flags: qe-verify+

I tried to verify the fix on the latest Firefox Nightly 77.0a1 (2020-04-21) on MacOS 10.14 and I still can see the same problem reported in this bug.
But when I tried to verify the bug on Firefox Nightly 76.0a1 (2020-03-26) after the bug was fixed I couldn't reproduce the issue.

Could you please take a look at this?

Flags: needinfo?(docfaraday)

Fiddle seems to work fine for me, although the behavior in comment 9 is still present (which is as expected). Can you attach the output you're seeing from the fiddle?

Flags: needinfo?(docfaraday) → needinfo?(hani.yacoub)

Attaching a screenshot with the result on the latest Nightly which seems to be the correct result.
I'm not sure why I was seeing "Boo, data channel unexpectedly closed!" as the last message when I tested the last time.

Flags: needinfo?(hani.yacoub) → needinfo?(docfaraday)

That was probably the same thing I noted in comment 9.

Flags: needinfo?(docfaraday)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: