simple-peer icon indicating copy to clipboard operation
simple-peer copied to clipboard

Remote sdp error

Open Applicafroguy opened this issue 8 years ago • 3 comments

when calling peer.signal i get this error. error DOMException: Failed to set remote offer sdp: Called in wrong state: kHaveLocalOffer

Applicafroguy avatar Oct 14 '18 06:10 Applicafroguy

Just by the looks of it: the peer you're calling signal on seems to have it's offer ready, but could not yet send it.

peer.signal is the input, but did you try peer.on("signal") (output) yet?

lroellin avatar Oct 14 '18 07:10 lroellin

You're trying to pass a remote offer into peer.signal() of a peer that has a local offer - you should be passing an answer. It's possible that both peers are initiators, or you're passing the peer's signal data into itself. Double check your signalling flow.

t-mullen avatar Oct 14 '18 17:10 t-mullen

Thank you, @lroellin @t-mullen my issue was with the initiator, I was setting it to true on every peer, so I did not have a receiver and after Double checking my signal flow, everything worked fine.

Applicafroguy avatar Oct 15 '18 02:10 Applicafroguy