-[NEAgentExtension beginExtens:123 Failed to start extension : Error Domain=PlugInKit Code=16 "other version in use:

Hi,

I am a developer on MacOSX. I am developing a VPN App on Mac. I have installed our VPN App under /Applications folder and it run very well. When I run my VPN App with Xcode build, The Network Extension tunnel providers sometimes can not be started. And I open the VPN App under /Applications folder,The Network Extension tunnel providers can't not be started too, The details are as follows.



17:26:02.293043 +0800 neagent -[NEAgentExtension beginExtens:123 Failed to start extension com.skyvpn.app.mac.tunnel: Error Domain=PlugInKit Code=16 other version in use: <PKPlugin: 0x7fecc5f488f0 com.skyvpn.app.mac.tunnel (1) EE56639F-F0A4-413D-BE16-6F7DDA2EB0F1 3 (0) /Applications/SkyVPN.app/Contents/PlugIns/SkyVPNTunnel.appex> UserInfo={NSLocalizedDescription=other version in use: <PKPlugin: 0x7fecc5f488f0 com.skyvpn.app.mac.tunnel (1) EE56639F-F0A4-413D-BE16-6F7DDA2EB0F1 (0) /Applications/SkyVPN.app/Contents/PlugIns/SkyVPNTunnel.appex>} 3





How do I kill /Applications/SkyVPN.app/Contents/PlugIns/SkyVPNTunnel.appex>, in order to ensure that the Network Extension tunnel providers can start successfully again.

Thanks,

lslboy

Replies

You should read my posts on this thread, which offers some general hints and tips about dealing with NE providers are macOS. Specifically, it discussed the

pluginkit
tool, which you can use during debugging to avoid confusion like this.

IMPORTANT For your testing proper your should start on a fresh machine. I typically use a VM for this.

Second,

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

You may want to try adding a version number to your extension (CFBundleVersion). It looks like from your log it's set to "1" (default in Xcode) but I'd suggest making it always increasing via the date (may want to include seconds). I'm not sure if this is a problem, but I ran into the same error and we also had a non-increasing version number for our extension (always set to "1.0"). Hope this helps.

Sorry for bringing up an old thread. I too am facing similar problem. Whenever we install newer version of an app from appstore it always fails with same error. It fixes upon restart, but its quite annoying. We are always increasing the CFBundleVersion. @Islboy did you find a solution?

I too have been facing this problem for a while now. I maintain multiple copies of the same code and the app(+extension) is built in multiple places. Let's say Code1 builds app1+extension1 and Code2 builds app2+extension2. Code1 and Code2 are basically the same copies of the code.


If i use app1+extension1, everything works fine. Now if i build Code2 and start the app2, the extension used is still extension1.


Now i delete the DerivedData of Code1 so that app1+extension1 are deleted. Then do a pluginkit -a ./extension2_path. Start app2. The extension refuses to start and on the Console app, i can see Failed to start extension..... other version in use.....


pluginkit -m -v shows an exclamation mark ( !) against the extension.


This is consistently reproducible in all of my machines and also on macOS 10.13, 10.14. It starts to work only when i restart my machine.


Anybody found a solution for this?

Does app1, extension1, app2 and extension2 all have unique bundle IDs?

Do they each have å unique Mach-O main executable UUID? You can get that with the

dwarfdump
tool, for example:
$ dwarfdump --uuid /Applications/TextEdit.app/Contents/MacOS/TextEdit
UUID: 114E4CE0-1E3E-34FB-ACB7-AC1B152DB67B (x86_64) /Applications/TextEdit.app/Contents/MacOS/TextEdit

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"