Jump to content
You must now use your email address to sign in [click for more info] ×

Recommended Posts

Hi!
 
I am using Affinity Photo on macOS Big Sur 11.6
hardware acceleration (in Preferences > Performance) is ON
I am typically working on images about 40 MB big, then after editing the file size can get as big as 600-800 MB. This time I was using only Affinity Photo, all other apps were closed and my computer was on Airplane mode without wifi or bluetooth activated.
 
I had already edited and saved tens of pictures, everything went well, and then suddenly with one edited picture I got the message “Failed to save document: …. because you do not have permission…” (See Screenshot). 
I could not find a way to make it work and had to restart Affinity Photo (= editing lost).
Even trying to Save As in another location would not work.
 
Why does this happen? Is there a workaround to avoid loosing the edited picture/file?
 

Screenshot.png

Link to comment
Share on other sites

  • Staff

Hey miss_c,

I'm sorry to hear this. May I ask if you have the App Store Version? Can you take a guess at how many fonts you have installed? If you have tens of hundreds it could be due to Apple's Sandboxing.

Are you now in a position to be able to save? Have you restarted the machine etc?

Link to comment
Share on other sites

Hi Chris B,

I do have the App Store version indeed.

I have only the system fonts installed. I keep my computer very lean, my internal HD is empty to 90%.

MacBook Pro (16-inch, 2019)

Processor 2.4 GHz 8-Core Intel Core i9

Memory 64 GB 2667 MHz DDR4

Graphics AMD Radeon Pro 5600M 8 GB

Thank you and yes, of course, after a fresh restart it solves the issue but it is a bother to loose an edit ;):) 

Kind regards!

 

Link to comment
Share on other sites

  • Staff

Hey miss_c,

Apparently there is another sandbox limitation where you can have 'too many' files open. I was not actually aware of this one.

Which, might make sense from this quote 'I had already edited and saved tens of pictures, everything went well, and then suddenly with one edited picture I got the message “Failed to save document'

Also, could you please go to your System Preferences > General and let me know what the limit is set to for 'Recent items' - by default I believe it's 10 but you can set this to 50.

 

Link to comment
Share on other sites

Hi Chris B,

My System Preferences > General > Recent items is currently set to 5. 

However - it has been so over a year and I do not recall I would get that "unable to save" error when I would have 6 open RAWs. Do you think it is linked?

What do you suggest?

Kind regards and thank you for your prompt support 😃
 

Link to comment
Share on other sites

  • Staff

Try changing the default from 5 to 10 or 20 - I think 10 is factory default. I often have that many files open in the app but I do not always try and save them - I will give this a go and attempt to reprduce. If it turns out to be a sanbox issue, we ought to handle it better because losing work is unacceptable. 

Link to comment
Share on other sites

Hi, I deleted Affinity Photo with all its related files and plists (using AppDelete) and reinstalled it from the App Store. The first restart of the Affinity Photo took ages, but since then its working fine and I am able to save and export to whatever location I want. 

Link to comment
Share on other sites

6 hours ago, Chris B said:

Do you recall seeing any permission requests when you first attempted to save?

