Most of the time we can use our network system extension (packet tunnel provider) as desired: The main app creates a new manager, saves it, loads it again (otherwise it won't have the correct config for some reason) and then start the connection bound to that manager.
But after several start/stop operations, all of a sudden it stops working. The only two error messages I see in console when trying to start a connection as described above are:
And that's it. Since I have not found any reference for the NEAgentErrorDomain, I have no idea what error 2 is supposed to tell me. Nor do I have any idea why this is happening at all.
This can only be fixed by running systemextensionsctl reset and re-installing the system extension. Then it will work again for some time until the problem repeats.
But after several start/stop operations, all of a sudden it stops working. The only two error messages I see in console when trying to start a connection as described above are:
Code Block neagent NEAgentSession: failed to create the delegate nesessionmanager <our-main-app-id>[476]: Tearing down XPC connection due to setup error: Error Domain=NEAgentErrorDomain Code=2 "(null)"
And that's it. Since I have not found any reference for the NEAgentErrorDomain, I have no idea what error 2 is supposed to tell me. Nor do I have any idea why this is happening at all.
This can only be fixed by running systemextensionsctl reset and re-installing the system extension. Then it will work again for some time until the problem repeats.
Error code 2 in NEAgentErrorDomain translates to “plug-in unavailable”. This describes the problem (that is, it’s raised after the system logs failed to create the delegate) so it doesn’t help you identify the underlying cause. My advice is that you trigger a sysdiagnose after seeing this error and then rummage backwards through the enclosed system log to see if you can spot anything that might indicate the cause.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"