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

TypeError: parts[2] is undefined on Firefox #29

Open
oanguenot opened this issue Apr 13, 2020 · 6 comments
Open

TypeError: parts[2] is undefined on Firefox #29

oanguenot opened this issue Apr 13, 2020 · 6 comments

Comments

@oanguenot
Copy link

Hi,

When testing simpleWebRTC (open source version 3.1.0) but used with adapter.js 7.0.1, I encounter the following error when having a video between Chrome and Firefox (on Firefox side):

var candidate = {
foundation: parts[0],
component: parts[1],
protocol: parts[2].toLowerCase(), // TypeError: parts[2] is undefined
priority: parts[3],
ip: parts[4],
port: parts[5],
// skip parts[6] == 'typ'
type: parts[7],
generation: '0'
};

Despite this issue, there is no problem with the video.

Thanks in advance,
Regards,
Olivier

@oanguenot
Copy link
Author

oanguenot commented Apr 13, 2020

Same issue with latest adapter.js version from branch 6.x (6.4.8). Seems that there is no issue with adapter.js version 6.0.0

@fippo
Copy link
Member

fippo commented Apr 13, 2020

this is probably the empty-string candidate: '' Firefox sends. You'll need to filter that one out.

@oanguenot
Copy link
Author

Thanks for your quick answer :-)

When debugging, this candidate is an array with only one empty string Array [ "" ]
this is on Firefox side.

What could be the best way to avoid that error in logs (parts[2] is undefined) ? Is it to just set the protocol to null or to return an null candidate. I don't know the impact of returning an null candidate.

Thanks in advance

@oanguenot
Copy link
Author

I finally understood you answer.

In fact, I don't have the hand on the signaling part. I use simpleWebRTC open source library with webrtc-adapter bundled externally in order to use the branch 7.x (I had to do that due to the ES6 module, so removed the link to adapter-core in build.js in order to bundle simplewebrtc)

But everywhere I look for a library, everywhere I found you name. So, happy to discuss with you :-)

@fippo
Copy link
Member

fippo commented Apr 15, 2020

you'll have to fix it somewhere here: https://github.com/otalk/RTCPeerConnection/blob/master/rtcpeerconnection.js#L784
simplewebrtc is not maintained anymore, sadly nobody stepped up.

@oanguenot
Copy link
Author

Thanks for your answer Philipp. I will have a try.

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