Skip to content

[camera_android_camerax] Camera preview is rotated on the supported Impeller version #149294

@xuegao-tzx

Description

@xuegao-tzx

What package does this bug report belong to?

camera

What target platforms are you seeing this bug on?

Android

Have you already upgraded your packages?

Yes

Dependency versions

pubspec.lock
camera_android_camerax 0.6.5+4

Steps to reproduce

  1. In the version camera_android_camerax 0.6.5+4 after this commit, the preview camera screen is displayed abnormally, and the up, down, left, and right movement directions are also abnormal. This version will display abnormally regardless of whether io.flutter.embedding.android.EnableImpeller is set to true.
  2. Test device: Google Android 15 AP31.240426.023 and HuaWei Android12.0 API31

Expected results

This is the original normal screenshot:

This is the original normal screen recording:

normal.mp4

Actual results

This is the current abnormal screenshot:

This is the current abnormal screen recording:

error.mp4

Code sample

Code sample
if (isCameraReady)
          SizedBox(
            width: cameraMaxSize,
            height: cameraMaxSize,
            child: ClipRRect(
              child: OverflowBox(
                child: FittedBox(
                  fit: BoxFit.cover,
                  child: SizedBox(
                    width: cameraMaxSize,
                    child: CameraPreview(
                      controller!
                    ),
                  ),
                ),
              ),
            ),
          ),

Screenshots or Videos

Screenshots / Video demonstration
error.mp4

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
$ flutter doctor -v
[✓] Flutter (Channel beta, 3.22.1, on macOS 14.5 23F79 darwin-arm64, locale zh-Hans-CN)
    • Flutter version 3.22.1 on channel beta at /opt/homebrew/Caskroom/flutter/3.10.5/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (7 天前), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3
    • Flutter download mirror https://mirrors.tuna.tsinghua.edu.cn/flutter

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/xuegao/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/xuegao/Library/Android/sdk
    • Java binary at: /Applications/Android Studio
      Preview.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome
      Canary

[!] Android Studio (version unknown)
    • Android Studio at /Applications/Android Studio Preview.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.1.2)
    • IntelliJ at /Users/xuegao/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.90.0-insider)
    • VS Code at /Applications/Visual Studio Code - Insiders.app/Contents
    • Flutter extension version 3.89.20240501

[✓] Connected device (6 available)
    • ALN AL10 (mobile)               • 23F0213C21011631                                 •
      android-arm64  • Android 12 (API 31)
    • Pixel 7 Pro (mobile)            • 192.168.2.104:38723                              •
      android-arm64  • Android 14 (API 34)
    • macOS (desktop)                 • macos                                            •
      darwin-arm64   • macOS 14.5 23F79 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                            •
      darwin         • macOS 14.5 23F79 darwin-arm64
    • Chrome (web)                    • chrome                                           •
      web-javascript • Google Chrome 127.0.6508.0 canary

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

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: regressionIt was better in the past than it is nowe: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.found in release: 3.22Found to occur in 3.22found in release: 3.23Found to occur in 3.23fyi-androidFor the attention of Android platform teamhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions