Hi Matt,
SampleGUI.app is not a container app for system extension. Here we bundled SampleSysExtHost.app (container app for extension) inside SampleGUI.app as below:
** /Applications/SampleGUI.app/Contents/Applications/SampleSysExtHost.app ** and container app structure is as below:
SampleSysExtHost.app
Contents/
MacOS/
SampleSysExtHost
_CodeSignature/
embedded.provisionprofile
Info.plist
Library/
SystemExtensions/
my.sysext.bundleid.systemextension
PkgInfo
Resources/
Based on your input on bundling issue, I did an experiment where container app is not bundled in SampleGUI.app and distributed it along side SampleGUI.app that will be installed as /Applications/SampleSysExtHost.app. With this change, the issue is not resolved. Experiment details given below:
Scenario:
- Installed version 4.3.2.10 as /Applications/SampleSysExtHost.app
- Upgraded to 4.3.2.11 . System extension upgrrade failed.
Observations:
On BIG SUR 11.6 and 12.4:
- sysexxtd log shows:
default 12:11:04.335985+0530 sysextd /Applications/SampleSysExtHost.app/Contents/Library/SystemExtensions/my.sysext.bundleid.systemextension: package type not `DEXT`
default 12:11:04.335985+0530 sysextd /Applications/SampleSysExtHost.app/Contents/Library/SystemExtensions/my.sysext.bundleid.systemextension: entitlement `com.apple.developer.endpoint-security.client` not present or not true
default 12:11:04.336046+0530 sysextd activateDecision found existing entry of same version: state activated_enabled, ID D888D9B7-53B5-4728-9C16-E3294A73BA3F
default 12:11:04.336103+0530 sysextd initial activation decision: requestAppReplaceAction()
default 12:11:04.336127+0530 sysextd notifying client of activation conflict
default 12:11:04.337141+0530 sysextd client approved continuing upgrade for my.sysext.bundleid
default 12:11:04.337215+0530 sysextd attempting to realize properties with identifier my.sysext.bundleid
default 12:11:04.337300+0530 sysextd UNIX error exception: 3
default 12:11:04.340020+0530 sysextd UNIX error exception: 3
default 12:11:04.344399+0530 sysextd sysextd/daemon_ipc_nsxpc.swift:16: Fatal error: unable to extract client info from connection
- Crashed at same place:
Thread 1 Crashed:: Dispatch queue: sysextd.extension_manager
0 libswiftCore.dylib 0x00007fff2c899367 _assertionFailure(_:_:file:line:flags:) + 1767
1 sysextd 0x000000010aab074c 0x10aa7c000 + 214860
2 sysextd 0x000000010aab338d 0x10aa7c000 + 226189
3 sysextd 0x000000010aab0fbf 0x10aa7c000 + 217023
4 sysextd 0x000000010aab101f 0x10aa7c000 + 217119
5 com.apple.Foundation 0x00007fff213a0c86 __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S1__ + 10
6 com.apple.Foundation 0x00007fff2134bb88 -[NSXPCConnection _decodeAndInvokeMessageWithEvent:flags:] + 2271
7 com.apple.Foundation 0x00007fff21303039 message_handler + 206
8 libxpc.dylib 0x00007fff20200c24 _xpc_connection_call_event_handler + 56
9 libxpc.dylib 0x00007fff201ffa9b _xpc_connection_mach_event + 938
10 libdispatch.dylib 0x00007fff203108a6 _dispatch_client_callout4 + 9
11 libdispatch.dylib 0x00007fff20327aa0 _dispatch_mach_msg_invoke + 444
12 libdispatch.dylib 0x00007fff20316493 _dispatch_lane_serial_drain + 263
13 libdispatch.dylib 0x00007fff203285e2 _dispatch_mach_invoke + 484
14 libdispatch.dylib 0x00007fff20316493 _dispatch_lane_serial_drain + 263
15 libdispatch.dylib 0x00007fff203170ad _dispatch_lane_invoke + 366
16 libdispatch.dylib 0x00007fff20320c0d _dispatch_workloop_worker_thread + 811
17 libsystem_pthread.dylib 0x00007fff204b745d _pthread_wqthread + 314
18 libsystem_pthread.dylib 0x00007fff204b642f start_wqthread + 15
Later, On big sur 11.6, I even observed that the new extension is activated with user approval, leading to 2 system extensions with same bundle ID in state activated enabled.
The problems with this state are:
- We can not deactivate older version system extension even with system extension API request. The only way is to disable SIP and deactivate using systemextensionsctl reset.
QUES: When SIP dependency will be removed to deactivate system extension using systemextensionsctl ?
QUES: Are you planning to add ability to systemextensionsctl to deactivate system extension based on bundleId and version? It will be helpful to deactivate stale older version system extensions as explained in my scenario.
So the issue still occurs even when container app distributed as separate app => this clarifies no issue with existing bundling..right?
Now I am wondering what is causing this issue? Can any of the following cause this upgrade issue?
-
Above log says the entitlement com.apple.developer.endpoint-security.client
not present or not true for system extension. Can this cause issue while upgrading?
-
'systemextensionsctl list' command output shows the system extension version as 4.3.2.123/4.3.2.123. This versioning can cause issue?