[installd/PackageKit] Known issue with trashed sandbox?

[Q] Is there a known issue with installd or PackageKit where installd would:

  1. try to use a trashed sandbox in /Library/InstallerSandboxes/
  2. fail to extract the embedded .pkg of a distribution to this sandbox (because the sandbox has disappeared in the meantime).
  3. report that the problem is that "Authorization is required to install the packages." (even though the installer(8) command was run via sudo).
  4. purge the invalid sandbox
  5. conclude the failed installation by suggesting to contact the software manufacturer.

?

Yeah i have also noticed this. I was able to resolve the issue on Monterey and BigSur with sudo but on Ventura still face it. Is this an issue from macOS side?

On Ventura, the app performing the installation must have full disk access (System Settings -> Privacy & Security -> Full Disk Access), otherwise moving the installed files from the temporary staging area to the permanent location (a step performed internally as part of the installation procedure) will fail if one of the destination directories is protected. Typically the app needing the additional access is Terminal (for sudo installer ...) or Installer (opening an installer package from Finder).

moving the installed files from the temporary staging area to the permanent location

Do you mean moving the extracted payload files from /Library/InstallerSandboxes/A/B/C to /Applications for instance? Isn't this performed by 'shove'?

In the case I described, the problem happens before the extraction of the payload files. It happens when the .pkg metadata (Distribution for instance) is about to be extracted. A step performed by installd IIRC.

[installd/PackageKit] Known issue with trashed sandbox?
 
 
Q