No, there was no permission request when I restarted Affinity Photos. I already set full disk access long time ago (and it didn't help).

To my surprise, even when I deleted Affinity Photo with all its dependent files, it still showed me the full file history after the reinstallation (which I appreciated very much, but shows that AppDelete didn't capture all dependent files probably...)

Link to comment
Share on other sites

  • Staff

There will likely be some folders left behind which I think is normal. Sometimes a reinstall doesn't fix something but a reset does (as the uninstall leaves some folders but the reset targets them).

Feel free to wake this thread up if you experience the issue again - thanks! 

Link to comment
Share on other sites

...this time I only deleted all dependent files (again with AppDelete) and started Affinity Photos again. It took only 12 seconds and I'm able to save on whatever location on disk I want... So to me it looks that one or more of those files that are created by Affinity Photos is causing troubles. I therefore attached a printscreen of all files deleted by AppDelete. 

Bildschirmfoto 2021-10-14 um 22.47.30.png

Link to comment
Share on other sites

  • Staff

Hey chho,

I suspect this definitely the macOS sandbox file limitation. Unfortunately, there's no way for our app (or any sanboxed app) to query what that limit is:

https://buckleyisms.com/blog/anecdotes-about-the-macos-sandbox-file-limit/#:~:text=macOS only allows sandboxed apps to access a,the number of files open by other apps

We don't get this issue when the app is purchased through our own store so this further backs up that it's a sandboxing issue (just like the font sandbox issue) :( 

Link to comment
Share on other sites

  • Staff

Hey chho,

It isn't particular files - it's something that cannot be queried and it's something Apply introduce for security reasons. From that link:

'macOS only allows sandboxed apps to access a limited number of files at a time, but there is no way for an app to query how many files it can open, or if it’s close to the limit. In fact, this limit is dependent on the amount of RAM installed in the computer and the number of files open by other apps.'

What we should do is implement (if possible) someting to stop loss of work. 

Link to comment
Share on other sites

Hi Chris

I understand your argument, but... 🙂 ... if I delete all dependent files, but not the app itself, the problem is solved. So what _if_ you (Affinity Photo) deletes them when closing the app? 

From my point of view, it must have a relation to those open files. And since there are only a few (as you can see on my printscreen), I'm not 100% convinced that it is (only) this sandboxing issue. I have a lot of apps from the App Store that have more files open and are working fine.

Maybe next time when I run into this issue I only delete one after the other dependent file to see if there is a certain file that triggers this behaviour. At the end you might be right, but one never knows... ;-)    

Link to comment
Share on other sites

  • Staff

Well I am also not absolutely 100% sure it is a sandboxing issue. On a personal level, I find macOS and its permissions infuriating but I have never had loss of work because it refuses to save so I can only sympathise with you. We definitely need to try and handle it better if we can.

I will keep pushing dev for info because it seems to be popping up a bit more.

Link to comment
Share on other sites

PS: Please note, that, at least in my situation, only saving files to locations other than iCloud is affected by this issue. Saving to iCloud always worked for me and I never lost files, but it's extremely cumbersome to save files to iCloud and move it back to the original location (again and again...). 

Link to comment
Share on other sites

  • Staff

Can we check to see if it is a sandboxing limitation? Please see this link - 

I am surprised iCloud is letting you save to it - I would have assumed that the sandboxing would apply to any location. The file limit stacks with sandboxed app that is open and includes files, fonts and plugins. So two sandboxed apps open and attempting to access a few thousand fonts, plugins and files (open and closed) will take you over the limit in that session.

Link to comment
Share on other sites

I now deleted the following to files, and hurray, afphoto can be saved again!

/private/var/folders/s3/7b8x3cl13mx5ds0d500n637m0000gn/T/com.seriflabs.affinityphoto

/private/var/folders/s3/7b8x3cl13mx5ds0d500n637m0000gn/C/com.seriflabs.affinityphoto

 

Link to comment
Share on other sites

Hi Chris B,

Yes, I initially went from 5 to 10 and then the error happened again at 10 files. 

So now, I did increase it again from 10 to 50 but it's a bother to know that it will happen again next time I process a lot of files in a row... So basically I have to get used to restart my Affinity Photo once in a while to avoid issues...

Kind regards,

Link to comment
Share on other sites

  • 4 weeks later...
On 10/18/2021 at 4:42 PM, chho said:

I now deleted the following to files, and hurray, afphoto can be saved again!

/private/var/folders/s3/7b8x3cl13mx5ds0d500n637m0000gn/T/com.seriflabs.affinityphoto

/private/var/folders/s3/7b8x3cl13mx5ds0d500n637m0000gn/C/com.seriflabs.affinityphoto

 

Hi Chris B

Do you have any news regarding this workaround? Is your development going to implement an option that deletes those file during startup? At the moment I'm deleting them manually every few days, which is cumbersome and nagging.

Cheers

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.