Repository navigation
Description
Steps to reproduce
- Windows 10 with a working webcam and OBS Studio installed (it registers a DirectShow filter
OBS Virtual Camera). Do not start OBS or its virtual camera. Any other camera that is listed by the browser but cannot be opened behaves the same way. - Create an app that depends on
camera: ^0.11.0+2and run it in Chrome (flutter run -d chrome). - Call
availableCameras()and grant the camera permission.
Expected results
availableCameras() returns the cameras that can be used (here: the integrated webcam). A device that cannot be opened is skipped.
Actual results
availableCameras() throws CameraException(cameraNotReadable, The camera is not readable due to a hardware error that prevented access to the device.). No camera is returned, although the integrated webcam works.
Cause
In camera_web availableCameras() calls getUserMedia({video: {deviceId: {exact: id}}}) for every video input device (_getVideoStreamForDevice, in the for (final videoInputDevice in videoInputDevices) loop). The only try/catch surrounds the whole method. In Chrome the OBS Virtual Camera device rejects with NotReadableError: Could not start video source. This becomes a CameraWebException that exits the loop, so one unreadable device hides all the others.
The structure is the same in every version I checked (0.3.1+3, 0.3.1+4, 0.3.2+3, 0.3.3, 0.3.4, 0.3.5, 0.3.5+6).
A page with plain navigator.mediaDevices.getUserMedia confirms it, without Flutter:
getUserMedia({video: true})succeeds (Integrated Webcam);getUserMedia({video: {deviceId: {exact: <integrated webcam id>}}})succeeds;getUserMedia({video: {deviceId: {exact: <OBS Virtual Camera id>}}})fails withNotReadableError: Could not start video source.
Suggested fix
Handle a failure per device inside the loop and continue with the next device; throw only when no device could be opened (or return an empty list).
Environment
camera_web0.3.5+6 viacamera0.11.x, Flutter 3.44.9 (stable), Windows 10, Chrome 154.0.8037.98.
Activity
puneetkukreja98 commentedon Oct 12, 2026
@Anfet Thanks for reporting it, I was able to reproduce it, after installing OBS studio from Microsoft store.
camera: ^0.12.1Sample code:
Screen-shot:
flutter doctor -v:
puneetkukreja98 commentedon Oct 12, 2026
Similar issues:
#97016
#109453
[camera_web] Skip video input devices that cannot be started in avail…
github-actions commentedon Nov 10, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.