LoopKit / Loop

An automated insulin delivery app for iOS, built on LoopKit
https://loopdocs.org
Other
1.51k stars 1.3k forks source link

Loop slow to respond to Send To and displays errors in Xcode debug #2222

Open marionbarker opened 2 months ago

marionbarker commented 2 months ago

Describe the bug Symptom: The first time I issue a Send To (for a Loop Report) after a rebuild, Loop is very slow to respond. When attached to Xcode, the debug log shows errors - appended below.

Expected behavior Prompt response for send to with no errors showing

Phone

Test with other hardware

Repeated this test with two other test phones, errors are not as obvious as for iOS 17 (and no slow-down for first instance noted)

Added Xcode debug log excerpts at the end for iOS 15 and iOS 16

Loop Version

CGM

Pump

Example First Time iOS 17:

Xcode log excerpt for Issue Report Send To

Example iOS 17

Xcode log excerpt for critical log export

Exported 20240903T000000Z.zip
Type: Notice | Timestamp: 2024-09-05 07:47:56.472383-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogHistoricalExporter | TID: 0x689f1b
Exporting 20240904T000000Z.zip...
Type: Notice | Timestamp: 2024-09-05 07:47:56.473149-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogHistoricalExporter | TID: 0x689f1b
Exported 20240904T000000Z.zip
Type: Notice | Timestamp: 2024-09-05 07:48:01.255886-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogHistoricalExporter | TID: 0x689f1b
Exporting 20240905T144749Z.zip...
Type: Notice | Timestamp: 2024-09-05 07:48:01.256708-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogFullExporter | TID: 0x689f1b
Exported 20240905T144749Z.zip
Type: Notice | Timestamp: 2024-09-05 07:48:09.418797-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogFullExporter | TID: 0x689f1b
Exporting final archive Export-20240905T144749Z.zip
Type: Notice | Timestamp: 2024-09-05 07:48:09.419009-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogFullExporter | TID: 0x689f1b
Bundling 20240830T000000Z.zip
Type: Notice | Timestamp: 2024-09-05 07:48:09.427127-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogFullExporter | TID: 0x689f1b
Bundling 20240831T000000Z.zip
Type: Notice | Timestamp: 2024-09-05 07:48:09.428686-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogFullExporter | TID: 0x689f1b
Bundling 20240901T000000Z.zip
Type: Notice | Timestamp: 2024-09-05 07:48:09.431368-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogFullExporter | TID: 0x689f1b
Bundling 20240902T000000Z.zip
Type: Notice | Timestamp: 2024-09-05 07:48:09.433521-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogFullExporter | TID: 0x689f1b
Bundling 20240903T000000Z.zip
Type: Notice | Timestamp: 2024-09-05 07:48:09.435015-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogFullExporter | TID: 0x689f1b
Bundling 20240904T000000Z.zip
Type: Notice | Timestamp: 2024-09-05 07:48:09.438252-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogFullExporter | TID: 0x689f1b
Bundling 20240905T144749Z.zip
Type: Notice | Timestamp: 2024-09-05 07:48:09.451987-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogFullExporter | TID: 0x689f1b
Exported final archive Export-20240905T144749Z.zip
Type: Notice | Timestamp: 2024-09-05 07:48:09.456309-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogFullExporter | TID: 0x689f1b
End critical event log full export background task
Type: Notice | Timestamp: 2024-09-05 07:48:09.462752-07:00 | Process: Loop | Library: Loop | Subsystem: com.loopkit.Loop | Category: CriticalEventLogFullExporter | TID: 0x63ef29
Failed to request default share mode for fileURL:file:///private/var/mobile/Containers/Data/Application/54898A59-81BD-48B7-A448-E9E5090CFA46/tmp/Export-20240905T144749Z.zip error:Error Domain=NSOSStatusErrorDomain Code=-10814 "(null)" UserInfo={_LSLine=1741, _LSFunction=runEvaluator}
Type: Error | Timestamp: 2024-09-05 07:48:09.484497-07:00 | Process: Loop | Library: Sharing | Subsystem: com.apple.ShareSheet | Category: ShareSheet | TID: 0x63ef29
Only support loading options for CKShare and SWY types.
Type: Error | Timestamp: 2024-09-05 07:48:09.485276-07:00 | Process: Loop | Library: Sharing | Subsystem: com.apple.ShareSheet | Category: ShareSheet | TID: 0x63ef29
error fetching item for URL:file:///private/var/mobile/Containers/Data/Application/54898A59-81BD-48B7-A448-E9E5090CFA46/tmp/Export-20240905T144749Z.zip : (null)
Type: Error | Timestamp: 2024-09-05 07:48:09.486281-07:00 | Process: Loop | Library: Sharing | Subsystem: com.apple.ShareSheet | Category: ShareSheet | TID: 0x63ef29
error fetching file provider domain for URL:file:///private/var/mobile/Containers/Data/Application/54898A59-81BD-48B7-A448-E9E5090CFA46/tmp/Export-20240905T144749Z.zip : (null)
Type: Error | Timestamp: 2024-09-05 07:48:09.493255-07:00 | Process: Loop | Library: Sharing | Subsystem: com.apple.ShareSheet | Category: ShareSheet | TID: 0x63ef29
error fetching item for URL:file:///private/var/mobile/Containers/Data/Application/54898A59-81BD-48B7-A448-E9E5090CFA46/tmp/Export-20240905T144749Z.zip : (null)
Type: Error | Timestamp: 2024-09-05 07:48:09.494222-07:00 | Process: Loop | Library: Sharing | Subsystem: com.apple.ShareSheet | Category: ShareSheet | TID: 0x689ea6
Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false}
Type: Fault | Timestamp: 2024-09-05 07:48:09.531717-07:00 | Process: Loop | Library: RunningBoardServices | Subsystem: com.apple.runningboard | Category: general | TID: 0x689ea6
elapsedCPUTimeForFrontBoard couldn't generate a task port
Type: Error | Timestamp: 2024-09-05 07:48:09.531911-07:00 | Process: Loop | Library: RunningBoardServices | Subsystem: com.apple.runningboard | Category: process | TID: 0x689ea6

