dimonovdd / Xamarin.MediaGallery

This plugin is designed to picking and save images and video files from native gallery of Android and iOS devices and capture photos
MIT License
149 stars 18 forks source link

Calling OpenReadAsync on iOS Simulator Throws Exception #94

Closed centrolutions closed 2 years ago

centrolutions commented 2 years ago

Description

After using the PickAsync method, and calling OpenReadAsync on the IMediaFile, an exception is thrown.

Actual Behavior

The exception message is: Error Domain=NSItemProviderErrorDomain Code=-1000 "Cannot load representation of type public.jpeg" UserInfo={NSLocalizedDescription=Cannot load representation of type public.jpeg, NSUnderlyingError=0x600000cd15c0 {Error Domain=NSCocoaErrorDomain Code=256 "The file “version=1&uuid=9610D22F-9061-4690-B523-C334B801D14E&mode=compatible.jpeg” couldn’t be opened." UserInfo={NSURL=file:///Users/jasonwilliams/Library/Developer/CoreSimulator/Devices/9863D3D7-0CDA-4173-9D0D-18F2C2264F08/data/Containers/Shared/AppGroup/15E088FC-FF0D-4673-8551-655BC0777510/File%20Provider%20Storage/photospicker/version=1&uuid=9610D22F-9061-4690-B523-C334B801D14E&mode=compatible.jpeg, NSFilePath=/Users/jasonwilliams/Library/Developer/CoreSimulator/Devices/9863D3D7-0CDA-4173-9D0D-18F2C2264F08/data/Containers/Shared/AppGroup/15E088FC-FF0D-4673-8551-655BC0777510/File Provider Storage/photospicker/version=1&uuid=9610D22F-9061-4690-B523-C334B801D14E&mode=compatible.jpeg, NSUnderlyingError=0x600000cd4840 {Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)"}}}}

When I go look at the path on the mac (/Users/.../photospicker/) I do see the "version=1&uuid=9610D22F-9061-4690-B523-C334B801D14E&mode=compatible.jpeg" file and I can open it from the mac.

Expected behavior

No exception should be thrown.

Steps to reproduce the behavior

Screenshots or Videos

Reproduction Link

Configuration

dimonovdd commented 2 years ago

Hi, it is duplicate of #92

centrolutions commented 2 years ago

My bad. I didn't search closed issues before submitting. I understand this is a bug in the simulator.