WebRTC Debug Playbook

Practical diagnostics for ICE failures, TURN fallback, and quality issues.

created read 1 min read topic programming/webrtc tags #webrtc#debug#coturn#pion#tailscale

WebRTC Debug Playbook

Browser-Side Checks

  • Inspect iceGatheringState, iceConnectionState, connectionState.
  • Confirm candidates include expected types (host/srflx/relay).
  • Validate end-of-candidates events and renegotiation behavior.

TURN Validation

  • Use Trickle ICE sample page to test STUN/TURN config quickly.
  • Verify coturn auth mode, realm, and relay port ranges.

Runtime Observability

  • Capture periodic getStats snapshots: RTT, jitter, packetsLost, bitrate, frame drop.
  • Build threshold-based alerts for degraded sessions.

Tailscale-Like Network Diagnostics

  • Check whether route is direct or relay.
  • Confirm NAT properties before deep protocol debugging.

References