Example iOS 17 Repeat the Issue Report, send to action

Failed to request default share mode for fileURL:file:///private/var/mobile/Containers/Data/Application/54898A59-81BD-48B7-A448-E9E5090CFA46/tmp/Loop%20Report%202024-09-05%2007:50:17-07:00.md error:Error Domain=NSOSStatusErrorDomain Code=-10814 "(null)" UserInfo={_LSLine=1741, _LSFunction=runEvaluator}
Type: Error | Timestamp: 2024-09-05 07:50:21.901536-07:00 | Process: Loop | Library: Sharing | Subsystem: com.apple.ShareSheet | Category: ShareSheet | TID: 0x63ef29
Only support loading options for CKShare and SWY types.
Type: Error | Timestamp: 2024-09-05 07:50:21.903873-07:00 | Process: Loop | Library: Sharing | Subsystem: com.apple.ShareSheet | Category: ShareSheet | TID: 0x63ef29
error fetching item for URL:file:///private/var/mobile/Containers/Data/Application/54898A59-81BD-48B7-A448-E9E5090CFA46/tmp/Loop%20Report%202024-09-05%2007:50:17-07:00.md : (null)
Type: Error | Timestamp: 2024-09-05 07:50:21.904582-07:00 | Process: Loop | Library: Sharing | Subsystem: com.apple.ShareSheet | Category: ShareSheet | TID: 0x63ef29
error fetching file provider domain for URL:file:///private/var/mobile/Containers/Data/Application/54898A59-81BD-48B7-A448-E9E5090CFA46/tmp/Loop%20Report%202024-09-05%2007:50:17-07:00.md : (null)
Type: Error | Timestamp: 2024-09-05 07:50:21.906601-07:00 | Process: Loop | Library: Sharing | Subsystem: com.apple.ShareSheet | Category: ShareSheet | TID: 0x63ef29
error fetching item for URL:file:///private/var/mobile/Containers/Data/Application/54898A59-81BD-48B7-A448-E9E5090CFA46/tmp/Loop%20Report%202024-09-05%2007:50:17-07:00.md : (null)
Type: Error | Timestamp: 2024-09-05 07:50:21.907918-07:00 | Process: Loop | Library: Sharing | Subsystem: com.apple.ShareSheet | Category: ShareSheet | TID: 0x68a177
Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false}
Type: Fault | Timestamp: 2024-09-05 07:50:21.945942-07:00 | Process: Loop | Library: RunningBoardServices | Subsystem: com.apple.runningboard | Category: general | TID: 0x68a177
elapsedCPUTimeForFrontBoard couldn't generate a task port
Type: Error | Timestamp: 2024-09-05 07:50:21.946014-07:00 | Process: Loop | Library: RunningBoardServices | Subsystem: com.apple.runningboard | Category: process | TID: 0x68a177

