packages icon indicating copy to clipboard operation
packages copied to clipboard

An error occurred in the destination for the data.

Open MarcelRei opened this issue 4 years ago • 8 comments

Hi,

I am trying to build a package which contains a Python Framework. I try to add the Framework as a Payload and get an error when I expand everything and try to save my work before building it. "The document “DEP_munki” could not be saved. An error occurred in the destination for the data." I am using macOS Big Sur and I even tried the developer beta of Monterey. I have no issue with the same project on Catalina. I am using the pythonframework from the munki repository.

MarcelRei avatar Jun 18 '21 08:06 MarcelRei

It could be a Full Disk Access restrictions. See http://s.sudre.free.fr/Software/Packages/Q&A_7.html

packagesdev avatar Jun 26 '21 13:06 packagesdev

Nope, I set those. And this only happens with the Python Framework so far. I redownloaded it a few times to be sure it is not the file I have that is corrupt.

MarcelRei avatar Jun 27 '21 07:06 MarcelRei

I'm wondering whether it's not related to this:

https://twitter.com/jmfd/status/1384264578763083779

packagesdev avatar Jun 28 '21 20:06 packagesdev

I have to say that I don't understand that tweet so maybe, but I can't tell.

MarcelRei avatar Jul 12 '21 15:07 MarcelRei

Apple introduced a regression in Big Sur with one of the basic functions to save property list (.plist) on disk. Packages uses one of these functions.

packagesdev avatar Jul 16 '21 22:07 packagesdev

Is there a restriction on how many levels of subfolders can be used within the payload? As shown in the below screenshot, I started this project by adding the FOA folder. I then expand one level at a time and save. This works well until I "expand one level" the 512 folder. Having done that and then attempting to save, I get a 'The document “ATK for Reaper.pkgproj” could not be saved. An error occurred in the destination for the data.' error. If I remove the subfolders of 512 I am again able to save.

Screenshot 2021-11-03 at 12 43 13

lossius avatar Nov 03 '21 11:11 lossius

Reverting to packages v. 1.1.2 made this problem go away, so it seems to be a restriction on folder depth introduced at some point since then.

lossius avatar Nov 03 '21 13:11 lossius

So the problem is indeed due to a bug in Apple's frameworks.

It's not impossible that the problem does not appear with version 1.1.2 because this version might not have been using the same conversion API.

I will add a workaround in version 1.2.10.

packagesdev avatar Dec 03 '21 00:12 packagesdev