NSInternalInconsistencyException NSBundleResourceRequest could not connect to its helper daemon

Originator:stone33.mail
Number:rdar://FB7737805 Date Originated:You Jun 15, 2020
Status:Open Resolved:
Product:iOS Product Version:
Classification:On-demand resources Reproducible:Yes
 
In our app we are fetching on-demand resources right after application did start. Once we released the app we found numerous crashes with stacktrace:
```
NSInternalInconsistencyException NSBundleResourceRequest could not connect to its helper daemon
0  CoreFoundation      0x196fa6a48 __exceptionPreprocess + 220
1  libobjc.A.dylib     0x196ccdfa4 objc_exception_throw + 56
2  Foundation          0x1973d8060 _setupConnection + 488
3  libdispatch.dylib   0x196c73184 _dispatch_client_callout + 16
4  libdispatch.dylib   0x196c1a9a4 _dispatch_once_callout + 28
5  Foundation          0x1973d7e34 +[NSBundleResourceRequest _connection] + 72
6  Foundation          0x1973d6b14 -[_NSBundleODRDataForApplications initWithBundle:] + 140
7  Foundation          0x1973d69e0 +[_NSBundleODRDataForApplications dataForBundle:createIfRequired:] + 168
8  Foundation          0x1973d93ac -[NSBundleResourceRequest conditionallyBeginAccessingResourcesWithCompletionHandler:] + 84
...
20 UIKitCore           0x19aa176c0 -[UIViewController _setViewAppearState:isAnimating:] + 832
21 UIKitCore           0x19aa180e0 -[UIViewController _endAppearanceTransition:] + 228
22 UIKitCore           0x19a9311ec __48-[UIPresentationController transitionDidFinish:]_block_invoke + 136
23 UIKitCore           0x19b035c84 _runAfterCACommitDeferredBlocks + 316
24 UIKitCore           0x19b0257d4 _cleanUpAfterCAFlushAndRunDeferredBlocks + 232
25 UIKitCore           0x19b055744 _afterCACommitHandler + 76
26 CoreFoundation      0x196f23e68 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
27 CoreFoundation      0x196f1ed54 __CFRunLoopDoObservers + 416
28 CoreFoundation      0x196f1f320 __CFRunLoopRun + 1308
29 CoreFoundation      0x196f1eadc CFRunLoopRunSpecific + 464
30 GraphicsServices    0x1a0ebf328 GSEventRunModal + 104
31 UIKitCore           0x19b02c63c UIApplicationMain + 1936
32 browser_ios         0x102f1d254 main + 108 (main.m:18)
33 libdyld.dylib       0x196da8360 start + 4
```

We found test case which reproduces this crash: you should turn off your device, turn on and immediately launch the app.

Comments

Please verify this issue with the iOS 15 beta 7 and update your bug report with your results <...>

I have no chance to reproduce this behaviour because we dropped relevant code some time ago - but hopefully Apple have fixed the bug :)

By stone33.mail at Aug. 26, 2021, 8:56 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!