react-native-image-picker: [🐛] Error processing request body: Could not find image file
Description
Error when trying to upload image from gallery

Running the example app of this repo gives me the same issue:
https://user-images.githubusercontent.com/2533919/233574721-ce717d9a-9a00-4f30-b912-483a18f16afd.mp4
How to repeat issue and example
const imagePickerDefaultOptions = {
selectionLimit: 0,
mediaType: 'photo' as MediaType,
includeBase64: false,
includeExtra: true,
};
launchImageLibrary(imagePickerDefaultOptions, (imgPickerResponse) => {
if (imgPickerResponse.assets?.[0]) {
onPhotoTaken(imgPickerResponse.assets?.[0]);
}
});
Solution
What needs to be done to address this issue?
Additional Information
- Image Picker version: >=4.10.3
- React Native version: 0.66.1 and 0.71.2
- Platform: iOS
- Development Operating System: MacOS
- Dev tools: Xcode 14.0.1, iOS 16.0
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 4
- Comments: 27
Seems to only happen for me on the sim flower image (the one picked in the video above), which is marked as
HDRand has image type ofHEICwhen viewed in the photos app@dmsierra11 I believe the problem is here.
Successfully selected image:
Error selected image:
In other words, the
heightandwidthattributes are coming with0and thefileSizeis not coming, which is causing this problem.I had the same issue I believe its crashing for the image which are not available like the one that are on cloud. Once the cloud image is downloaded it does not crash.
Use
react-native-image-crop-pickerI had a similar encounter with a captivating sunflower image. If anyone else has experienced this issue with different images, I would greatly appreciate it if you could kindly share your observations.