Example iOS 15

2024-09-05 08:03:21.352544-0700 Loop[82451:2573645] [Default] Task Loop[82451]/1#10 LF=0 couldn't find entitlement CopresenceCore.Entitlement.publicAPI error nil
2024-09-05 08:03:22.273848-0700 Loop[82451:2573645] [Default] Task Loop[82451]/1#10 LF=0 couldn't find entitlement CopresenceCore.Entitlement.publicAPI error nil
2024-09-05 08:03:22.914354-0700 Loop[82451:2573645] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
2024-09-05 08:03:22.914426-0700 Loop[82451:2573645] [default] Attempt to map database failed: permission was denied. This attempt will not be retried.
2024-09-05 08:03:22.914546-0700 Loop[82451:2573645] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
2024-09-05 08:03:22.921360-0700 Loop[82451:2573645] [default] -imageForImageDescriptor: can do IO please adopt -imageForDescriptor: for IO free drawing or -prepareImageForDescriptor: if IO is allowed. (This will become a fault soon.)
2024-09-05 08:03:22.964242-0700 Loop[82451:2573645] [LayoutConstraints] Changing the translatesAutoresizingMaskIntoConstraints property of a UICollectionReusableView that is managed by a UICollectionView is not supported, and will result in incorrect self-sizing. View: <_UIActivityContentFooterView: 0x101e808e0; baseClass = UICollectionReusableView; frame = (20 236; 374 52); layer = <CALayer: 0x283fe3ba0>>

Example iOS 16

