yasirkula / UnityNativeGallery

A native Unity plugin to interact with Gallery/Photos on Android & iOS (save and/or load images/videos)
MIT License
1.4k stars 199 forks source link

Some videos on iOS trigger a permission errors #178

Open tarunlightup opened 3 years ago

tarunlightup commented 3 years ago

Description of the bug

Some videos on iOS trigger a permission error. This particular video was an mp4 that is ~800MB downloaded from google drive and then shared from the iOS files app to Photos. Most other photos and videos are working as expected. Please contact me (tarun@lightup.io) if you would like a link to the specific video to test with.

Reproduction steps

  1. Download an 800MB mp4 from google drive (Contact me for specific video)
  2. Add it to Photos from the Files app
  3. Try to load it via Native Gallery

Platform specs

Please provide the following info if this is a Unity 3D repository.

Additional info

2021-04-01 14:32:01.830363-0700 App[1390:631081] Picked a video
2021-04-01 14:32:02.079722-0700 App[1390:631751] [default] [ERROR] Could not create a bookmark: NSError: Cocoa 257 "The file couldn’t be opened because you don’t have permission to view it." }
2021-04-01 14:32:02.526319-0700 App[1390:631751] Error copying file type public.movie. Error: Error Domain=NSItemProviderErrorDomain Code=-1000 "Cannot load representation of type public.movie" UserInfo={NSLocalizedDescription=Cannot load representation of type public.movie, NSUnderlyingError=0x2831f0bd0 {Error Domain=NSCocoaErrorDomain Code=4097 "Couldn’t communicate with a helper application." UserInfo={NSUnderlyingError=0x2831e7b70 {Error Domain=NSCocoaErrorDomain Code=4097 "connection on anonymousListener or serviceListener from pid 1394" UserInfo={NSDebugDescription=connection on anonymousListener or serviceListener from pid 1394}}}}}
2021-04-01 14:32:02.526467-0700 App[1390:631751] Error getting the picked video's path: Error Domain=NSItemProviderErrorDomain Code=-1000 "Cannot load representation of type public.movie" UserInfo={NSLocalizedDescription=Cannot load representation of type public.movie, NSUnderlyingError=0x2831f0bd0 {Error Domain=NSCocoaErrorDomain Code=4097 "Couldn’t communicate with a helper application." UserInfo={NSUnderlyingError=0x2831e7b70 {Error Domain=NSCocoaErrorDomain Code=4097 "connection on anonymousListener or serviceListener from pid 1394" UserInfo={NSDebugDescription=connection on anonymousListener or serviceListener from pid 1394}}}}}
yasirkula commented 3 years ago

This is the only relevant thread I could find: https://developer.apple.com/forums/thread/661834. iOS team replied with:

The error means your selected asset isn’t available locally and the picker is unable to download it from the cloud. Please make sure you have a reliable internet connection

Don't know how accurate this answer is but I don't know any more than they do.