Repository navigation
Closed
flutter/packages
#12582Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolefound in release: 3.22Found to occur in 3.22Found to occur in 3.22has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
Steps to reproduce
- Create a new flutter project and paste in the code from https://github.com/flutter/packages/blob/main/packages/camera/camera/example/lib/main.dart
- Add camera, video_player, and permission_handler dependencies in pubspec.
- Add CAMERA permission to AndroidManifest.xml.
- Run the app in debug mode
- Accept the permission
- Tap on Exposure mode and slide the slider
- The error
Setting exposure compensation index was canceled due to the camera being closed or a new request being submittedstops the session.
This is on a Samsung Galaxy A53 running Android 14.
Expected results
Adjusting the exposure (EV) slider should not cause errors.
Actual results
Exception: Setting exposure compensation index was canceled due to the camera being closed or a new request being submitted
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.22.0, on Zorin OS 17.1 6.5.0-35-generic, locale
en_US.UTF-8)
• Flutter version 3.22.0 on channel stable at /home/noah/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5dcb86f68f (7 days ago), 2024-05-09 07:39:20 -0500
• Engine revision f6344b75dc
• Dart version 3.4.0
• DevTools version 2.34.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /home/noah/Android/Sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /home/noah/android-studio/jbr/bin/java
• Java version OpenJDK Runtime Environment (build
17.0.10+0-17.0.10b1087.21-11572160)
• All Android licenses accepted.
[✗] Chrome - develop for the web (Cannot find Chrome executable at
google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✗] Linux toolchain - develop for Linux desktop
✗ clang++ is required for Linux development.
It is likely available from your distribution (e.g.: apt install clang),
or can be downloaded from https://releases.llvm.org/
✗ CMake is required for Linux development.
It is likely available from your distribution (e.g.: apt install cmake),
or can be downloaded from https://cmake.org/download/
✗ ninja is required for Linux development.
It is likely available from your distribution (e.g.: apt install
ninja-build), or can be downloaded from
https://github.com/ninja-build/ninja/releases
• pkg-config version 0.29.2
✗ GTK 3.0 development libraries are required for Linux development.
They are likely available from your distribution (e.g.: apt install
libgtk-3-dev)
[✓] Android Studio (version 2023.3)
• Android Studio at /home/noah/android-studio
• Flutter plugin version 79.0.2
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
17.0.10+0-17.0.10b1087.21-11572160)
[✓] Connected device (2 available)
• SM S536DL (mobile) • <unknown> • android-arm64 • Android 14 (API 34)
• Linux (desktop) • linux • linux-x64 • Zorin OS 17.1
6.5.0-35-generic
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 2 categories.
Reacted by Mickaël Hernandez
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolefound in release: 3.22Found to occur in 3.22Found to occur in 3.22has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Type
Projects
- StatusShow more project fieldsDone
Activity
danagbemava-nc commentedon May 17, 2024
Reproducible using the plugin example app and the steps outlined above.
I tested on my Pixel 7.
flutter doctor -v
gmackall commentedon May 23, 2024
cc @camsim99
7 remaining items
camsim99 commentedon Jun 3, 2024
Set this to P2 because this is a bug I think we take on strictly after fixes are made to support Impeller, which is top priority for the team.
Buenaventura-Celine commentedon Sep 16, 2024
Is there a suggested workaround for this?
MMoarales commentedon Nov 13, 2024
camsim99 commentedon Nov 14, 2024
Not actively working on this but next steps would be to figure out why we are seeing the
was canceled due to the camera being closed or a new request being submitted" error because we actually swallow the exception due to submitting too many values: https://github.com/flutter/packages/blob/b9ac917daeb0fbf5bd6ad4a7d2a69ab81749d767/packages/camera/camera_android_camerax/android/src/main/java/io/flutter/plugins/camerax/CameraControlHostApiImpl.java#L187-L192.
Thus, this issue is probably caused by another exception. The documentation mentions an
IllegalArgumentExceptionbeing possible so I wonder if it's that and we are trying to support unsiupported exposure compensation index values.mmcdanielq commentedon May 7, 2026
This is not just exposure, I get this error when trying to focus the camera: "Starting focus and metering was canceled due to the camera being closed or a new request being submitted". After receiving this error the camera becomes unusable until restarting it. I'm using the example project in the camera package.
Flutter 3.41.9 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 00b0c91 (8 days ago) • 2026-04-29 10:03:19 -0700
Engine • hash 9161402dc0e134b3fb5adee5046b6e84b1a5e1c1 (revision 42d3d75) (8 days ago) • 2026-04-28 17:31:55.000Z
Tools • Dart 3.11.5 • DevTools 2.54.2
[camera_android_camerax] Fix exposure offset setting error thrown whe…
github-actions commentedon Oct 14, 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.