Skip to main content

Installation Issues

Go Modules Not Enabled

Go Modules are mandatory for using Pion WebRTC.
Symptom: Import errors or cannot find package errors Solution:

Version Conflicts

Symptom: Dependency resolution errors or incompatible versions Solution:

Build Failures

Symptom: Compilation errors after installation Solution:
  1. Ensure you’re using Go 1.24.0 or later:
  2. Verify import paths include the version:
  3. Clear build cache:

Connection Issues

ICE Connection Fails

Symptom: PeerConnection stays in “checking” or “failed” state
Verify your ICE servers are configured:
Common issues:
  • Firewall blocking UDP traffic
  • Symmetric NAT requiring TURN
  • Corporate network restrictions
Solution: Add TURN server
Verify ports are not blocked:
Monitor ICE candidate gathering:
If no candidates are gathered, check network interfaces.

Connection Timeouts

Symptom: Connection takes too long or times out Solutions:
  1. Implement Trickle ICE:
  2. Set Timeout Values:

Signaling Issues

Symptom: Offer/Answer exchange fails
Signaling is not part of the WebRTC specification and must be implemented separately.
Common Mistakes:
  1. Not waiting for gathering:
  2. Setting remote description before local:

Media Issues

No Audio/Video Received

Symptom: Connection established but no media flows
Ensure OnTrack handler is registered:
OnTrack must be set BEFORE creating the answer or setting remote description.
Verify both peers support the same codecs:
Ensure tracks are properly added:

Poor Video Quality

Symptom: Choppy video, artifacts, or low frame rate Solutions:
  1. Check Bandwidth:
  2. Adjust Bitrate:
  3. Enable NACK/FEC:

Audio/Video Out of Sync

Symptom: Audio and video timestamps don’t match Solution: Ensure proper timestamp handling:

Data Channel Issues

Data Channel Not Opening

Symptom: OnOpen callback never fires Checklist:
  1. Ensure both peers create or handle the data channel
  2. Wait for connection to be established
  3. Check for errors

Message Send Failures

Symptom: SendText or Send returns an error Common Causes:
  1. Channel not open:
  2. Buffer overflow:
  3. Message too large:

Performance Issues

High CPU Usage

Symptom: Excessive CPU consumption Solutions:
  1. Profile your application:
    Then visit: http://localhost:6060/debug/pprof/
  2. Optimize packet processing:
  3. Reduce logging:

Memory Leaks

Symptom: Growing memory usage over time Common Causes:
  1. Not closing PeerConnections:
  2. Goroutine leaks:
  3. Track reader not stopping:

High Memory Usage

Solutions:
  1. Pool buffers:
  2. Limit concurrent connections:

Debugging Tips

Enable Debug Logging

Monitor Connection State

Use Wireshark

Capture and analyze WebRTC traffic:

Check Statistics

Platform-Specific Issues

Docker Networking

Symptom: Connections fail in Docker containers Solution:
  1. Use host networking:
  2. Or properly map ports:
  3. Set NAT 1:1 mapping:

WebAssembly Issues

Symptom: WASM build or runtime errors Solution:
  1. Use correct build command:
  2. Include wasm_exec.js:
  3. Serve with proper MIME type:

Getting More Help

Community Support

Ask questions in Discord

FAQ

Check frequently asked questions

GitHub Issues

Report bugs or request features

Examples

Study working examples
When asking for help, include:
  • Go version (go version)
  • Pion version (go list -m github.com/pion/webrtc/v4)
  • Minimal reproducible example
  • Relevant logs and error messages
  • Network topology (NAT, firewall, etc.)