react-native-image-picker: {"errorCode": "others"} and undefined errorDescription
Discussed in https://github.com/react-native-image-picker/react-native-image-picker/discussions/1993
<div type='discussions-op-text'>Originally posted by PDipendra June 22, 2022 Works fine in android simulator and device, but throw {“errorCode”: “others”} and empty errorDescription in iOS 14.5 and 15.5.
await launchImageLibrary(
{
mediaType: 'video',
},
response => {
console.log(response);
}
);
```</div>
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 19
- Comments: 24 (1 by maintainers)
Same issue on real devices in production, “.WEBP” might be the issue like @KelvinPortuphy says
This appears to only be an issue on iOS simulator, and also probably only on M1 Macs, related to this issue: https://github.com/react-native-image-picker/react-native-image-picker/issues/1999
However, using an iOS hardware device via Xcode when running with local RN apps does allow video uploads, so is most likely just a symptom of iOS Simulator + M1 Macs
I have the same issue:
“react-native-image-picker”: “^4.10.2” “react-native”: “0.70.6”,
Apple M1 Version 13.3 (22E252)
iPhone 14 - iOS 16.1 Xcode Version 14.1 (14B47b)
I get the error: {“errorCode”: “others”} errorMessage undefine
https://user-images.githubusercontent.com/73840306/230504737-0f2f45c2-b87d-49ce-9dee-19b376fdf3d5.mp4
Did some more digging and I think this has to do with image of type “.WEBP”
Facing the same issue, works everywhere except iOS simulator. Im on Xcode 14.2 but still facing it.
Updating Xcode to version 14.2 helped me fix a similar problem. (M1)
@lethithaonhi I’m facing this issue on M1 Pro Max and RN 0.71.0.
This issue on react-native 0.69.3 and react-native-image-picker ver 5.1.0, it happen on M2 chip
I’m getting this issue on RN 0.71.0 and image picker version 5.1.0
I have the same issue on 5.1.0, chip M2
Also, now that I tested even more, I realized this is easily replicable if you take 2 photos with one of them being “RAW”.
The non-RAW photo will be picked up normally and the RAW one will throw the error described above.
Here’s an easy repro (simulator and real devices) :
With safari go to this page : https://www.carrefour.fr/p/lentilles-carrefour-classic-3560070329441 Save the photo directly on the page and try to use it with react-native-image-picker, it will fail.
Strangely if you open and display directly the photo url in safari and save it will be fine ti use with image-picker.
video : https://imgur.com/a/umBRz3J
Note : only the second photo is available to download, when I plug my iPhone on my Mac, in Apple Photos app.