Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIle image picker doesn't work on latest IOS 14 #405

Closed
lecicdjuro opened this issue Sep 23, 2020 · 9 comments
Closed

FIle image picker doesn't work on latest IOS 14 #405

lecicdjuro opened this issue Sep 23, 2020 · 9 comments
Labels
bug Something isn't working iOS Issue applies to iOS platform

Comments

@lecicdjuro
Copy link

file_picker:2.0.1+1

Describe the bug
I have granted photos permission before a pick image files, and after i pick one, i got an error

  • -[FilePickerPlugin picker:didFinishPicking:] [Line 351]
    2020-09-23 13:12:41.697062+0200 Runner[1342:413734] [default] [ERROR] Could not create a bookmark: NSError: Cocoa 257 "The file couldn’t be opened

Issue details

  1. IOS
  2. 14
  3. jpg
  4. pick a single file type image

Error Log

  • -[FilePickerPlugin picker:didFinishPicking:] [Line 351]
    2020-09-23 13:12:41.697062+0200 Runner[1342:413734] [default] [ERROR] Could not create a bookmark: NSError: Cocoa 257 "The file couldn’t be opened

Flutter Version details
1.22.0-12.1.pre

@lecicdjuro lecicdjuro added the new issue An issue that hasn't yet been seen from the maintainer label Sep 23, 2020
@miguelpruivo
Copy link
Owner

Related to #406.

@miguelpruivo miguelpruivo added bug Something isn't working iOS Issue applies to iOS platform wip and removed new issue An issue that hasn't yet been seen from the maintainer labels Sep 23, 2020
@miguelpruivo
Copy link
Owner

@lecicdjuro this should be fixed with 2.0.1+2. Would you mind give it a try and see if it's working for you?

@lecicdjuro
Copy link
Author

lecicdjuro commented Sep 24, 2020

@miguelpruivo The issue is still present. The first pick works ok, and also every next if you choose the same file, but if i choose some other item from the picker, I get an error message
ERROR] Could not create a bookmark: NSError: Cocoa 257 "The file couldn’t be opened because you don’t have permission to view it." }

@miguelpruivo
Copy link
Owner

@lecicdjuro yes, there’s still an issue with it for iOS 14. I’m investigating.

@miguelpruivo
Copy link
Owner

miguelpruivo commented Sep 28, 2020

Hey y'all, could you please give it a try pointing to:

file_picker:
    git:
      url: https://github.com/miguelpruivo/flutter_file_picker
      ref: fix/ios14-picker

And let me know if it's working for you?

There are still a few minor issues with the PHPicker on their end (Apple) that have been reported and they're fixing it, but it should be stable enough for it to work.

Specially, that one that you've mentioned @lecicdjuro, check it here.

@miguelpruivo
Copy link
Owner

This should be fixed with 2.0.6.

Feel free to reopen this or report on #407 if you still encounter any issue related to it.

Thank you!

@adnankhan74444
Copy link

[ERROR] Could not create a bookmark: NSError: Cocoa 257 "The file couldn’t be opened because you don’t have permission to view it." }

@miguelpruivo
Copy link
Owner

@adnankhan74444 ignore it. That hasn't any effect.

@sproutlyCaleb
Copy link

sproutlyCaleb commented Dec 16, 2021

I am getting this error. The picker opens fine and I am able to select images from my gallery but afterwards I get this error.

file_picker: ^4.2.7

***** Picker:<PHPickerViewController: 0x10af2a2b0> didFinishPicking:(
"<PHPickerResult: 0x2833bf240>",
"<PHPickerResult: 0x2833a2f40>",
"<PHPickerResult: 0x2833a3800>"
)

  • -[FilePickerPlugin picker:didFinishPicking:] [Line 401]
    [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." }
    [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." }
    [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." }
    Error copying file type public.item. Error: Error Domain=NSItemProviderErrorDomain Code=-1000 "Cannot load representation of type public.item" UserInfo={NSLocalizedDescription=Cannot load representation of type public.item, NSUnderlyingError=0x283d0aeb0 {Error Domain=NSCocoaErrorDomain Code=4101 "Couldn’t communicate with a helper application." UserInfo={NSUnderlyingError=0x283d000c0 {Error Domain=PHAssetExportRequestErrorDomain Code=3 "(null)" UserInfo={NSUnderlyingError=0x283d0b9c0 {Error Domain=CloudPhotoLibraryErrorDomain Code=1005 "Disk space is very low" UserInfo=0x28338ae80 (not displayed)}}}}}}

***** Could not load the picked given file: Error Domain=NSItemProviderErrorDomain Code=-1000 "Cannot load representation of type public.item" UserInfo={NSLocalizedDescription=Cannot load representation of type public.item, NSUnderlyingError=0x283d0aeb0 {Error Domain=NSCocoaErrorDomain Code=4101 "Couldn’t communicate with a helper application." UserInfo={NSUnderlyingError=0x283d000c0 {Error Domain=PHAssetExportRequestErrorDomain Code=3 "(null)" UserInfo={NSUnderlyingError=0x283d0b9c0 {Error Domain=CloudPhotoLibraryErrorDomain Code=1005 "Disk space is very low" UserInfo=0x28338ae80 (not displayed)}}}}}}

  • -[FilePickerPlugin picker:didFinishPicking:]_block_invoke [Line 428]
    Error copying file type public.item. Error: Error Domain=NSItemProviderErrorDomain Code=-1000 "Cannot load representation of type public.item" UserInfo={NSLocalizedDescription=Cannot load representation of type public.item, NSUnderlyingError=0x283d12430 {Error Domain=NSCocoaErrorDomain Code=4101 "Couldn’t communicate with a helper application." UserInfo={NSUnderlyingError=0x283d08c30 {Error Domain=PHAssetExportRequestErrorDomain Code=3 "(null)" UserInfo={NSUnderlyingError=0x283d0a7c0 {Error Domain=CloudPhotoLibraryErrorDomain Code=1005 "Disk space is very low" UserInfo=0x28338be20 (not displayed)}}}}}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working iOS Issue applies to iOS platform
Projects
None yet
Development

No branches or pull requests

4 participants