title: Diagnosing WebRTC ICE Failures
body: <p>For the last three years, whenever I use WebRTC, somewhere or other I will be dogged by the following error:</p>
  
  <pre><code>ICE Failed, see about:webrtc for more details
  </code></pre>
  
  <p>The error seems to have pop up in a variety of places: If the network is turned off for either peer, causing a failure of WebRTC (this is to be expected); If an answer or offer SDP is created too soon after receiving one; And, seemingly, at random times during signalling for no particular reason.</p>
  
  <p>Whenever this occurs and I can't explain it, I'll head over to about:webrtc and try to find my way through the errors, but since I don't have an idea of what I'm looking for (and there is no "ICE failed because of this thing"), I can never quite figure out what's wrong. As a result, I'm usually doomed to hit-and-miss testing my code.</p>
  
  <p>Obviously, this isn't the best way of doing it. So, my question is, <strong>how do I go about diagnosing <code>ICE Failed</code> errors in WebRTC?</strong> What should I look for in <code>about:webrtc</code>, what are common errors in my code that could cause this, and are there any diagnostic tools I should know about?</p>