WebRTC failures are easier to fix when connection setup, network paths, and media quality are investigated separately. This guide provides a repeatable troubleshooting process for ICE connection failures, STUN and TURN issues, one-way audio, and degraded video, including the browser checks, statistics, logs, and review cadence that help engineers move from symptoms to causes.
Overview
A WebRTC session can fail at several distinct stages: signaling, permission and device access, ICE negotiation, transport establishment, or media delivery. Treating every problem as a generic “WebRTC issue” often leads to unnecessary configuration changes. Start by identifying the first failed stage.
- Signaling: The peers do not exchange offers, answers, or ICE candidates correctly.
- ICE negotiation: The peers exchange candidates but cannot select a usable network path.
- Transport: A connection is selected, but packets are blocked, unstable, or routed incorrectly.
- Media: Audio or video is not being captured, sent, received, decoded, or rendered as expected.
- Application behavior: An SDK, permission flow, renegotiation step, or device policy changes the session after it connects.
This separation is especially useful when operating a WebRTC platform or real-time communication API across different networks. A call that works on a home connection but fails in a corporate office usually points toward network policy, NAT behavior, or TURN availability rather than a camera or codec problem. A call that connects with clear audio but has frozen video should be investigated through media statistics instead of ICE configuration first.
For broader architecture decisions, compare this diagnostic process with the trade-offs described in WebRTC architecture for group calls. A mesh, SFU, or MCU design changes where bandwidth, forwarding, and media quality problems appear.
What to track
Use symptoms to narrow the search
| Observed symptom | Likely areas to investigate | First useful check |
|---|---|---|
| ICE connection failed | Signaling, candidate exchange, NAT, firewall rules, or TURN | Compare local and remote candidate counts, then verify the selected or attempted candidate pair |
| Call works on one network but not another | Corporate firewall, restrictive NAT, blocked UDP, or unavailable relay path | Repeat the test with a known-good network and confirm that relay candidates are offered |
| One-way audio | Track direction, muted state, codec negotiation, routing, or asymmetric packet loss | Check sender and receiver tracks, inbound packet counters, and the selected candidate pair |
| No video but audio works | Camera permission, capture device, video track state, codec negotiation, or decoder failure | Confirm that frames are being sent and received, not just that a video track exists |
| Video is blurry or frequently changes resolution | Available bandwidth, congestion control, CPU limits, encoder settings, or SFU policy | Review bitrate, frame rate, resolution, packet loss, round-trip time, and quality-limitation indicators |
| Audio is robotic or intermittent | Jitter, packet loss, CPU contention, device switching, or unstable connectivity | Compare jitter and concealed or lost samples with the incident timeline |
Capture browser and application evidence
Before changing settings, record the browser version, operating system, device type, SDK version, application build, user network type, approximate location, call role, and session identifier. These fields allow engineers to determine whether the problem is isolated to one client, one release, one region, or one network class.
Use the browser’s developer tools to confirm that signaling requests succeed and that WebSocket or HTTP responses contain the expected session identifiers, SDP, and ICE information. Browser-specific WebRTC diagnostic pages may also expose connection events and statistics. The exact interface varies, so treat the browser’s exported statistics as the primary evidence rather than relying on screenshots from a single diagnostic page.
Collect both application logs and periodic RTCPeerConnection.getStats() samples when possible. Useful fields commonly include iceConnectionState, connectionState, selected candidate-pair details, candidate types, currentRoundTripTime or roundTripTime, packets sent and received, packets lost, jitter, bytes sent and received, frames encoded, frames decoded, frames dropped, frame width and height, and quality-limitation information. Statistics names and availability differ by browser and SDK, so log the raw report alongside normalized fields.
Verify ICE, STUN, and TURN
STUN helps a peer discover a server-reflexive address. TURN provides a relay path when direct connectivity is not possible. Neither service replaces signaling: the peers still need to exchange the candidates and session descriptions produced during negotiation.
- Confirm that the client receives the intended ICE server configuration at session creation.
- Check that STUN and TURN hostnames resolve from the affected network.
- Verify that TURN credentials are valid, unexpired, and associated with the correct session or tenant.
- Inspect gathered candidates and note whether host, server-reflexive, and relay candidates appear as expected.
- Confirm that trickle ICE candidates are sent, received, and applied rather than logged only on the originating peer.
- Check the selected candidate pair after connection. A relay candidate is not automatically a failure; it may be the expected path on a restrictive network.
- Test with a controlled configuration that prefers or requires relay traffic, where your platform supports this safely. This helps distinguish direct-path failure from TURN failure.
If relay testing fails, inspect the TURN service’s allocation logs, authentication responses, transport options, and capacity. Avoid assuming that a successful DNS lookup proves that media can use the relay. The relevant question is whether the client can allocate a relay and exchange media through it from the affected network.
Cadence and checkpoints
WebRTC troubleshooting is most effective when diagnostics are maintained before an incident rather than assembled during one. Establish a baseline for successful calls and review it on a monthly or quarterly cadence, depending on release frequency and call volume.
At each application release
- Run a one-to-one call test with audio and video in supported browsers.
- Test at least one restrictive or managed network, not only an open development network.
- Verify permission prompts, device switching, mute and unmute behavior, screen sharing if applicable, and reconnection.
- Confirm that the SDK still exposes the statistics and events used by monitoring.
- Record whether the release changed codecs, SDP handling, ICE server configuration, or media constraints.
Monthly or quarterly infrastructure review
- Check TURN allocation success and failure logs, credential errors, and regional availability.
- Compare connection success by browser, operating system, network type, and application version.
- Review the proportion of direct, server-reflexive, and relay connections.
- Examine recurring packet loss, jitter, round-trip time, frame drops, and bitrate changes.
- Validate alert thresholds against real incidents instead of treating every transient fluctuation as an outage.
Keep a small controlled test matrix. It should include a known-good pair, a restrictive network, a mobile or changing network where relevant, and the browsers and SDK versions that represent your supported audience. The goal is not to reproduce every possible network; it is to detect meaningful changes in the paths your users depend on.
How to interpret changes
Compare events and statistics over time rather than reading a single metric in isolation. A high round-trip time may explain delayed interaction, but it does not by itself prove that the media path is unusable. Packet loss, jitter, bitrate, frame rate, and application events provide the surrounding context.
For an ICE connection failed incident, determine whether candidates were gathered, exchanged, checked, and selected. If no relay candidate appears, inspect configuration and TURN authentication. If relay candidates appear but cannot connect, investigate relay reachability and service logs. If a candidate pair connects and then fails, examine network changes, consent or connectivity checks, and whether the failure affects many users on the same network.
For one-way audio, verify directionality at both ends. The sender may have a live local track while the receiver has no inbound packets. Conversely, packets may arrive but fail to play because the remote track is not attached, the element is muted, the output device changed, or the application state is stale. This distinction prevents teams from repeatedly modifying ICE settings when the problem is in track handling or rendering.
For poor video, separate capture, encoding, transport, decoding, and rendering. A camera can produce frames that are never encoded; encoded frames can be sent while packets are lost; packets can arrive while frames are dropped under CPU pressure. A useful incident timeline marks when the resolution, frame rate, bitrate, candidate pair, network interface, and device state changed.
Use this compact collection template for support tickets or automated diagnostics:
{
"sessionId": "redacted-session-id",
"timestamp": "ISO-8601 timestamp",
"client": {
"browser": "name and version",
"os": "platform",
"sdkVersion": "version",
"appVersion": "version"
},
"network": {
"type": "wifi, wired, cellular, or unknown",
"candidateTypes": ["host", "srflx", "relay"],
"selectedPair": "redacted candidate pair"
},
"state": {
"signaling": "connected or failed",
"iceConnectionState": "new, checking, connected, completed, failed, or closed",
"connectionState": "current state"
},
"media": {
"audio": "sent, received, muted, or unavailable",
"video": "sent, received, muted, or unavailable",
"packetsLost": "value and direction",
"jitter": "value and unit",
"roundTripTime": "value and unit",
"framesDropped": "value if available"
},
"recentChanges": ["release, network change, device switch, or permission event"]
}
Redact addresses, tokens, user identifiers, and other sensitive values before sharing logs. For authentication and access-control considerations, see the video API authentication guide.
When to revisit
Revisit this troubleshooting guide whenever a browser or SDK changes its diagnostics, when your ICE server policy changes, or when a new network segment, region, media server, or security control is introduced. It should also be part of the response process for recurring incidents, especially when users report failures that do not reproduce on development networks.
At minimum, schedule a monthly or quarterly review of the test matrix and the fields collected in production. Update the checklist when a statistics name changes, a previously available browser signal disappears, a TURN transport option is added or removed, or your application changes its signaling and renegotiation behavior. Keep one successful baseline and one representative failure case so that future engineers can compare evidence quickly.
For the next incident, use this order: identify the failed stage, capture the session and browser context, inspect signaling, verify ICE candidates and the selected pair, test TURN independently, then trace media statistics from capture through rendering. Record the confirmed cause and the evidence that supported it. That practice turns WebRTC troubleshooting from trial-and-error configuration work into a repeatable engineering workflow.