ignoring mis-configured plug-in at /Path/xx.appex: plug-ins outside containing apps must be protected by SIP.

Hi all,

I'm trying to add a Finder Sync (FinderSync) extension (appex) to our macos application. I wanted to provide custom contextual menu items that perform file and folder management tasks.

However, extension installation errors occur in some systems:

error 13:56:21.324867+0900 pkd [d ] [u 23575956-D35A-4548-8C72-207FC055E72F] [()] rejecting; Ignoring mis-configured plugin at [/Library/Application Support/test/bin/ScanExtension.app/Contents/PlugIns/ScanExtensionScan.appex]: plug-ins outside containing apps must be protected by SIP.
error 13:56:22.468347+0900 pkd [d ] [u 23575956-D35A-4548-8C72-207FC055E72F] [()] rejecting; Ignoring mis-configured plugin at [/Library/Application Support/test/bin/ScanExtension.app/Contents/PlugIns/ScanExtensionScan.appex]: plug-ins outside containing apps must be protected by SIP.
error 14:02:56.228344+0900 pkd [d ] [u 23575956-D35A-4548-8C72-207FC055E72F] [()] rejecting; Ignoring mis-configured plugin at [/Library/Application Support/test/bin/ScanExtension.app/Contents/PlugIns/ScanExtensionScan.appex]: plug-ins outside containing apps must be protected by SIP.


This error does not happen 100% of the time. Sometimes, I can successfully add extensions to some of our systems.

In the environment where the installation fails, I have tried adding our ScanExtensionScan.appex to [Security & Privacy Preferences/Privacy/Full Disk Access] to check if this is an app permission problem and I was able to install the extension successfully.


Below are the information about our extension:

ScanExtensionScan.entitlements

fbtest@fbtestnoMac-mini build_debug % codesign -d --entitlements :- /Library/Application\ Support/test/bin/ScanExtension.app/Contents/PlugIns/ScanExtensionScan.appex
Executable=/Library/Application Support/test/bin/ScanExtension.app/Contents/PlugIns/ScanExtensionScan.appex/Contents/MacOS/ScanExtensionScan
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>co.jp.fuva-brain.scanextension</string>
</array>
<key>com.apple.security.temporary-exception.files.absolute-path.read-write</key>
<array>
<string>/</string>
</array>
<key>com.apple.security.temporary-exception.files.home-relative-path.read-write</key>
<array>
<string>/</string>
</array>
</dict>
</plist>


Codesigning our plugin with the cert:

codesign --sign <cert> --entitlements ScanExtensionScan.entitlements --force /Library/Application\ Support/test/bin/ScanExtension.app/Contents/PlugIns/ScanExtensionScan.appex


Questions:
What are the possible reasons why we can install our app extension on some environments and fail on others, sometimes on the same environment?
How do we guarantee 100% success on adding and activating extensions without adding it to Full Disk Access?

Thanks in advance for your help.

Accepted Reply

This specific error indicates that PlugInKit (the internal infrastructure behind app extensions) believes that your appex is not contained within an app. Such appexes are not supported for third-party development and thus must be protected by SIP (typically this means they’re part of the /System hierarchy).

As to why this is happening, that’s not at all clear. In my experience PlugInKit can be a bit cantankerous on the Mac. Part of that is because it relies on the Launch Services database and the Mac is sufficiently flexible that the LS database can be out of sync with reality.

How are you planning to deploy your app to customers? Via the Mac App Store? Or independently, using Developer ID?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"

Replies

This specific error indicates that PlugInKit (the internal infrastructure behind app extensions) believes that your appex is not contained within an app. Such appexes are not supported for third-party development and thus must be protected by SIP (typically this means they’re part of the /System hierarchy).

As to why this is happening, that’s not at all clear. In my experience PlugInKit can be a bit cantankerous on the Mac. Part of that is because it relies on the Launch Services database and the Mac is sufficiently flexible that the LS database can be out of sync with reality.

How are you planning to deploy your app to customers? Via the Mac App Store? Or independently, using Developer ID?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Thanks The Eskimo,
I am planning to deploy my app to customers independently, using Developer ID.
Is there any difference between the two method?

I am planning to deploy my app to customers independently, using
Developer ID. Is there any difference between the two method?

Yes. There are lots of difference in general — for example, a Developer ID product can use temporary entitlements to extend the App Sandbox without worrying about App Review — but in this specific case the issue relates to installation. An Mac App Store app is always installed by the system in the Applications directory. While users can move it from there, they rarely do. In contrast Developer ID apps often end up in all sorts of weird places, and that flexibility makes things harder for LS and PlugInKit.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"