Thanks to visit codestin.com
Credit goes to github.com

Skip to content

New camera plugin doesn't take pictures on Android when flash is on #72649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
orestesgaolin opened this issue Dec 19, 2020 · 25 comments
Closed
Labels
e: device-specific Only manifests on certain devices in triage Presently being triaged by the triage team p: camera The camera plugin

Comments

@orestesgaolin
Copy link
Contributor

This bug report is related to new camera 6.X plugin that is aimed to support flash.

Steps to Reproduce

  1. Run camera plugin example application from commit flutter/plugins@0c6ed04 on Samsung S8 (Android 9)
  2. Tap the back camera and enable flash
  3. Try to take picture
  4. Only short flash is visible but no picture is taken

Expected results:

Picture should be taken with flash

Actual results:

Short pre-capture measurement is taken with short flash

cc: @BeMacized @mvanbeusekom @bparrishMines

Logs
[ +127 ms] executing: [/Users/dominik/fvm/versions/stable/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +44 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 78910062997c3a836feee883712c241a5fd22983
[        ] executing: [/Users/dominik/fvm/versions/stable/] git tag --points-at HEAD
[  +24 ms] Exit code 0 from: git tag --points-at HEAD
[        ] 1.22.5
[   +8 ms] executing: [/Users/dominik/fvm/versions/stable/] git rev-parse --abbrev-ref --symbolic @{u}
[  +11 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [/Users/dominik/fvm/versions/stable/] git ls-remote --get-url origin
[  +10 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +46 ms] executing: [/Users/dominik/fvm/versions/stable/] git rev-parse --abbrev-ref HEAD
[  +11 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[   +4 ms] executing: sw_vers -productName
[  +15 ms] Exit code 0 from: sw_vers -productName
[        ] macOS
[        ] executing: sw_vers -productVersion
[  +13 ms] Exit code 0 from: sw_vers -productVersion
[        ] 11.0.1
[        ] executing: sw_vers -buildVersion
[  +14 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 20B29
[        ] executing: sysctl hw.optional.arm64
[   +5 ms] Exit code 1 from: sysctl hw.optional.arm64
[        ] sysctl: unknown oid 'hw.optional.arm64'
[  +41 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +4 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +11 ms] executing: /Users/dominik/Library/Android/sdk/platform-tools/adb devices -l
[   +7 ms] executing: /usr/bin/xcode-select --print-path
[   +6 ms] Exit code 0 from: /usr/bin/xcode-select --print-path
[        ] /Applications/Xcode.app/Contents/Developer
[   +1 ms] executing: /usr/bin/xcodebuild -version
[+1083 ms] Exit code 0 from: /usr/bin/xcodebuild -version
[        ] Xcode 12.2
           Build version 12B45b
[   +2 ms] executing: sysctl hw.optional.arm64
[   +4 ms] Exit code 1 from: sysctl hw.optional.arm64
[        ] sysctl: unknown oid 'hw.optional.arm64'
[        ] executing: xcrun xcdevice list --timeout 2
[   +4 ms] xcrun simctl list --json devices
[        ] executing: xcrun simctl list --json devices
[  +38 ms] List of devices attached
           ce031713b404900c0d     device usb:336723968X product:dreamltexx model:SM_G950F device:dreamlte transport_id:2
[   +9 ms] /Users/dominik/Library/Android/sdk/platform-tools/adb -s ce031713b404900c0d shell getprop
[ +105 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +3 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +50 ms] executing: xcrun xcdevice list --timeout 2
[        ] xcrun simctl list --json devices
[        ] executing: xcrun simctl list --json devices
[  +76 ms] Found plugin path_provider at /Users/dominik/.pub-cache/hosted/pub.dartlang.org/path_provider-0.5.0+1/
[  +18 ms] Found plugin video_player at /Users/dominik/.pub-cache/hosted/pub.dartlang.org/video_player-0.10.12+5/
[   +4 ms] Found plugin video_player_web at /Users/dominik/.pub-cache/hosted/pub.dartlang.org/video_player_web-0.1.4+1/
[  +12 ms] Found plugin camera at /Users/dominik/Projects/plugins/packages/camera/camera/
[   +1 ms] Found plugin integration_test at /Users/dominik/Projects/plugins/packages/integration_test/
[ +107 ms] Found plugin path_provider at /Users/dominik/.pub-cache/hosted/pub.dartlang.org/path_provider-0.5.0+1/
[  +11 ms] Found plugin video_player at /Users/dominik/.pub-cache/hosted/pub.dartlang.org/video_player-0.10.12+5/
[   +2 ms] Found plugin video_player_web at /Users/dominik/.pub-cache/hosted/pub.dartlang.org/video_player_web-0.1.4+1/
[   +4 ms] Found plugin camera at /Users/dominik/Projects/plugins/packages/camera/camera/
[   +1 ms] Found plugin integration_test at /Users/dominik/Projects/plugins/packages/integration_test/
[  +21 ms] Generating /Users/dominik/Projects/plugins/packages/camera/camera/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[  +26 ms] ro.hardware = samsungexynos8895
[  +68 ms] Starting incremental build...
[   +3 ms] Initializing file store
[  +11 ms] Skipping target: gen_localizations
[   +5 ms] complete
[   +5 ms] Launching lib/main.dart on SM G950F in debug mode...
 package:camera_example/main.dart
[   +6 ms] /Users/dominik/fvm/versions/stable/bin/cache/dart-sdk/bin/dart --disable-dart-dev /Users/dominik/fvm/versions/stable/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root /Users/dominik/fvm/versions/stable/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata -Ddart.developer.causal_async_stacks=true -Dflutter.inspector.structuredErrors=true --output-dill /var/folders/tr/yr1t1fcn3t55jsg_z8j1sbtc0000gn/T/flutter_tools.ql4HBI/flutter_tool.ai5hk2/app.dill --packages .packages -Ddart.vm.profile=false -Ddart.vm.product=false --bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts --track-widget-creation --initialize-from-dill build/f872507f30e2ff2523f0f1d19160266e.cache.dill.track.dill
[  +17 ms] executing: /Users/dominik/Library/Android/sdk/platform-tools/adb -s ce031713b404900c0d shell -x logcat -v time -t 1
[ +169 ms] Exit code 0 from: /Users/dominik/Library/Android/sdk/platform-tools/adb -s ce031713b404900c0d shell -x logcat -v time -t 1
[        ] --------- beginning of main
           12-19 12:38:09.779 I/WifiStateMachine( 3848): checkScoreBasedQuality -  mPreviousScore[0]:83 mPreviousScore[1]:84 mPreviousScore[2]:82 s2Score:81mPrevoiusScoreAverage:83
[   +1 ms] executing: /Users/dominik/Library/Android/sdk/platform-tools/adb -s ce031713b404900c0d shell -x logcat -v time -t 1
[ +120 ms] Exit code 0 from: /Users/dominik/Library/Android/sdk/platform-tools/adb -s ce031713b404900c0d shell -x logcat -v time -t 1
[        ] --------- beginning of main
           12-19 12:38:09.779 I/WifiStateMachine( 3848): checkScoreBasedQuality -  mPreviousScore[0]:83 mPreviousScore[1]:84 mPreviousScore[2]:82 s2Score:81mPrevoiusScoreAverage:83
�[38;5;248m[  +40 ms] <- compile package:camera_example/main.dart�[39;49m
 package:camera_example/main.dart
[ +114 ms] Android Debug Bridge version 1.0.41
           Version 30.0.4-6686687
           Installed as /Users/dominik/Library/Android/sdk/platform-tools/adb
[   +3 ms] executing: /Users/dominik/Library/Android/sdk/platform-tools/adb start-server
[  +13 ms] Building APK
[  +26 ms] gradle.properties already sets `android.enableR8`
[   +5 ms] Using gradle from /Users/dominik/Projects/plugins/packages/camera/camera/example/android/gradlew.
[   +1 ms] /Users/dominik/Projects/plugins/packages/camera/camera/example/android/gradlew mode: 33261 rwxr-xr-x.
[  +20 ms] executing: /usr/bin/plutil -convert json -o - /Applications/Android Studio.app/Contents/Info.plist
[  +14 ms] Exit code 0 from: /usr/bin/plutil -convert json -o - /Applications/Android Studio.app/Contents/Info.plist
[        ] {"CFBundleName":"Android Studio","JVMOptions":{"ClassPath":"$APP_PACKAGE\/Contents\/lib\/bootstrap.jar:$APP_PACKAGE\/Contents\/lib\/extensions.jar:$APP_PACKAGE\/Contents\/lib\/util.jar:$APP_PACKAGE\/Contents\/lib\/jdom.jar:$APP_PACKAGE\/Contents\/lib\/log4j.jar:$APP_PACKAGE\/Contents\/lib\/trove4j.jar:$APP_PACKAGE\/Contents\/lib\/jna.jar","JVMVersion":"1.8*,1.8+","MainClass":"com.intellij.idea.Main","Properties":{"idea.paths.selector":"AndroidStudio4.1","idea.executable":"studio","idea.platform.prefix":"AndroidStudio","idea.vendor.name":"Google","idea.home.path":"$APP_PACKAGE\/Contents"}},"NSDesktopFolderUsageDescription":"An application in Android Studio requests access to the user's Desktop folder.","LSArchitecturePriority":["x86_64"],"CFBundleVersion":"AI-201.8743.12.41.6953283","CFBundleDevelopmentRegion":"English","NSCameraUsageDescription":"An application in Android Studio requests access to the device's camera.","CFBundleDocumentTypes":[{"CFBundleTypeName":"Android Studio Project File","CFBundleTypeExtensions":["ipr"],"CFBundleTypeRole":"Editor","CFBundleTypeIconFile":"studio.icns"},{"CFBundleTypeName":"All documents","CFBundleTypeExtensions":["*"],"CFBundleTypeOSTypes":["****"],"CFBundleTypeRole":"Editor","LSTypeIsPackage":false}],"NSSupportsAutomaticGraphicsSwitching":true,"CFBundlePackageType":"APPL","CFBundleIconFile":"studio.icns","NSHighResolutionCapable":true,"CFBundleShortVersionString":"4.1","NSMicrophoneUsageDescription":"An application in Android Studio requests access to the device's microphone.","CFBundleInfoDictionaryVersion":"6.0","CFBundleExecutable":"studio","NSLocationUsageDescription":"An application in Android Studio requests access to the user's location information.","LSRequiresNativeExecution":"YES","CFBundleURLTypes":[{"CFBundleTypeRole":"Editor","CFBundleURLName":"Stacktrace","CFBundleURLSchemes":["idea"]}],"CFBundleIdentifier":"com.google.android.studio","LSApplicationCategoryType":"public.app-category.developer-tools","CFBundleSignature":"????","LSMinimumSystemVersion":"10.8","NSDocumentsFolderUsageDescription":"An application in Android Studio requests access to the user's Documents folder.","NSDownloadsFolderUsageDescription":"An application in Android Studio requests access to the user's Downloads folder.","NSNetworkVolumesUsageDescription":"An application in Android Studio requests access to files on a network volume.","CFBundleGetInfoString":"Android Studio 4.1, build AI-201.8743.12.41.6953283. Copyright JetBrains s.r.o., (c) 2000-2020","NSRemovableVolumesUsageDescription":"An application in Android Studio requests access to files on a removable volume."}
[   +4 ms] executing: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java -version
[ +103 ms] Exit code 0 from: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java -version
[        ] openjdk version "1.8.0_242-release"
           OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
           OpenJDK 64-Bit Server VM (build 25.242-b3-6915495, mixed mode)
[   +2 ms] executing: [/Users/dominik/Projects/plugins/packages/camera/camera/example/android/] /Users/dominik/Projects/plugins/packages/camera/camera/example/android/gradlew -q -Ptarget-platform=android-arm64 -Ptarget=/Users/dominik/Projects/plugins/packages/camera/camera/example/lib/main.dart -Ptrack-widget-creation=true -Pfilesystem-scheme=org-dartlang-root -Pdart-defines=flutter.inspector.structuredErrors%3Dtrue assembleDebug
[+31149 ms] calculateSha: LocalDirectory: '/Users/dominik/Projects/plugins/packages/camera/camera/example/build/app/outputs/flutter-apk'/app.apk
[  +24 ms] calculateSha: reading file took 23us
[ +628 ms] calculateSha: computing sha took 627us
[   +4 ms] ✓ Built build/app/outputs/flutter-apk/app-debug.apk.
[   +4 ms] executing: /Users/dominik/Library/Android/sdk/build-tools/29.0.2/aapt dump xmltree /Users/dominik/Projects/plugins/packages/camera/camera/example/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
[  +17 ms] Exit code 0 from: /Users/dominik/Library/Android/sdk/build-tools/29.0.2/aapt dump xmltree /Users/dominik/Projects/plugins/packages/camera/camera/example/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
[        ] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="1.0" (Raw: "1.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1d
               A: android:compileSdkVersionCodename(0x01010573)="10" (Raw: "10")
               A: package="io.flutter.plugins.cameraexample" (Raw: "io.flutter.plugins.cameraexample")
               A: platformBuildVersionCode=(type 0x10)0x1
               A: platformBuildVersionName=(type 0x4)0x3f800000
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x15
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1c
               E: uses-feature (line=11)
                 A: android:name(0x01010003)="android.hardware.camera" (Raw: "android.hardware.camera")
                 A: android:required(0x0101028e)=(type 0x12)0xffffffff
               E: uses-permission (line=15)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: uses-permission (line=16)
                 A: android:name(0x01010003)="android.permission.FLASHLIGHT" (Raw: "android.permission.FLASHLIGHT")
               E: uses-permission (line=17)
                 A: android:name(0x01010003)="android.permission.CAMERA" (Raw: "android.permission.CAMERA")
               E: uses-permission (line=18)
                 A: android:name(0x01010003)="android.permission.RECORD_AUDIO" (Raw: "android.permission.RECORD_AUDIO")
               E: uses-permission (line=19)
                 A: android:name(0x01010003)="android.permission.ACCESS_NETWORK_STATE" (Raw: "android.permission.ACCESS_NETWORK_STATE")
               E: application (line=21)
                 A: android:label(0x01010001)="camera_example" (Raw: "camera_example")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:name(0x01010003)="io.flutter.app.FlutterApplication" (Raw: "io.flutter.app.FlutterApplication")
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
                 E: activity (line=27)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="io.flutter.plugins.cameraexample.EmbeddingV1Activity" (Raw: "io.flutter.plugins.cameraexample.EmbeddingV1Activity")
                   A: android:exported(0x01010010)=(type 0x12)0xffffffff
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x24b4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: meta-data (line=35)
                     A: android:name(0x01010003)="io.flutter.app.android.SplashScreenUntilFirstFrame" (Raw: "io.flutter.app.android.SplashScreenUntilFirstFrame")
                     A: android:value(0x01010024)=(type 0x12)0xffffffff
                 E: activity (line=39)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="io.flutter.embedding.android.FlutterActivity" (Raw: "io.flutter.embedding.android.FlutterActivity")
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x24b4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: intent-filter (line=46)
                     E: action (line=47)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=49)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                 E: meta-data (line=53)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
[   +5 ms] Stopping app 'app.apk' on SM G950F.
[        ] executing: /Users/dominik/Library/Android/sdk/platform-tools/adb -s ce031713b404900c0d shell am force-stop io.flutter.plugins.cameraexample
[ +192 ms] executing: /Users/dominik/Library/Android/sdk/platform-tools/adb -s ce031713b404900c0d shell pm list packages io.flutter.plugins.cameraexample
[ +163 ms] package:io.flutter.plugins.cameraexample
[   +2 ms] executing: /Users/dominik/Library/Android/sdk/platform-tools/adb -s ce031713b404900c0d shell cat /data/local/tmp/sky.io.flutter.plugins.cameraexample.sha1
[  +60 ms] 9793cef76d940243129382f69e80e1ab374a1712
[   +1 ms] Installing APK.
[   +2 ms] executing: /Users/dominik/Library/Android/sdk/platform-tools/adb version
[   +9 ms] Android Debug Bridge version 1.0.41
           Version 30.0.4-6686687
           Installed as /Users/dominik/Library/Android/sdk/platform-tools/adb
[   +1 ms] executing: /Users/dominik/Library/Android/sdk/platform-tools/adb start-server
[  +11 ms] executing: /Users/dominik/Library/Android/sdk/platform-tools/adb -s ce031713b404900c0d install -t -r /Users/dominik/Projects/plugins/packages/camera/camera/example/build/app/outputs/flutter-apk/app.apk
[+29378 ms] Performing Streamed Install
            Success
[   +1 ms] executing: /Users/dominik/Library/Android/sdk/platform-tools/adb -s ce031713b404900c0d shell echo -n 2253c1d90dc1fbed01c936bf338c0a4c31263e15 > /data/local/tmp/sky.io.flutter.plugins.cameraexample.sha1
[ +172 ms] SM G950F startApp
[   +3 ms] executing: /Users/dominik/Library/Android/sdk/platform-tools/adb -s ce031713b404900c0d shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true --ez start-paused true io.flutter.plugins.cameraexample/io.flutter.embedding.android.FlutterActivity
[ +366 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=io.flutter.plugins.cameraexample/io.flutter.embedding.android.FlutterActivity (has extras) }
[        ] Waiting for observatory port to be available...
[+2026 ms] Observatory URL on device: http://127.0.0.1:42244/bAPQEsGGOCI=/
[   +1 ms] executing: /Users/dominik/Library/Android/sdk/platform-tools/adb -s ce031713b404900c0d forward tcp:0 tcp:42244
[  +11 ms] 61851
[        ] Forwarded host port 61851 to device port 42244 for Observatory
[   +5 ms] Caching compiled dill
[  +48 ms] Connecting to service protocol: http://127.0.0.1:61851/bAPQEsGGOCI=/
[   +1 ms] DDS is currently disabled due to https://github.com/flutter/flutter/issues/62507
[ +440 ms] Successfully connected to service protocol: http://127.0.0.1:61851/bAPQEsGGOCI=/
[  +17 ms] DevFS: Creating new filesystem on the device (null)
[  +46 ms] DevFS: Created new filesystem on the device (file:///data/user/0/io.flutter.plugins.cameraexample/code_cache/exampleSBWXKB/example/)
[   +2 ms] Updating assets
[ +147 ms] Scanning asset files
[   +2 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[        ] <- recompile package:camera_example/main.dart 503fc816-b868-4389-a3aa-1819332cdbac
 package:camera_example/main.dart
[        ] <- 503fc816-b868-4389-a3aa-1819332cdbac
[  +60 ms] Updating files
[ +165 ms] DevFS: Sync finished
[   +1 ms] Synced 1.6MB.
[   +1 ms] <- accept
[   +4 ms] Connected to _flutterView/0x7782736820.
Connecting to VM Service at ws://127.0.0.1:61851/bAPQEsGGOCI=/ws
[+1076 ms] I/CameraManagerGlobal( 9497): Connecting to camera service
[   +6 ms] D/VendorTagDescriptor( 9497): addVendorDescriptor: vendor tag id 3854507339 added
[+75924 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 0
[  +34 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 1
[+3731 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 0
[  +34 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 1
[ +211 ms] D/SensorManager( 9497): registerListener :: 6, LSM6DSL Acceleration Sensor, 200000, 0,
[ +767 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 0
[  +26 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 1
[+7141 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 0
[  +47 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 1
[+5581 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 0
[  +33 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 1
[+5826 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 0
[  +34 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 1
[+55557 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 0
[  +66 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 1
[+6193 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 0
[  +73 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 1
[+1637 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 0
[  +48 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 1
[+1979 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 0
[  +47 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 1
[+1819 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 0
[ +115 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 1
[ +739 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 0
[  +84 ms] D/ViewRootImpl@c50ee95[FlutterActivity]( 9497): ViewPostIme pointer 1

[✓] Flutter (Channel stable, 1.22.5, on macOS 11.0.1 20B29 darwin-x64, locale pl-PL)
    • Flutter version 1.22.5 at /Users/dominik/fvm/versions/stable
    • Framework revision 7891006299 (9 days ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/dominik/Library/Android/sdk
    • Platform android-30, build-tools 29.0.2
    • ANDROID_HOME = /Users/dominik/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.2, Build version 12B45b
    • CocoaPods version 1.10.0

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.17.0

[✓] Connected device (2 available)
    • SM G950F (mobile)         • ce031713b404900c0d                       • android-arm64 • Android 9 (API 28)
    • iPhone (Dominik) (mobile) • f96e187ec1f51b6be1830c7965a482dc653765d2 • ios           • iOS 14.2
    ! Error: iPhone (Dominik) is busy: Copying cache files from device. Xcode will continue when iPhone (Dominik) is finished. (code -10)

! Doctor found issues in 1 category.
@mvanbeusekom mvanbeusekom added p: camera The camera plugin e: device-specific Only manifests on certain devices labels Dec 20, 2020
@pedromassangocode
Copy link

Hi @orestesgaolin
The PR/commit seems to be reverted and I'm not able to run the code sample in https://github.com/flutter/plugins/blob/master/packages/camera/camera/example/lib/main.dart. The latest version in pub.dev is 0.6.0. https://pub.dev/packages/camera/changelog

If you have some additional information in how I can reproduce the issue please write in the comments below.
Thank you

@pedromassangocode pedromassangocode added waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds in triage Presently being triaged by the triage team labels Dec 21, 2020
@mvanbeusekom
Copy link

mvanbeusekom commented Dec 21, 2020

@pedromassangocode the code sample was run directly against the code in de master branch. The flash functionality has not been published yet to pub. Nothing has been reverted, simply not published to pub yet.

P.S. the related PR is flutter/plugins#3314

@pedromassangocode
Copy link

Hi @orestesgaolin
I cannot reproduce the issue on Android (Xiaomi Redmi 5Plus, Android 8.1.0) running on commit flutter/plugins@b289e1a. As you can see the picture is taken and contains flash.

|

@orestesgaolin
Copy link
Contributor Author

I updated my app to the newest version of the plugin from commit flutter/plugins@622ba57 but the issue still occurs on Samsung S8. I think this is hardware specific issue i.e. won't occur on other brands or system versions. Are you able to execute the reproduction steps on Samsung S8? I asked my customer to run it on their phones which have similar (but different in practice) issues with camera plugin. I'll let you know more as soon I get this feedback.

@leszekkrol
Copy link

I got the same issue as @orestesgaolin on Samsung S5 and Samsung S6

@gabrielginter
Copy link

I'm experiencing the same problem, the takePicture method on camera plugin version 0.6.2+1 never returns a file, the Future never completes, regardless of the flash mode. Video recording seems to work fine.

Device: Google Pixel 3XL
Android version: 11

@kw2019ltd
Copy link

same issue.

@mvanbeusekom
Copy link

We have located the cause of this problem and are preparing a fix as we speak.

We will make a PR today.

@BeMacized
Copy link

This should be fixed in flutter/plugins#3367.
It now works on a Nexus 5X where it did not before. I however do not have access to a galaxy phone to test this.
@orestesgaolin Would you please be able to give this PR a test to confirm whether it solves the issue?

@supratikkoley
Copy link

I am runing this plugin on Samsung A31, take picture never completes the process.

@mvanbeusekom
Copy link

@supratikkoley are you testing with the latest version on the master branch or the version on pub.dev?

We created a fix yesterday which has been merged to master but hasn't been released to pub.dev yet.

@supratikkoley
Copy link

I am testing it with puv dev version,
I haven't checked the latest version yet. Sorry.

@mvanbeusekom
Copy link

mvanbeusekom commented Dec 25, 2020

No problem ;) good news is that a fix is coming soon.

@orestesgaolin
Copy link
Contributor Author

Hey there, I can confirm that the flash works now with Samsung S8 at flutter/plugins@a9513d5. Please close the issue at your convenience.

I encountered a crash while stopping recording, but need to investigate it a bit further and submit separate issue.

@mvanbeusekom
Copy link

mvanbeusekom commented Dec 26, 2020

Thanks @orestesgaolin, you are a big help (also al the others that helped testing)!

@leszekkrol
Copy link

@mvanbeusekom When releasing updates, try to check that all modules work properly thirty times. I confirm that version 6.3.1 fixes taking pictures, but video recording has stopped working.

E/AndroidRuntime(32209): java.lang.NullPointerException: Attempt to invoke virtual method 'void io.flutter.plugins.camera.PictureCaptureRequest.error(java.lang.String, java.lang.String, java.lang.Object)' on a null object reference
E/AndroidRuntime(32209): at io.flutter.plugins.camera.Camera$3.onCaptureFailed(Camera.java:291)
E/AndroidRuntime(32209): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(32209): at android.hardware.camera2.dispatch.InvokeDispatcher.dispatch(InvokeDispatcher.java:39)
E/AndroidRuntime(32209): at android.hardware.camera2.dispatch.HandlerDispatcher$1.run(HandlerDispatcher.java:65)
E/AndroidRuntime(32209): at android.os.Handler.handleCallback(Handler.java:751)
E/AndroidRuntime(32209): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(32209): at android.os.Looper.loop(Looper.java:154)
E/AndroidRuntime(32209): at android.app.ActivityThread.main(ActivityThread.java:6682)
E/AndroidRuntime(32209): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(32209): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
E/AndroidRuntime(32209): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

@BeMacized
Copy link

@mvanbeusekom When releasing updates, try to check that all modules work properly thirty times. I confirm that version 6.3.1 fixes taking pictures, but video recording has stopped working.

Turns out this only occurs when a video recording is stopped before any picture has been taken. Although video recording was tested, this specific path was not. It should now be fixed in flutter/plugins#3375.

@leszekkrol
Copy link

@BeMacized how can i test this commit? Unfortunately, it has been blocked for review

@BeMacized
Copy link

@BeMacized how can i test this commit? Unfortunately, it has been blocked for review

To test this in your own app, you could replace your dependency on the camera plugin with the following:

camera:
  git:
    url: [email protected]:BeMacized/plugins.git
    ref: fix/camera-video-recording

Otherwise, just pull the branch and run the example app.

@leszekkrol
Copy link

leszekkrol commented Dec 29, 2020

@mvanbeusekom Your last commit "Update camera_platform_interface to 1.2.0 (#3376)" causes the camera to not initialize ;/ Could you check it?

The log data only shows the "Connecting to camera service" status.

[+1576 ms] D/ViewRootImpl@9af74a5FlutterActivity: ViewPostImeInputStage processPointer 0
[ +52 ms] D/ViewRootImpl@9af74a5FlutterActivity: ViewPostImeInputStage processPointer 1
[ +113 ms] I/CameraManagerGlobal( 9094): Connecting to camera service
[ +159 ms] D/SensorManager( 9094): registerListener :: 0, MPU6500 Acceleration Sensor, 200000, 0,

@kw2019ltd
Copy link

@mvanbeusekom Your last commit "Update camera_platform_interface to 1.2.0 (#3376)" causes the camera to not initialize ;/ Could you check it?

The log data only shows the "Connecting to camera service" status.

[+1576 ms] D/ViewRootImpl@9af74a5FlutterActivity: ViewPostImeInputStage processPointer 0
[ +52 ms] D/ViewRootImpl@9af74a5FlutterActivity: ViewPostImeInputStage processPointer 1
[ +113 ms] I/CameraManagerGlobal( 9094): Connecting to camera service
[ +159 ms] D/SensorManager( 9094): registerListener :: 0, MPU6500 Acceleration Sensor, 200000, 0,

iam getting same issue pls fix this issue pls test before releasing

@leszekkrol
Copy link

Please fix this ASAP, we can't release a version because of that.

@BeMacized
Copy link

BeMacized commented Dec 29, 2020

A PR that fixes this has already been made and accepted a few hours ago (flutter/plugins#3377). We're only waiting for all checks to go green.

@mvanbeusekom
Copy link

Please fix this ASAP, we can't release a version because of that.

@leszekkrol, @kw2019ltd, if you can't wait for the PR to land and a new version of the plugin to be published, you can workaround the problem using a dependency override adding the following to your pubspec.yaml should solve the issue:

dependency_overrides:
  camera_platform_interface: ">=1.0.4 <1.1.0"

@pedromassangocode pedromassangocode removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 30, 2020
@github-actions
Copy link

github-actions bot commented Aug 7, 2021

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 -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e: device-specific Only manifests on certain devices in triage Presently being triaged by the triage team p: camera The camera plugin
Projects
None yet
Development

No branches or pull requests

8 participants