2024-09-05 08:07:29.495416-0700 Loop[16177:5152571] [PersistentDeviceLog] Deleted 1971 DeviceLogEntries
2024-09-05 08:07:34.359568-0700 Loop[16177:5152322] [ShareSheet] Failed to request default share mode for fileURL:file:///private/var/mobile/Containers/Data/Application/3744B7F1-46A2-46E6-8F29-1DE7FD9D744B/tmp/Loop%20Report%202024-09-05%2008:07:29-07:00.md error:Error Domain=NSOSStatusErrorDomain Code=-10814 "(null)" UserInfo={_LSLine=1569, _LSFunction=runEvaluator}
2024-09-05 08:07:34.364051-0700 Loop[16177:5152322] [ShareSheet] Only support loading options for CKShare and SWY types.
2024-09-05 08:07:34.364750-0700 Loop[16177:5152322] [ShareSheet] error fetching item for URL:file:///private/var/mobile/Containers/Data/Application/3744B7F1-46A2-46E6-8F29-1DE7FD9D744B/tmp/Loop%20Report%202024-09-05%2008:07:29-07:00.md : (null)
2024-09-05 08:07:34.379236-0700 Loop[16177:5152322] [ShareSheet] error fetching file provider domain for URL:file:///private/var/mobile/Containers/Data/Application/3744B7F1-46A2-46E6-8F29-1DE7FD9D744B/tmp/Loop%20Report%202024-09-05%2008:07:29-07:00.md : (null)
2024-09-05 08:07:34.702360-0700 Loop[16177:5152575] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}
2024-09-05 08:07:34.703633-0700 Loop[16177:5152575] [default] Attempt to map database failed: permission was denied. This attempt will not be retried.
2024-09-05 08:07:34.703963-0700 Loop[16177:5152575] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}
2024-09-05 08:07:34.711661-0700 Loop[16177:5152758] [ShareSheet] error loading metadata for documentURL:file:///private/var/mobile/Containers/Data/Application/3744B7F1-46A2-46E6-8F29-1DE7FD9D744B/tmp/Loop%20Report%202024-09-05%2008:07:29-07:00.md error:Error Domain=NSFileProviderInternalErrorDomain Code=0 "No valid file provider found from URL file:///private/var/mobile/Containers/Data/Application/3744B7F1-46A2-46E6-8F29-1DE7FD9D744B/tmp/Loop%20Report%202024-09-05%2008:07:29-07:00.md." UserInfo={NSLocalizedDescription=No valid file provider found from URL file:///private/var/mobile/Containers/Data/Application/3744B7F1-46A2-46E6-8F29-1DE7FD9D744B/tmp/Loop%20Report%202024-09-05%2008:07:29-07:00.md.}
2024-09-05 08:07:34.803488-0700 Loop[16177:5152575] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}
2024-09-05 08:07:34.803598-0700 Loop[16177:5152575] [default] Attempt to map database failed: permission was denied. This attempt will not be retried.
2024-09-05 08:07:34.803719-0700 Loop[16177:5152575] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}
2024-09-05 08:07:35.860087-0700 Loop[16177:5152575] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}
2024-09-05 08:07:35.860140-0700 Loop[16177:5152575] [default] Attempt to map database failed: permission was denied. This attempt will not be retried.
2024-09-05 08:07:35.860206-0700 Loop[16177:5152575] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}
2024-09-05 08:07:35.867042-0700 Loop[16177:5152575] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}
2024-09-05 08:07:35.867179-0700 Loop[16177:5152575] [default] Attempt to map database failed: permission was denied. This attempt will not be retried.
2024-09-05 08:07:35.867295-0700 Loop[16177:5152575] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}
2024-09-05 08:07:35.867992-0700 Loop[16177:5152575] [default] -imageForImageDescriptor: can do IO please adopt -imageForDescriptor: for IO free drawing or -prepareImageForDescriptor: if IO is allowed. (This will become a fault soon.)
2024-09-05 08:07:35.872525-0700 Loop[16177:5152322] [LayoutConstraints] Changing the translatesAutoresizingMaskIntoConstraints property of a UICollectionReusableView that is managed by a UICollectionView is not supported, and will result in incorrect self-sizing. View: <_UIActivityContentFooterView: 0x133fc5940; baseClass = UICollectionReusableView; frame = (16 291.5; 343 52); layer = <CALayer: 0x2824a7300>>
2024-09-05 08:07:35.904739-0700 Loop[16177:5152575] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}
2024-09-05 08:07:35.904848-0700 Loop[16177:5152575] [default] Attempt to map database failed: permission was denied. This attempt will not be retried.
2024-09-05 08:07:35.904959-0700 Loop[16177:5152575] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}
2024-09-05 08:07:35.905840-0700 Loop[16177:5152575] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}
2024-09-05 08:07:35.905921-0700 Loop[16177:5152575] [default] Attempt to map database failed: permission was denied. This attempt will not be retried.
2024-09-05 08:07:35.906033-0700 Loop[16177:5152575] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}
2024-09-05 08:07:35.906278-0700 Loop[16177:5152575] [default] -imageForImageDescriptor: can do IO please adopt -imageForDescriptor: for IO free drawing or -prepareImageForDescriptor: if IO is allowed. (This will become a fault soon.)