miguelpruivo/flutter_file_picker

Pick a video but it’s treating them like image

Closed this issue · 6 comments

Before creating an issue, make sure that you are on the latest file_picker version and that there aren't already any similar opened inssues. Also, check if it isn't described on the Wiki, specially on Troubleshooting page.

Also, sometimes a simple flutter clean and flutter build again with latest file_picker version, may end up by fixing cached issues, so I encourage you to first do so.

Describe the bug
Pick a video but it’s treating them like image. If the issue happens to be on iOS, Iphone 11 pro, os 17.1.1

Platform

  • Android
  • iOS
  • Web
  • Desktop

Platform OS version
Iphone 11 pro, os 17.1.1
How are you picking?

Choose a video but result an image

Details to reproduce the issue
_pickingType = FileType.video
List? allowedExtensions;
if (_pickingType == FileType.custom) {
allowedExtensions = ['mp3', 'wav', 'ogg'];
} else {
allowedExtensions = ((_extension?.isNotEmpty ?? false)
? _extension?.replaceAll(' ', '').split(',')
: null);
}
var allowCompression = true;
_paths = (await FilePicker.platform.pickFiles(
type: _pickingType,
allowMultiple: _multiPick,
allowedExtensions: allowedExtensions,
allowCompression: allowCompression,
onFileLoading: (FilePickerStatus status) {
if (status == FilePickerStatus.picking) {
showDialogProcessing();
}
loggerApp.e(" operation status: " + status.name);
}))
?.files;

Error Log
⛔ /private/var/mobile/Containers/Data/Application/1F096E82-773B-423B-A5D4-BD7A01FB56F8/tmp/c3afa8a3-9402-4b40-99bb-86979d5ad007-1701243842398.jpeg
Screenshots and/or video
image

Flutter Version details
Please, post the output of your flutter doctor -v, preferably, while running the issued device/simulator.

fvm flutter doctor -v

╔════════════════════════════════════════════════════════════════════════════╗
║ Welcome to Flutter! - https://flutter.dev
║ ║
║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
║ statistics and basic crash reports. This data is used to help improve ║
║ Flutter tools over time. ║
║ ║
║ Flutter tool analytics are not sent on the very first run. To disable ║
║ reporting, type 'flutter config --no-analytics'. To display the current ║
║ setting, type 'flutter config'. If you opt out of analytics, an opt-out ║
║ event will be sent, and then no further information will be sent by the ║
║ Flutter tool. ║
║ ║
║ By downloading the Flutter SDK, you agree to the Google Terms of Service. ║
║ The Google Privacy Policy describes how data is handled in this service. ║
║ ║
║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and ║
║ crash reports to Google. ║
║ ║
║ Read about data we send with crash reports: ║
https://flutter.dev/docs/reference/crash-reporting
║ ║
║ See Google's privacy policy: ║
https://policies.google.com/privacy
║ ║
║ To disable animations in this tool, use 'flutter config --no-animations'. ║
╚════════════════════════════════════════════════════════════════════════════╝

[!] Flutter (Channel stable, 3.16.0, on macOS 14.1.1 23B81 darwin-arm64, locale en-VN)
• Flutter version 3.16.0 on channel stable at /Users/dieu/fvm/versions/3.16.0
! Warning: dart on your path resolves to /opt/homebrew/Cellar/dart/3.1.0/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/dieu/fvm/versions/3.16.0. Consider adding /Users/dieu/fvm/versions/3.16.0/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision db7ef5bf9f (2 weeks ago), 2023-11-15 11:25:44 -0800
• Engine revision 74d16627b9
• Dart version 3.2.0
• DevTools version 2.28.2
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /Users/dieu/Library/Android/sdk
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

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

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

[✓] Android Studio (version 2022.3)
• Android Studio at /Applications/Android Studio.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
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] Connected device (3 available)
• iPhone (mobile)
[✓] Network resources
• All expected network resources are available.

! Doctor found issues in 2 categories.

Additional context
Some video has been treating them like image

This issue is stale because it has been open for 14 days with no activity.

same issue.
if the selected video's extension is H.264, it will be as jpeg

This issue is stale because it has been open for 14 days with no activity.

This issue was closed because it has been inactive for 14 days since being marked as stale.

This is still persistent.
@miguelpruivo can you look into this, it is happening on latest iOS version it seems

Same issue here, and yess it's only happening on latest iOS versions, i Have tested in iOS 15.8 and is working fine, but iOS > 17 is returning a .jpeg path