Page 1 of 1

XC0012: XProc does not get access to directory on Mac

Posted: Tue Sep 19, 2023 6:35 pm
by afuchs
Hello,

I am new to XProc, and hope therefore that this is something elementary, which can be solved in two clicks.
I have added to my pipeline, which worked well, read and wrote files in its directory, a p:directory-list step.

Code: Select all

<p:directory-list path="'IN'"/>
(I have changed 'IN' to many different things including an empty string. It does not make a difference.)
Now it fails with the message:

Code: Select all

Engine name: Add-on for Calabash XProc Engine
Severity: error
Description: err:XC0012 : XC0012 It is a dynamic error if the contents of the directory path are not available to the step due to access restrictions in the environment in which the pipeline is run.
I work on a Mac.
I have added OxygenXML as well as /opt/homebrew/calabash and also ruby to the "Full Disc Access" list.

What am I doing wrong?

Thank you in advance,
Alexey

Re: XC0012: XProc does not get access to directory on Mac

Posted: Wed Sep 20, 2023 11:08 am
by adrian
Hi,

I'm afraid that this may be a macOS security problem rather than an XProc problem. Check if it does have access to the folder where the pipeline is run.
In the macOS settings under "Privacy and Security" check both "Full Disk Access" and "Files and Folders" (check for Documents or Desktop depending on where your files are located)
Note that if you run Calabash from the command line, you may also have to add to those lists the "java" executable that it is using.

Regards,
Adrian

Re: XC0012: XProc does not get access to directory on Mac

Posted: Thu Sep 21, 2023 10:41 am
by afuchs
Hi Adrian,

Thank you for the reply. It probably is a Mac security issue, but it cannot be something that is uncommon, I guess.
I have added calabash and java and jar to the "Full Disk Access" list, but it does not solve the problem I'm afraid.
I would be very thankful for any further suggestions.

Best,
Alexey

Re: XC0012: XProc does not get access to directory on Mac

Posted: Tue Sep 26, 2023 8:57 am
by adrian
Hi,

My best guess is that it's not looking for the files in the expected location.
Try other values for p:directory-list/@path. I see that @path is of type xsd:anyURI:
http://www.datypic.com/sc/xproc/e-p_directory-list.html
Perhaps try an absolute file URL, or an absolute file path (should work on macOS).

Regards,
Adrian