Silent Failures When Accessing Files & Folders

I was struggling with an issue where KBM access to files/folders within my home directory would not work. Specifically, I was using a "for each item" action to iterate the contents of a folder. As a test, I was simply displaying the path of each the file in a folder to a window and there were NO WINDOWS displayed when the macro was executed. However, a 'sibling' folder to the one I was interested in ran as expected, as did the macro when the folder was set to the parent folder of the one I was interested in.

Now that I determined the issue, I thought it may be worthwhile to mention it here in case others bump up against the same issue.

It took a bit of sleuthing, but I finally noticed that when I looked at the directory listing of folders that worked and those that did not - the ones that were silently failing had an '@' following the file attributes section. The '@' indicates that there are extended attributes for this file/folder. When I queried the extended attributes, I observed that the folders which were silently failing all had the same extended attribute: It seems that this attribute is used to protect some folders from applications that do not have Full Disk Access granted.

Once I granted Keyboard Maestro full disk access, the actions would run as expected.

In my particular case, I was attempting to access ~/Library/HomeKit (which has the '' extended attribute applied).

If I understand your post correctly, this is the solution.
If not, please reply with the solution.

I am not sure if that is a "solution" or a workaround.

Perhaps the question at hand is - could KM alert the user to the problem rather than failing silently?

@rkaplan - Questioning the terminology is a fair point. In the end, I opted for 'solution' since KM is not the only app to be impacted by this, ALL apps are affected. Any app that is not granted full disk access will have a similar issue. So this is not really a workaround, as the (perceived) problem is actually an operating system 'feature'. For example, when I revoke Full Disk Access from terminal and then do a simple directory listing of a folder with this extended attribute, the command also fails.

Of course, if there is any way for KBM to warn of this at design or runtime, that would also be of immense help. When I searched around the forums, there was nothing documenting this attribute nor the observed behaviors, so I wanted to have at least something.

1 Like

@JMichaelTX - Granting 'Full Disk Access' to 'Keyboard' was the solution to access files/folders with the '' extended attribute.

However, as @rkaplan, suggested - perhaps there is something that KBM can detect (either at design time or runtime) to alert the user to this issue