title: Why is getUserMedia throwing a [object NavigatorUserMediaError] when I click "Allow" in Chrome?
body: <p>Recently, I started getting errors when trying to access the client's mic through my website. When Chrome asks whether to allow the site to access the user's microphone, <code>[object NavigatorUserMediaError]</code> is produced whether they click "allow" or "deny." This has been happening regardless of whether or not a microphone is actually plugged into the computer (which is running Ubuntu 12.04).</p>
  
  <p>Further testing through Firefox showed that this is not specific to Chrome. The problem only started after I had done a live-input demo and then logged out of the computer. I tried making a bare bones demo of accessing the microphone, and it ran into the same problem.</p>
  
  <pre><code>var getVideo = false, getAudio = true;
  
  navigator.getUserMedia || (navigator.getUserMedia = navigator.mozGetUserMedia ||
          navigator.webkitGetUserMedia || navigator.msGetUserMedia);
  
  function init() {
      if(navigator.getUserMedia) {
          navigator.getUserMedia({video:getVideo, audio:getAudio}, onSuccess, onError);
      } else {
          alert('getUserMedia failed.');
      }
  }
  
  function onSuccess() {
      console.log("Yay");
  }
  
  function onError(err) {
      console.log("Noo " + err);
  }
  </code></pre>
  
  <p>This is rather puzzling as it had worked perfectly up until the point where I logged out and then logged back in and tried to test it again.</p>
  
  <p>I am hosting the web code locally, through Jetty and Eclipse. I am accessing it by typing <code>localhost:8080/my-program</code> into the web browser.</p>
  
  <p>Edit:
  After the error occurs, the icon of a camera shows up in the chrome address bar, saying that Chrome is accessing my microphone and listing two possible microphones, "Default" and "Built-in Audio Analog Stereo."</p>
  
  <p>Edit 2:
  This error is also occurring on other websites that try to access my microphone through webrtc. Traditional Flash implementation still works.</p>
  
  <p>Chrome seems to be throwing out an error message at regular intervals while open.</p>
  
  <pre><code>[361:362:0725/095320:ERROR:audio_output_device.cc(186)] 
  Not implemented reached in virtual void
  media::AudioOutputDevice::OnStateChanged(media::AudioOutputIPCDelegate::State)
  </code></pre>
  
  <p>Edit 3:
  I was able to clarify the error message a bit more</p>
  
  <pre><code>NavigatorUserMediaError {code: 1, PERMISSION_DENIED: 1}
  </code></pre>