Peer stuck at renegotiation
See original GitHub issueI’m testing different configurations of the MediaStreamConstraints
object to represent most common types of calls and I have encountered a problem, these are my tests cases:
- Initiator (User A) initiates an audio/video call to the other peer (User B) which answers with both audio and video (Connection established properly)
- Initiator (User A) initiates an audio/video call to the other peer (User B) which answers with audio only (Connection established properly)
- Initiator (User A) initiates an audio call to the other peer (User B) which answers with audio only (Connection established properly)
- Initiator (User A) initiates an audio call to the other peer (User B) which answers with both audio and video (Connection NOT established)
In depth configs
User A (call initiator):
- MediaStreamConstraints object:
{ audio: true, video: false }
- SimplePeer options:
{ initiator: true, trickle: true, stream: MediaStream
*}
User B (call receiver):
- MediaStreamConstraints object:
{ audio: true, video: true }
- SimplePeer options:
{ initiator: false, trickle: true, stream: MediaStream
*}
*MediaStream
object is coming from navigator.mediaDevices.getUserMedia(MediaStreamConstraints)
simple-peer logs
User A (call initiator):
simple-peer 2018-11-01T11:53:03.657Z [0023854] new peer {initiator: true, trickle: true, stream: MediaStream} +0ms
simple-peer 2018-11-01T11:53:03.661Z [0023854] addStream() +4ms
simple-peer 2018-11-01T11:53:03.662Z [0023854] addTrack() +1ms
simple-peer 2018-11-01T11:53:03.662Z [0023854] _needsNegotiation +0ms
simple-peer 2018-11-01T11:53:03.662Z [0023854] _needsNegotiation +0ms
simple-peer 2018-11-01T11:53:03.665Z [0023854] starting batched negotiation +3ms
simple-peer 2018-11-01T11:53:03.666Z [0023854] start negotiation +1ms
simple-peer 2018-11-01T11:53:03.671Z [0023854] signalingStateChange have-local-offer +5ms
simple-peer 2018-11-01T11:53:03.671Z [0023854] createOffer success +0ms
simple-peer 2018-11-01T11:53:03.672Z [0023854] signal +1ms
simple-peer 2018-11-01T11:53:03.672Z [0023854] iceStateChange (connection: new) (gathering: gathering) +0ms
simple-peer 2018-11-01T11:53:03.775Z [0023854] iceStateChange (connection: new) (gathering: complete) +103ms
simple-peer 2018-11-01T11:53:04.080Z [0023854] signal() +305ms
simple-peer 2018-11-01T11:53:04.080Z [0023854] got request to renegotiate +0ms
simple-peer 2018-11-01T11:53:04.080Z [0023854] _needsNegotiation +0ms
simple-peer 2018-11-01T11:53:04.083Z [0023854] starting batched negotiation +3ms
simple-peer 2018-11-01T11:53:04.083Z [0023854] already negotiating, queueing +0ms
User B (call receiver):
simple-peer 2018-11-01T11:53:04.000Z [2e33650] new peer {initiator: false, trickle: true, stream: MediaStream} +0ms
simple-peer 2018-11-01T11:53:04.003Z [2e33650] addStream() +3ms
simple-peer 2018-11-01T11:53:04.004Z [2e33650] addTrack() +1ms
simple-peer 2018-11-01T11:53:04.005Z [2e33650] _needsNegotiation +1ms
simple-peer 2018-11-01T11:53:04.005Z [2e33650] addTrack() +0ms
simple-peer 2018-11-01T11:53:04.007Z [2e33650] _needsNegotiation +2ms
simple-peer 2018-11-01T11:53:04.009Z [2e33650] starting batched negotiation +2ms
simple-peer 2018-11-01T11:53:04.010Z [2e33650] requesting negotiation from initiator +1ms
Is it possible that the problem lies in negotiation queueing? P.S. I waited for 10 minutes after the last log message and nothing happened
Issue Analytics
- State:
- Created 5 years ago
- Comments:15
Top Results From Across the Web
mitmproxy hangs on TLS renegotiation: a debugging story
It seems like mitmproxy does not support server-side initiated TLS renegotiation. Looking at its source code, it seems like everything after ...
Read more >WebRTC: simultaneous renegotiation issue - Stack Overflow
If I am changing mode of only one peer at a time, it works smoothly. but when, message comes from server, both peers...
Read more >ipsec vpn with racoon drops traffic on phase 1 renegotiation
So it seems that the phase 1 renegotiation takes at least 12 minutes. Does anyone know why this might be and what we...
Read more >Troubleshoot VPN tunnel inactivity or instability issues - AWS
If a VPN peer doesn't respond to three successive DPDs, then the peer is considered dead and the tunnel is closed. If your...
Read more >Troubleshooting Non-Meraki Site-to-site VPN
Error Solution: Confirm the IKE version being used on the remote peer is compatible with the MX appliance. If the MX the remote...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Good to hear you’ve figured it out.
Typescript types should probably be provided to “Definitely Typed”.
If an non-initiator provides a type of media track that the initiator does not (eg initiator provides audio, non-initiator provides audio+video), then you need to explicitly specify SDP constraints.
This is due to a browser bug we aren’t able to fix in simple-peer. See #95