Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge Missing Transceiver Property Errors #913

Closed
3 tasks done
austinbarnes opened this issue Dec 3, 2018 · 13 comments
Closed
3 tasks done

Edge Missing Transceiver Property Errors #913

austinbarnes opened this issue Dec 3, 2018 · 13 comments

Comments

@austinbarnes
Copy link

Please read first!

Please use discuss-webrtc for general technical discussions and questions.

  • I have provided steps to reproduce (e.g. a link to a jsfiddle)
  • I have provided browser name, version and adapter.js version
  • This issue only happens when adapter.js is used

Note: If the checkboxes above are not checked (which you do after the issue is posted), the issue will be closed.

Versions affected

Microsoft Edge 42.17134.1.0
Microsoft EdgeHTML 17.17134
Chrome 70.0.3538.110 (Official Build) (64-bit)
adapter.js 7.0.0

Description

I just recently updated to version 7.0.0 and noticed I was getting some errors while trying to do video calls on Edge. These errors stop the ability for my code to clean up any peers using edge.

Here are the error messages:
adaptererrormessages

I debugged the errors and found out that there are (see the attached error log) transceivers being added that don't have either the properties iceGatherer or dtlsTransport:
edgetranscievererror

The lines that were having errors are: 2566, 2570, 3844, 3882, and 3883
Here are screen shots of some simple if statements I put around them to get the errors not happen:
screen shot 2018-12-03 at 4 47 03 pm
screen shot 2018-12-03 at 4 47 30 pm
screen shot 2018-12-03 at 4 47 46 pm

Steps to reproduce

  1. Start a call on Edge.
  2. Join the call with Chrome on another device.

Expected results

There are no errors while connecting the video.

Actual results

There are errors that stop any other functionality like cleaning up peers.

@fippo
Copy link
Member

fippo commented Dec 4, 2018

Does it still work in 6.4.x? https://github.com/otalk/rtcpeerconnection-shim hasn't seen many (released) changes in the adapter.js 7.0.0 version bump.

This sounds like it is attempting to use writeMediaSection for a (rejected) datachannel mline which isn't supposed to happen. Does this come from createOffer or createAnswer?

@austinbarnes
Copy link
Author

austinbarnes commented Dec 4, 2018

So the Edge client does call the createAnswer and while they are exchanging iceCandidates these errors happen (at least in my console logs). I tried with adapter versions 6.3.0, 6.4.0, 6.4.8 and am still getting these error messages.

However, I also tried version 6.2.0 and did not get any error messages.

@fippo
Copy link
Member

fippo commented Dec 4, 2018

I have a fix for the second error (above, thanks!) but can not reproduce the first one.
Do you have either a minimal example or a webrtc-internals dump from your application in a chrome-chrome case?

@austinbarnes
Copy link
Author

Awesome I am glad you found a fix so quick! So the first error is only happening on Edge. I can get you a chrome-chrome webrtc-internals dump but I don't know how helpful it would be..? Let me work on getting up a simple example as well.

@austinbarnes
Copy link
Author

Here is the chrome to edge webrtc-internals dump:
webrtc_internals_dump.txt

Here is the chrome to chrome webrtc-internals dump:
webrtc_internals_dump (1).txt

@fippo
Copy link
Member

fippo commented Dec 4, 2018

hrm... that looks pretty standard and the SDP answer is correctly rejecting the datachannel. Chrome to Edge was done with your local patches, right?
And the flow in Edge is

  • pc.setRemoteDescription(offerFromChrome)
  • pc.createAnswer()
  • pc.setLocalDescription()
    and it errors in createAnswer?

I've managed to reproduce that error message in a scenario where

  • pc.setRemoteDescription(offerFromChrome)
  • pc.createAnswer()
  • pc.setLocalDescription()
  • pc.createOffer()

the last call to pc.createOffer throws. See otalk/rtcpeerconnection-shim#178

@austinbarnes
Copy link
Author

The Chrome to Edge was done without my patch. I can do one with my patch if you want?

So the flow on Edge is:

  • receive signaling message with offer
  • pc.setRemoteDescription
  • pc.createAnswer
  • pc.setLocalDescription
  • send the answer to the Chrome client via our signaling piece.

I did just resolve an issue in our code where our onNegotionationNeededEventHandler was firing and trying to create an offer while the peer was already in the process of creating an answer, but I was only getting that error on Chrome and Firefox.

@fippo
Copy link
Member

fippo commented Dec 4, 2018

hrm... but this looks like you got an answer from Edge and that should not have happened if the error was thrown. 🤔

What is the typeargument to createMediaSection when the error is thrown?

@austinbarnes
Copy link
Author

So I am a little confused on where to find out the type argument in the code. Is it on the SDP that gets created by the createAnswer?

Also if you fixed the 2nd issue it should resolve the first issue. As soon as I fixed the undefined references to the iceGatherer and dtlsTransport with my simple if statements I didn't get either error messages.

@fippo
Copy link
Member

fippo commented Dec 5, 2018

Its in

function writeMediaSection(transceiver, caps, type, stream, dtlsRole) {

interesting if making the event... those events should fire asynchronously so errors in there should not cause subsequent failures.

@austinbarnes
Copy link
Author

austinbarnes commented Dec 5, 2018

Cool I did some logging of each parameter of that function call without my patch and I got that it got called twice with each type being answer (the dashes separate the calls):
writemediasectionlogging

I am working also on the warning message about the end of candidates message. I saw you had posted on Stackoverflow about adding a null ice candidate in order for that to happen correct?
article: https://stackoverflow.com/questions/51495599/timeout-for-addremotecandidate-consider-sending-an-end-of-candidates-notificati/51499669#51499669

@fippo
Copy link
Member

fippo commented Dec 7, 2018

v1.2.15 of https://www.npmjs.com/package/rtcpeerconnection-shim has a patch which should address this issue.

I am working also on the warning message about the end of candidates message.

You have to send a signal from the peer when it gets to onicecandidate with event.candidate not being defined and then call addIceCandidate(null)

@fippo
Copy link
Member

fippo commented Dec 10, 2018

should be fixed in v1.2.15 of rtcpeerconnection-shim, please reopen/holler if not

@fippo fippo closed this as completed Dec 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants