Installation Issues
Go Modules Not Enabled
Symptom: Import errors orcannot find package errors
Solution:
Version Conflicts
Symptom: Dependency resolution errors or incompatible versions Solution:Build Failures
Symptom: Compilation errors after installation Solution:-
Ensure you’re using Go 1.24.0 or later:
-
Verify import paths include the version:
-
Clear build cache:
Connection Issues
ICE Connection Fails
Symptom: PeerConnection stays in “checking” or “failed” stateCheck #1: Network Configuration
Check #1: Network Configuration
Verify your ICE servers are configured:
Check #2: Firewall & NAT
Check #2: Firewall & NAT
Common issues:
- Firewall blocking UDP traffic
- Symmetric NAT requiring TURN
- Corporate network restrictions
Check #3: Port Availability
Check #3: Port Availability
Verify ports are not blocked:
Check #4: ICE Candidates
Check #4: ICE Candidates
Monitor ICE candidate gathering:If no candidates are gathered, check network interfaces.
Connection Timeouts
Symptom: Connection takes too long or times out Solutions:-
Implement Trickle ICE:
-
Set Timeout Values:
Signaling Issues
Symptom: Offer/Answer exchange failsSignaling is not part of the WebRTC specification and must be implemented separately.
-
Not waiting for gathering:
-
Setting remote description before local:
Media Issues
No Audio/Video Received
Symptom: Connection established but no media flowsTrack Handler Not Set
Track Handler Not Set
Ensure OnTrack handler is registered:
Codec Mismatch
Codec Mismatch
Verify both peers support the same codecs:
Track Not Added
Track Not Added
Ensure tracks are properly added:
Poor Video Quality
Symptom: Choppy video, artifacts, or low frame rate Solutions:-
Check Bandwidth:
-
Adjust Bitrate:
-
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:- Ensure both peers create or handle the data channel
- Wait for connection to be established
- Check for errors
Message Send Failures
Symptom: SendText or Send returns an error Common Causes:-
Channel not open:
-
Buffer overflow:
-
Message too large:
Performance Issues
High CPU Usage
Symptom: Excessive CPU consumption Solutions:-
Profile your application:
Then visit: http://localhost:6060/debug/pprof/
-
Optimize packet processing:
-
Reduce logging:
Memory Leaks
Symptom: Growing memory usage over time Common Causes:-
Not closing PeerConnections:
-
Goroutine leaks:
-
Track reader not stopping:
High Memory Usage
Solutions:-
Pool buffers:
-
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:-
Use host networking:
-
Or properly map ports:
-
Set NAT 1:1 mapping:
WebAssembly Issues
Symptom: WASM build or runtime errors Solution:-
Use correct build command:
-
Include wasm_exec.js:
-
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.)