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

OS Error: Operation not permitted #8

Closed
long1eu opened this issue Jan 1, 2018 · 15 comments
Closed

OS Error: Operation not permitted #8

long1eu opened this issue Jan 1, 2018 · 15 comments

Comments

@long1eu
Copy link
Contributor

long1eu commented Jan 1, 2018

I'm getting : Another exception was thrown: FileSystemException: Creation failed, path = '/var/mobile/Containers/Data/Application/984BEEDA-D355-4429-AD4C-D6D211082B7A' (OS Error: Operation not permitted, errno = 1)
on iOS. Any idea?

@renefloor
Copy link
Contributor

Hmm not sure. I have some questions so I can try to replicate it.
Library version
iOS version
Url you try to load.

If you use 0.2.0, is this an image that also gave problems in 0.1.0? I guess iOS doesn't like files without an extension.

@long1eu
Copy link
Contributor Author

long1eu commented Jan 2, 2018

version 0.2.0
iOS 11.2.1
https://res.cloudinary.com/du8gpvdbl/image/upload/v1511088243/0-1511088243104.png but I'm getting the error for every url

@renefloor
Copy link
Contributor

renefloor commented Jan 2, 2018

Hmm.. strange. I'm going to have a look at it.

@long1eu
Copy link
Contributor Author

long1eu commented Jan 2, 2018

Bedankt!

@renefloor
Copy link
Contributor

renefloor commented Jan 2, 2018

I cannot reproduce it, but my path is the following:
/Users/rene/Library/Developer/CoreSimulator/Devices/E480FE42-3C1C-477D-AA2F-B5B74FF244FB/data/Containers/Data/Application/31970312-CC93-4FDB-9F87-7EE9176B641D/Library/Caches/cache/601ee310-d2d0-11e7-b450-2b33870382f5

So after Application/{id} it still has Library/Caches/cache/...
I can imagine that if it tries to create the folder for the application it fails.

I almost think it has something to do with path_provider, but I don't really understand this. Is it also broken when you start a new clean project and only try to show this image?

@long1eu
Copy link
Contributor Author

long1eu commented Jan 3, 2018 via email

@polbatllo
Copy link

I'm also having this issue, although it's only happening in a real device, not in the simulator.

@renefloor
Copy link
Contributor

Hmm.. I am mostly an Android dev, so I have no experience at all with the iOS file system. But I am trying to get my head around it.
I tried it on an iPad and that worked fine. Do you have a release build or do you build from Intellij? Do you try it on an iPad or an iPhone.

@polbatllo
Copy link

Not at the minute.. but to reproduce you need to:

  • On a physical device, run the application, load the images you want and then, shut down the app, completely.
  • Run the application again and head to those images.

Once I have a computer around I'll gather some logs and attach them here :)

@renefloor
Copy link
Contributor

renefloor commented Jan 4, 2018

I just had a look at the apple docs on the file system.
My current suspection is that the part before /Library is not fixed. I'll have a look at that when I have access to an iOS device ;).
If you are earlier than me, try to log getTemporaryDirectory() and then log the path of the file.

Maybe it would be better to only store the filename anyhow and get the temp directory every time the cache manager is initialized.

Edit: Looks like I have to make a breaking change indeed:
https://stackoverflow.com/a/25235157/2999543

I'd better do this quick 😅

@renefloor
Copy link
Contributor

Could you confirm that the issue is fixed if you use the following dependency?

cached_network_image:
    git:
      url: git://github.com/renefloor/flutter_cached_network_image.git
      ref: develop

@renefloor renefloor added the bug label Jan 4, 2018
@polbatllo
Copy link

Sorry for the delay @renefloor . I've been on holiday. I confirm the issue is fixed on that dependency.

Awesome.

@renefloor
Copy link
Contributor

No problem, I'll probably make a new release today.

@renefloor
Copy link
Contributor

Just released the fix in 0.2.1

@polbatllo
Copy link

Awesome. Thanks.

@expilu expilu mentioned this issue Jul 23, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants