[Image_Picker] Platform exception on attempt to pick ProRAW (com.adobe.raw-image) on real device or public.jpeg (one of default photos at iOS Simulator)

This issue has been tracked since 2023-03-17.

Steps to Reproduce

  1. Execute flutter run on the code sample https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker/example
  2. Tap at one image pick up button (for iOS simulator)
  3. Tap on some ProRAW photo (real device) or the very first photo at default photos list at iOS simulator.
  4. Exception happened: PlatformException (PlatformException(invalid_image, Cannot load representation of type com.adobe.raw-image OR public.jpeg, NSItemProviderErrorDomain, null)

Expected results:

Image opened.

Actual results:

App throws the excpetion.

Code sample

Package example project https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker/example

Logs

no logs re: the issue

Analyzing example...
No issues found! (ran in 7.9s)

[✓] Flutter (Channel stable, 3.7.0, on macOS 12.6 21G115 darwin-x64)
• Flutter version 3.7.0 on channel stable at /Users/Development/Libraries/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision b06b8b2 (8 weeks ago), 2023-01-23 16:55:55 -0800
• Engine revision b24591ed32
• Dart version 2.19.0
• DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /Users/arcuser/Library/Android/sdk
• Platform android-33, build-tools 33.0.1
• ANDROID_HOME = /Users/arcuser/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.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 11.0.13+0-b1751.21-8125866)

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

[✓] Connected device (3 available)
• iPhone 8 (mobile) • DBADBF3B-5A23-4AEC-A30F-2616A81CEB37 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-15-5 (simulator)
• macOS (desktop) • macos • darwin-x64 • macOS 12.6 21G115 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.64

[✓] HTTP Host Availability
• All required HTTP hosts are available

• No issues found!

darshankawar wrote this answer on 2023-03-17

@victor-kotov
The issue described is a known issue of Apple's simulators (63426347). According to Apple, it's only an issue on the simulator, physical devices should work fine.
https://developer.apple.com/forums/thread/665265

Since it is not specific to Flutter or image_picker plugin, I'll close it. You may follow-up in this issue for further updates #117240

victor-kotov wrote this answer on 2023-03-17

@darshankawar it's not just iOS simulator, ProRAW photos also cause the issue on real device

victor-kotov wrote this answer on 2023-03-17

this one from iPhone 13 Pro:

Exception has occurred. PlatformException (PlatformException(invalid_image, Cannot load representation of type com.adobe.raw-image, NSItemProviderErrorDomain, null))

More Details About Repo
Owner Name flutter
Repo Name flutter
Full Name flutter/flutter
Language Dart
Created Date 2015-03-06
Updated Date 2023-03-30
Star Count 151602
Watcher Count 3555
Fork Count 25000
Issue Count 11498

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date