Iam trying to implement FileProvider method - (void)importDocumentAtURL:(NSURL *)fileURL toParentItemIdentifier:(NSFileProviderItemIdentifier)parentItemIdentifier completionHandler:(void (^)(NSFileProviderItem importedDocumentItem, NSError *error))completionHandler
I am getting following error generated when trying to upload a folder with multiple items in it. Also my FileProviderItem list getting deleted after this.
2018-02-14 17:47:53.598426+0530 Files[8694:412673] [default] [ERROR] connection invalidated in fetchRemoteFileProviderVendorWithIdentifier:remoteObjectInterface:messageInterface:handler:connectionErrorHandler: (protocol: FPXOperationService) 2018-02-14 17:47:53.598634+0530 Files[8694:412673] [default] [ERROR] lost connection while performing action: Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a helper application." 2018-02-14 17:47:53.600929+0530 Files[8694:412677] [UI] performOperation(:sourceOperationItems:destinationItem:viewControllerForPresentingErrors:forceBounce:lastUsageUpdatePolicy:completion:): Copy Operation failed: Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a helper application." UserInfo={NSUserStringVariant=Copy, NSFileProviderErrorItemName=arvind, NSFilePath=arvind} 2018-02-14 17:47:53.601841+0530 Files[8694:412106] [default] [ERROR] lost connection while performing action: Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a helper application."
2018-02-14 17:47:53.608742+0530 Files[8694:412362] [default] [ERROR] Failed to fetch file provider endpoint for identifier xxxx; Error Domain=NSFileProviderInternalErrorDomain Code=7 "A connection to the extension “xxxx” could not be made." UserInfo={NSLocalizedDescription=A connection to the extension “xxxx” could not be made., NSUnderlyingError=0x1cc24f7b0 {Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named xxxx" UserInfo={NSDebugDescription=connection to service named xxxx}}} 2018-02-14 17:47:53.653542+0530 Files[8694:411277] [default] [ERROR] received an error while enumerating changes: Error Domain=NSFileProviderInternalErrorDomain Code=7 "A connection to the extension “xxxx” could not be made." UserInfo={NSLocalizedDescription=A connection to the extension “xxxx” could not be made., NSUnderlyingError=0x1cc24f7b0 {Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named xxxx" UserInfo={NSDebugDescription=connection to service named xxxx}}}
Looking for help. Any inputs?
It turned out to be memory issue. When my file provider reaches ~15MB in memory, app crashes. This caused due to file upload chunk size. I have reduced chunk size and works fine. My guess is, by the time ARC frees up uploaded chunks, memory accumulated to 15MB in my use case.