Reputation: 170
I stumbled upon the following errors while debugging my WebRTC app and I cannot figure out what they mean:
Uncaught (in promise) Failed to set remote answer sdp: Called in wrong state: STATE_INPROGRESS
and
Uncaught (in promise) Failed to set remote answer sdp: Called in wrong state: STATE_INIT
Which state is it that's supposed to be wrong?
Upvotes: 3
Views: 1097
Reputation: 25044
I believe you are getting this error because you are trying to set the SDP answer in the wrong state. Take a look at this document. It should clarify things for you. State diagram (taken from that document):
Upvotes: 2