Getting error in edge(c004e001) for new RTCIceGatherer(self.iceOptions);
Browsers and versions affected Microsoft Edge 38.14393.0.0
Description When we are trying to access new RTCPeerConnection in adpater.js. Possible reason is usages of new RTCIceGatherer(self.iceOptions) in window.RTCPeerConnection.prototype._createIceAndDtlsTransports = function(...) {...}
One important thing is that, If I use null instead of iceServers in new RTCPeerConnection() then I am not getting such error. That means it's coming if I use IceServers in ORTC!!
As per as I know that this issue already been reported in Microsoft developers community, https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/6842709/
Steps to reproduce When we are using new RTCPeerConnection on Microsoft Edge on mentioned version.
Expected results Success or failure with exact debug information.
Actual results Getting console error on edge as 'Could not complete the operation due to error c004e001.'
what is iceOptions before and after doing the iceServers.filter here?
I have used iceservers only,
var rtcOptions = {
iceServers: {
url: 'stun:stun.l.google.com:19302',
urls: 'stun:stun.l.google.com:19302'
},
{
url: 'turn:turn.bistri.com:80',
urls: 'turn:turn.bistri.com:80',
credential: 'homeo',
username: 'homeo'
}
};
peerConection = new RTCPeerConnection(rtcOptions);
TURN urls need to be fully qualified, i.e. turn:turn.bistri.com:80?transport=udp
But bistri has changed the credentials for that account a loooooooong time ago so these credentials won't work.
As per your suggestion it's working and definitely something is not good for edge because stun:stun.iptel.org this STUN server also not working for Edge and getting the same error.
Edge doesn't support stun: and will internally filter it.
@fippo sorry, I can't understand very well what's happening here. what do you mean by 'Edge doesn't support stun: and will internally filter it.' ?
[EDIT] Trying myself and leaving only TURN urls id does effectively works. But at this point, shouldn't adapter filter out these urls instead of giving 'InvalidAccessError'??
Also, I'm using twilio TURN service which gives me [{urls: 'stun:stun.blablabla}, {urls: 'turn:turn.bablabla?transport=udp', credential: 'blablabla', username: 'blablabla'}]
Is there any pro/cons to filter out the stun url and leave only turn?
Thanks!!
adapter shouldn't need to filter stun: since Edge does that itself. What is the full URL of the twilio stun server?
this is the object:
[ { url: 'stun:global.stun.twilio.com:3478?transport=udp' },
{ url: 'turn:global.turn.twilio.com:3478?transport=udp',
username: 'xxx',
credential: 'xxx' },
{ url: 'turn:global.turn.twilio.com:3478?transport=tcp',
username: 'xxx',
credential: 'xxx' },
{ url: 'turn:global.turn.twilio.com:443?transport=tcp',
username: 'xxx',
credential: 'xxx' } ]
passing this to Edge produce an InvalidAccessError
passing this:
[{ url: 'turn:global.turn.twilio.com:3478?transport=udp',
username: 'xxx',
credential: 'xxx' },
{ url: 'turn:global.turn.twilio.com:3478?transport=tcp',
username: 'xxx',
credential: 'xxx' },
{ url: 'turn:global.turn.twilio.com:443?transport=tcp',
username: 'xxx',
credential: 'xxx' } ]
everything's fine, so maybe Edge isn't doing the filtering
after talking to @shijuns it looks like Edge doesn't filter stun: when ?transport is present. I have a fix in https://github.com/fippo/rtcpeerconnection-shim/pull/14 which should work after the next adapter release.
@markandrus FYI -- somewhat surprised you folks didn't notice that
@fippo thanks for the heads up
I was able to replicate this. Weird bug with edge 15.
Removing ?transport=tcp and ?transport=udp from urls works.
iceServers = _.map(iceServers, function(iceServer){
if(iceServer.urls){
if(typeof iceServer.urls === 'string'){
if(iceServer.urls.indexOf('?transport=tcp') > -1){
iceServer.urls = iceServer.urls.replace('?transport=tcp', '');
} else if(iceServer.urls.indexOf('?transport=udp') > -1){
iceServer.urls = iceServer.urls.replace('?transport=udp', '');
}
}
}
return iceServer;
});
Not sure how MS did not catch this before releasing!
I was having a similar issue, but it 'turns' out that on top of pulling out the tcp and udp transport designations from the turn server URL, our stun server also wasn't able to be parsed by Edge. Our stun URL begins with 'stun:turn..' instead of the usual 'stun:stun..' (I don't know why I didn't construct or configure our stun/turn server). I switched the stun to a public facing url, but have the turn still looking to our private URL, and it works. I don't know if this sensitivity to stun URLs is a known issue as well, but if not it might be useful to some poor hap (like me) before they go off and start desk flipping.
I think is related to #573