We are seeing cases where DeviceActivityMonitoring
extension is crashing permanently. This is due to a now-fixed bug that was causing a stack overflow. On devices where the extension crashed, it appears permanently unable to recover - even weeks after the crash and after multiple restarts of the device.
It looks like recovery is being attempted, as the same four NSLog activities are emitted roughly every second that the phone is active.
Logs:
Process: DeviceActivityMonitoring
Activity: beginning extension request
Message: NSExtensionPrincipalClass `<private>` does not conform to NSExtensionRequestHandling protocol!
Process: DeviceActivityMonitoring
Activity: Loading Preferences From User Session CFPrefsD
Message:
Process: DeviceActivityMonitoring
Activity: container_system_group_path_for_identifier
Message: Requesting container lookup; class = 13, identifier = <private>, group_identifier = <private>, create = 1, temp = 0, euid = 501, uid = 501
container_query_get_single_result: success
container_system_group_path_for_identifier: success
Process: DeviceActivityMonitoring
Activity: container_create_or_lookup_app_group_path_by_app_group_identifier
Message: Requesting app group container lookup; personaid = 1000, type = DEFAULT, name = 9F7F4BA7-79CF-453C-B81C-568E96ADB711, origin [pid = 29, personaid = 199], proximate [pid = 3505, personaid = 199], identifier = <private>, euid = 501, uid = 501, platform = 2
containermanagerd stat [<private>]: exists: 1, isDirectory: 0, fsNode: <~~~>
containermanagerd <private> is sandboxed. Issuing token for path: [<private>] (extension class: com.apple.sandbox.application-group)
containermanagerd [0] command=38, client=<<~~~>, u=<501/501/~~/0/1000>, uid=501, pid=5595, sandboxed=1, platform=2 (1/1/0) [<~~~>], cached, cs cached>, error=(null)
Consuming sandbox extension; path = [<private>], key = 0
Revoking sandbox extension; key = 0
-
Can anyone provide some insight into what is going on with the recovery attempt here?
-
Practically, how can we recover the extension in these cases? Will an app update force the extension to restart properly? Hard reset of the device? Something else?
-
Is there any way to check on the health of an extension from the main app so that we can deterministically know if the extension is healthy or not before relying on it?