3

Pre-data: IF you don't know how to help me, please upvote so that it reaches others and I am helped :D.

This specific error has not yet being asked on stack overflow.

Failed to set remote offer sdp: Called in wrong state: have-local-offer

Here is my sdp log:

(COULD IT BE THIS LOG IS SDP DATA)

I/flutter (25894): HERE IS REMOTE SDP: 
I/flutter (25894): v=0
I/flutter (25894): o=- 8015108886047714172 2 IN IP4 127.0.0.1
I/flutter (25894): s=-
I/flutter (25894): t=0 0
I/flutter (25894): a=extmap-allow-mixed
I/flutter (25894): a=msid-semantic: WMS bbf51472-84b3-4f71-a063-adb02a6e397a
I/flutter (25894): a=group:BUNDLE audio video
I/flutter (25894): m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126
I/flutter (25894): c=IN IP4 0.0.0.0
I/flutter (25894): a=rtpmap:111 opus/48000/2
I/flutter (25894): a=rtpmap:103 ISAC/16000
I/flutter (25894): a=rtpmap:104 ISAC/32000
I/flutter (25894): a=rtpmap:9 G722/8000
I/flutter (25894): a=rtpmap:102 ILBC/8000
I/flutter (25894): a=rtpmap:0 PCMU/8000
I/flutter (25894): a=rtpmap:8 PCMA/8000
I/flutter (25894): a=rtpmap:106 CN/32000
I/flutter (25894): a=rtpmap:105 CN/16000
I/flutter (25894): a=rtpmap:13 CN/8000
I/flutter (25894): a=rtpmap:110 telephone-event/48000
I/flutter (25894): a=rtpmap:112 telephone-event/32000
I/flutter (25894): a=rtpmap:113 telephone-event/16000
I/flutter (25894): a=rtpmap:126 telephone-event/8000
I/flutter (25894): a=fmtp:111 minptime=10;useinbandfec=1
I/flutter (25894): a=rtcp:9 IN IP4 0.0.0.0
I/flutter (25894): a=rtcp-fb:111 transport-cc
I/flutter (25894): a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
I/flutter (25894): a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
I/flutter (25894): a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
I/flutter (25894): a=setup:actpass
I/flutter (25894): a=mid:audio
I/flutter (25894): a=sendrecv
I/flutter (25894): a=ice-ufrag:

Here is my sdp:

{"version":0,"origin":{"username":"-","sessionId":8015108886047714172,"sessionVersion":2,"netType":"IN","ipVer":4,"address":"127.0.0.1"},"name":"-","timing":{"start":0,"stop":0},"groups":[{"type":"BUNDLE","mids":"audio video"}],"extmapAllowMixed":[{"extmap-allow-mixed":"extmap-allow-mixed"}],"msidSemantic":{"semantic":"WMS","token":"bbf51472-84b3-4f71-a063-adb02a6e397a"},"media":[{"rtp":[{"payload":111,"codec":"opus","rate":48000,"encoding":2},{"payload":103,"codec":"ISAC","rate":16000,"encoding":null},{"payload":104,"codec":"ISAC","rate":32000,"encoding":null},{"payload":9,"codec":"G722","rate":8000,"encoding":null},{"payload":102,"codec":"ILBC","rate":8000,"encoding":null},{"payload":0,"codec":"PCMU","rate":8000,"encoding":null},{"payload":8,"codec":"PCMA","rate":8000,"encoding":null},{"payload":106,"codec":"CN","rate":32000,"encoding":null},{"payload":105,"codec":"CN","rate":16000,"encoding":null},{"payload":13,"codec":"CN","rate":8000,"encoding":null},{"payload":110,"codec...

Here is THE ERROR:

D/FlutterWebRTCPlugin(25894): peerConnectionSetRemoteDescription(): WEBRTC_SET_REMOTE_DESCRIPTION_ERROR: Failed to set remote offer sdp: Called in wrong state: have-local-offer
D/EGL_emulation(25894): app_time_stats: avg=88.63ms min=42.10ms max=150.20ms count=12
I/flutter (25894): FormatException: Unexpected end of input (at character 1)
I/flutter (25894): 
I/flutter (25894): ^
E/flutter (25894): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Unable to RTCPeerConnection::setRemoteDescription: peerConnectionSetRemoteDescription(): WEBRTC_SET_REMOTE_DESCRIPTION_ERROR: Failed to set remote offer sdp: Called in wrong state: have-local-offer

Post-data: IF you don't know how to help me, please upvote so that it reaches others and I am helped :D.

Xavi Font
  • 296
  • 4
  • 19

1 Answers1

1

This is impossible to answer completely without seeing the code, knowing what you are trying to do/use

however

The error suggests the flow of the peers exchanging offers is wrong - in this case it seems the caller (who has local offer) is trying to set a remote offer on itself.

I'd check the docs and your code this page also is a good starting point for webrtc more generally: https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Connectivity

cpri
  • 421
  • 4
  • 12