Network Extension does not communicate with the Daemon

Hello,

I've tried following this thread: https://developer.apple.com/forums/thread/134013 for getting my network extension to communicate via XPC with the daemon, but I keep getting this error:

from Console.app

Sandbox: "App name"(57277) deny(1) mach-lookup "bundle id"

I can see that the daemon is running and when I try setting up the listener for it, it doesn't actually call the delegate function,  func listener(_ listener: NSXPCListener, shouldAcceptNewConnection newConnection: NSXPCConnection) which causes the connection in the network extension as well the host app to not be able to actually communicate with the daemon.

Any ideas on how to fix it? Thanks

Accepted Answer

What do the entitlements for your Network System Extension look like? Do they contain the MachService that your Daemon is using in com.apple.security.temporary-exception.mach-lookup.global-name? For example:

<key>com.apple.security.temporary-exception.mach-lookup.global-name</key>
<array>
	<string>com.example.testbed.extension.Daemon</string>
</array>

That would prevent any Sandboxed process from communicating with your Daemon.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Network Extension does not communicate with the Daemon
 
 
Q