-
-
Notifications
You must be signed in to change notification settings - Fork 972
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
InvalidStateError: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': The RTCPeerConnection's signalingState is 'closed' #426
Comments
Looks like the peer has been destroyed before you call import wrtc from 'wrtc';
const peer = new SimplePeer({
wrtc,
initiator:false,
trickle:true,
channelConfig:{
ordered:false,
maxRetransmits:0
},
config:{
"iceServers":[{"url":"stun:0.0.0.0:3478"},{"url":"turn:0.0.0.0:3478"}]}
});
peer.on('error', err => console.error(err)) // <---
peer.signal(signalPayload); |
Only gets called with the aforementioned
|
|
Looks like you are passing the old, nonstandard |
@markandrus are you talking about the
I don't see any other |
@kevzettler yes, it should be urls: https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer |
@nazar-pc @markandrus Thank you! That was the issue. Was using Closing issue. Not sure if there is any action item from simple peer but maybe feel free to add a guard, it would have helped me. |
Thanks for that. I was figuring out the error for so long!!! What a relief. |
This throws when trying to execute:
Where signalPayload is
Not sure if this is a
simple-peer
config issue or if this is an issue int he Node.jswrtc
module.The text was updated successfully, but these errors were encountered: