Repository navigation
[camera_avfoundation] Crash when opening camera stream starting from 0.9.19+2 #170240
Description
Activity
- changed the title
[-][camera_avfoundation] Crash when opening camera stream from 0.9.19+2[/-][+][camera_avfoundation] Crash when opening camera stream starting from 0.9.19+2[/+]on Jun 9, 2025 - addedin triagePresently being triaged by the triage teamPresently being triaged by the triage team
on Jun 10, 2025 @SherpaMiguel Thanks for the report. I am unable to replicate this after running the camera example on iPhone 15 device. What device does it throw the error on ? Also, can you provide the complete error log ?
- addedwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
on Jun 10, 2025 @darshankawar I have updated the description with some logs and a screenshot in Xcode. Also added an example (sorry, I use riverpod). Also note that issue occurs on iPhone 12, 15 Pro Max, 16 Pro.
Thank you in advance.
- removedwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
on Jun 10, 2025 Deehodry-dhj commented
on Jun 10, 2025 on Jun 10, 2025 · Hidden as duplicateshow commentMore actionsDeehodry-dhj commented
on Jun 11, 2025 on Jun 11, 2025 · Hidden as duplicateshow commentMore actionsThanks for the update. This error is replicable without using riverpod as well, which throws below error log:
-- LLDB integration loaded -- fopen failed for data file: errno = 2 (No such file or directory) Errors found! Invalidating cache... flutter: The Dart VM service is listening on http://0.0.0.0:62461/uTZxX8QABqM=/ fopen failed for data file: errno = 2 (No such file or directory) Errors found! Invalidating cache... FlutterView implements focusItemsInRect: - caching for linear focus movement is limited as long as this view is on screen. This FlutterEngine was already invoked. Unsupported value: (Function) of type __SwiftValue *** Assertion failure in void WriteValueOfType(CFTypeRef, CFMutableDataRef, FlutterStandardCodecObjcType, CFTypeRef)(), FlutterStandardCodec.mm:341 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unsupported value for standard codec' *** First throw call stack: (0x18d26c7cc 0x18a53f2e4 0x18c63ca78 0x108211cc4 0x10821194c 0x18bb866e4 0x18b8e0168 0x18d26b5f4 0x108211dd8 0x10821194c 0x108212b94 0x10820e4c8 0x1054b35d4 0x1054b37dc 0x1054a0a1c 0x105538a30 0x10553a71c 0x10554ade8 0x10554a9a4 0x18d240204 0x18d23d440 0x18d23c830 0x1d921c1c4 0x18fda2eb0 0x18fe515b4 0x19018bfa8 0x104a68584 0x104a684fc 0x104a68600 0x1b2c2aec8) libc++abi: terminating due to uncaught exception of type NSExceptionVerified upto
camera: ^0.11.0which throws the same error as above. Per OP, this worked in0.9.19+1so labeling this as regression.stable : 3.32.2 master : 3.33.0-1.0.pre.444- addedp: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.c: crashStack traces logged to the consoleStack traces logged to the consoleplatform-iosiOS applications specificallyiOS applications specificallyc: regressionIt was better in the past than it is nowIt was better in the past than it is nowhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work on
on Jun 11, 2025 16 remaining items
I can confirm the issue disappears with the following override:
camera_avfoundation: 0.9.19+1
My setup:flutter: 3.32.3, channel: stablecamera: 0.11.1Device: iOS 15 ProiOS 18.5 (22F76)You can also override the dependency version directly in your
pubspec.yamlfile usingdependency_overrides:dependency_overrides: camera_avfoundation: 0.9.19+1
Reacted by Vinicius Sossella and Siarhei YemialyanauReacted by Kumulynja, Azad, Sylvain Duché, Collins Eneze, Nader , Miguel Ángel Álvarez, Siarhei Yemialyanau and jakobhecThis should be resolved after flutter/packages#9418 is landed.
- added a commit that references this issue
on Jun 18, 2025 Thanks! What version will this end up in?
- addedr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
on Jun 19, 2025 @Osmosis311 It is in the
camera_avfoundation0.9.20. If you want to ensure you're using the fixed version, you can either explicitly add a constraint forcamera_avfoundationto yourpubspec.yamlor make sure you depend on the0.9.20version inpubspec.lock- added a commit that references this issue
on Jun 25, 2025 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.- locked as resolved and limited conversation to collaborators
on Jul 4, 2025 - added a commit that references this issue
on Jul 30, 2025 - added a commit that references this issue
on Jun 10, 2026 - added a commit that references this issue
on Jun 19, 2026
Steps to reproduce
Expected results
Stream opens normally
Actual results
Unsupported value: (Function) of type __SwiftValue
0.9.19+1 version works as expected
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
Logs
Logs
Flutter Doctor output
Doctor output