Browser Permissions & WebRTC Diagnostics
How to Fix "MediaDevices.getUserMedia" Error in Google Chrome
The getUserMedia API fails for one of a handful of specific, well-defined reasons rather than randomly: the page isn't served over HTTPS, permission was denied, no matching device exists, or the device is already in use elsewhere. The exact error name your browser reports tells you precisely which of these applies, rather than leaving you guessing.
Why Does the `getUserMedia` WebRTC API Fail?
getUserMedia is the standard web API every browser uses to request camera and microphone access, and it's deliberately designed to fail with a specific, named error rather than a generic, unhelpful message — the error name itself is genuinely diagnostic information, not just a technical label.
The most common: NotAllowedError means the user (or a previous saved decision) explicitly denied permission. NotFoundError means no camera matching the request exists on the system at all. NotReadableError means a camera was found but the OS wouldn't hand it over, almost always because another application already holds it. OverconstrainedError means the requesting page asked for very specific settings — an exact resolution or frame rate — that no available camera can actually satisfy.
Beyond permission-related errors, getUserMedia also refuses to run at all on a page served over plain HTTP rather than HTTPS (with an exception for localhost during development), since camera access without a secure connection is considered an unacceptable privacy risk by every modern browser.
Solutions for `getUserMedia` Chrome Errors
Step 1: Check the address bar for a genuine HTTPS connection
(a padlock icon, not just "https" in the URL, which could still be a mixed-content warning). If it's plain HTTP, this is the site's problem to fix, not something you can resolve as a visitor.
Step 2: If the error is NotAllowedError, check and reset the site's camera permission
Via the padlock icon in the address bar.
Step 3: If the error is NotFoundError, confirm a camera is actually connected
And recognized by your OS, using your system's own device manager or settings.
Step 4: If the error is NotReadableError, close other apps that might be using the camera
Including background processes and other browser tabs.
Step 5: If the error is OverconstrainedError, the site is asking for settings your camera can't provide
— this is a site-side bug to report, not something fixable from your end, since your hardware genuinely doesn't support what was requested.
Open your browser's developer console (F12, then the Console tab) to see the exact error name if a site doesn't display it directly — this is the single fastest way to know exactly which of these five scenarios you're actually dealing with. ↑ Test with the widget above once resolved.
A Note for Developers Testing Their Own Site
If you're building or testing a site yourself rather than troubleshooting as a visitor, the browser's developer console is your most direct source of truth — the exact error name and an accompanying message are always logged there, even when the site's own user-facing error handling is vague or missing entirely. Wrapping your own getUserMedia calls in a try/catch block that logs error.name specifically, rather than a generic caught-error message, saves significant guesswork for both you and anyone helping you debug a report from a user.
It's also worth remembering that localhost is treated as a secure context even without HTTPS specifically to support local development — if your getUserMedia calls work fine on localhost but fail once deployed, an HTTPS misconfiguration on the live server is the first thing to check, not your JavaScript code itself.
A Few More Things to Check on Windows
How do I reset the Windows Camera app itself?
Go to Settings → Apps → Installed apps, find Camera, open its three-dot menu, and choose Advanced options → Reset. This clears the built-in Camera app’s own cache and settings without uninstalling it, which can fix a stuck, frozen, or permanently black preview even when the underlying device and driver are both working correctly. It only resets that one app — not your camera driver, and not other applications that use the camera.
Could my antivirus be silently blocking my camera?
Many third-party security suites — Bitdefender, Kaspersky, Norton, and ESET among others — include their own webcam-protection feature that runs independently of Windows’ own privacy settings. That means Windows can show camera access as fully permitted while the antivirus software blocks it anyway, at a layer Windows has no visibility into. Check the antivirus program’s own settings, usually under a Privacy, Webcam Protection, or similarly named section, and confirm your browser or conferencing app is on its allow-list.
How do I re-enable my camera in Device Manager if it's disabled?
Right-click the Start button → Device Manager, expand Cameras or Imaging devices, and look for a greyed-out icon or a small down-arrow badge. Right-click that entry and choose Enable device. This is a different action from updating a driver — a disabled device won’t respond to any other fix until it’s explicitly re-enabled here first, so it’s worth checking before assuming the problem is a driver or a permission.
Is Windows' own camera privacy toggle blocking access, separately from anything else?
Windows keeps a system-level camera permission at Settings → Privacy & security → Camera, completely separate from Device Manager, the Camera app, and any antivirus software. This one screen has a master Camera access switch plus a per-app list beneath it — both need to be on. It’s worth checking directly, since a camera can show as fully enabled and working in Device Manager while this toggle silently blocks every app from reaching it.
For a full check of resolution, frame rate, and audio together, not just this one issue, the free webcam test covers all of it in one place.