Skip to content

[camera_windows] Fallback to temp dir when Pictures / Videos known folder cannot be resolved. #192302

Closed

Description

@llfbandit

Steps to reproduce

  • Activate Windows security ransomware protection.
  • Deliberately protect C:\Users\<current_profile>\Pictures folder.
  • Try to take picture from camera.

Expected results

The picture should be saved anyway in temp folder.

Actual results

Exception:
FlutterError("system_error", "Failed to get capture path for picture")

Code sample

Code sample
CameraController.takePicture();

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.47.2, on Microsoft Windows [version 10.0.26200.9168], locale fr-FR) [319ms]
    • Flutter version 3.47.2 on channel stable at D:\dev\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d3b14c8769 (9 days ago), 2026-08-26 16:07:51 -0700
    • Engine revision a804b26164
    • Dart version 3.13.2
    • DevTools version 2.60.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android,
      enable-ios, cli-animations, enable-native-assets, enable-record-use, enable-swift-package-manager,
      omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration

[✓] Windows Version (Windows 11 or higher, 25H2, 2009) [561ms]

[!] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [349ms]
    • Android SDK at C:\Users\foo\AppData\Local\Android\sdk
    • Emulator version 37.1.11.0 (build_id 15917651) (CL:N/A)
    • Platform android-37.0, build-tools 36.0.0
    ! Multiple adb binaries found. This can cause conflicts and device detection issues:
        - C:\Users\foo\AppData\Local\Android\Sdk\platform-tools\adb.exe
        - C:\Program Files\platform-tools\adb.exe
    • Java binary at: D:\dev\java\jdk17\bin\java
      This JDK is specified in your Flutter configuration.
      To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment Temurin-17.0.15+6 (build 17.0.15+6)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/windows-android-setup for more details.

[✗] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe) [71ms]
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.14.39 (August 2026)) [70ms]
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.14.37614.0
    • Windows 10 SDK version 10.0.26100.0

[✓] Connected device (2 available) [281ms]
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [version 10.0.26200.9168]
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 152.0.4191.53

[✓] Network resources [309ms]
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Activity

  1. added
    platform-windowsBuilding on or for Windows specifically
    packageflutter/packages repository. See also p: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    fyi-ecosystemFor the attention of Ecosystem team
    team-windowsOwned by the Windows platform team
    on Sep 6, 2026
  2. mbcorona commented on Sep 6, 2026

    @mbcorona
    Member

    Hi @llfbandit, thanks for the clear repro. PR #12755 noted. Routing to the Windows team for evaluation.

  3. added
    P3Issues that are less important to the Flutter project
    triaged-windowsTriaged by the Windows platform team
    on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecthas reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.platform-windowsBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform teamtriaged-windowsTriaged by the Windows platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions