I am trying to present UIDocumentPickerViewController from my Viewcontroller. Sometimes I get error saying Could not communicate with a helper application.
The way I present my DocumentPickerViewController is:
BHFilePickerViewController *documentPicker = [[BHFilePickerViewController alloc]initWithDocumentTypes:types inMode:UIDocumentPickerModeImport];
documentPicker.filePickerDelegate = self;
documentPicker.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:documentPicker animated:true completion:nil];
Where, BHFilePickerViewController is my custom class of type UIDocumentPickerViewController.
When issue occurs I can see the log as
[DocumentManager] The view service did terminate with error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}
Remote view controller crashed with error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}. Trying to relaunch.
[u 571773A2-04B9-4EAB-A4AE-E0C629CB07AF:m (null)] [com.apple.DocumentManagerUICore.Service(1.0)] Connection to plugin interrupted while in use.
[DocumentManager] Failed to get the remote browser View Controller with error (Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.DocumentManagerUICore.Service.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.DocumentManagerUICore.Service.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.})
[DocumentManager] Remote view controller crashed with error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.DocumentManagerUICore.Service.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.DocumentManagerUICore.Service.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.}. Trying to relaunch.
Am I presenting it wrong way? What could you be improved?
Thank you in advance.
Related
We are writing an iOS app that uploads data to Google Firebase storage. We use the code below to upload text data to the location we specify. It works fine, except when we are not connected to the internet.
For the case of not being connected to the internet, we are having trouble trapping and handling the error. As far as we can tell, the delegate is never called (MyFirebaseProtocol_UploadTextComplete doesn't fire until much later, perhaps after a timeout) , and it just tries to upload repeatedly. If we are connected to the Mac and watching the debug window, it continuously generates errors in a loop, indefinitely. These certainly look like they are intended to be trappable (class names like NSErrorFailingURLStringKey, and helpful error messages and codes), but so far we are unable to trap them as they occur.
We are relatively new at swift, but is there some syntax, something like exception handling, that will allow us to trap and handle these errors, rather than just loop indefinitely?
Thanks!
func UploadTextFile(filepath : String, text: String, delegate : MyFirebaseProtocol)
{
let storage = Storage.storage()
let storageRef = storage.reference()
let textfileref = storageRef.child(filepath)
let data: Data? = text.data(using: .utf8)
textfileref.putData(data!, metadata: nil)
{
(metadata, error) in
delegate.MyFirebaseProtocol_UploadTextComplete(error: error)
}
}
Error messages in Xcode debug window:
2022-01-20 15:15:38.553528-0500 GarmentTest[431:60410] Connection 1: received failure notification
2022-01-20 15:15:38.553552-0500 GarmentTest[431:60410] Connection 1: failed to connect 1:50, reason -1
2022-01-20 15:15:38.553564-0500 GarmentTest[431:60410] Connection 1: encountered error(1:50)
2022-01-20 15:15:38.555426-0500 GarmentTest[431:60410] Connection 2: received failure notification
2022-01-20 15:15:38.555442-0500 GarmentTest[431:60410] Connection 2: failed to connect 1:50, reason -1
2022-01-20 15:15:38.555452-0500 GarmentTest[431:60410] Connection 2: encountered error(1:50)
2022-01-20 15:15:38.557057-0500 GarmentTest[431:60410] Task .<1> HTTP load failed, 0/0 bytes (error code: -1009 [1:50])
2022-01-20 15:15:38.557104-0500 GarmentTest[431:60410] Task <1D0E3033-5A15-4435-AF3D-99A06EAB4C3C>.<2> HTTP load failed, 0/0 bytes (error code: -1009 [1:50])
2022-01-20 15:15:38.557485-0500 GarmentTest[431:60410] Connection 3: received failure notification
2022-01-20 15:15:38.557544-0500 GarmentTest[431:60410] Connection 3: failed to connect 1:50, reason -1
2022-01-20 15:15:38.557664-0500 GarmentTest[431:60410] Connection 3: encountered error(1:50)
2022-01-20 15:15:38.558844-0500 GarmentTest[431:60268] Task .<1> finished with error [-1009] Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x280374a80 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask .<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask .<1>"
), NSLocalizedDescription=The Internet connection appears to be offline., NSErrorFailingURLStringKey=https://firebasestorage.googleapis.com/v0/b/garmenttest-8897e.appspot.com/o/Snapshots%2FAn%2FAn_20220120_151528_Relaxed_Center_Image_1B.png?uploadType=resumable&name=Snapshots%2FAn%2FAn_20220120_151528_Relaxed_Center_Image_1B.png, NSErrorFailingURLKey=https://firebasestorage.googleapis.com/v0/b/garmenttest-8897e.appspot.com/o/Snapshots%2FAn%2FAn_20220120_151528_Relaxed_Center_Image_1B.png?uploadType=resumable&name=Snapshots%2FAn%2FAn_20220120_151528_Relaxed_Center_Image_1B.png, _kCFStreamErrorDomainKey=1}
Everywhere I can find the same solution to retrieve carrier information. So Im sure it works. but, For me its returning an error:
2018-08-08 14:24:55.100318-0400 ReportSpam1Extension[4192:295308]
[NetworkInfo] Descriptors query returned error: Error
Domain=NSCocoaErrorDomain Code=4099 "The connection to service named
com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo=
{NSDebugDescription=The connection to service named
com.apple.commcenter.coretelephony.xpc was invalidated.
The code that is generating this error is inside a message extension:
let networkInfo = CTTelephonyNetworkInfo()
let carrier = networkInfo.subscriberCellularProvider
print(carrier)
I have linked the binary as well. Im not sure what I am missing here
UPDATE: It works in the parent app but not in the extension!
The extension I am using is (Unwanted Communication Extension)
I wrote a keyboard extension and met some problems. I put a collectview on this extension. collectview every cell needs to load a GIF diagram, each GIF dynamic figure is 2 m, then there is the keyboard crash case, an error for the following reasons (). I have been in the info. The file of RequestsOpenAccess set to YES. So I don't know where the problem is. The following is the cause of the error, only these:
2017-03-24 21:37:45.820834 ExpressionBaby[3672:934876] viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}
2017-03-24 21:37:48.709876 ExpressionBaby[3672:934876] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
2017-03-24 21:37:49.222492 ExpressionBaby[3672:934876] viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}
2017-03-24 21:37:51.231664 ExpressionBaby[3672:934876] viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}
2017-03-24 21:37:53.225378 ExpressionBaby[3672:934876] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
2017-03-24 21:37:54.500931 ExpressionBaby[3672:934876] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
2017-03-24 21:37:55.016598 ExpressionBaby[3672:934876] viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}
This is a weird one. I'm using GCDAsyncSocket and when I'm using the iOS simulator sometimes I can connect and send, no problem but sometimes when I try to connect and send something (writeData) I get the following error:
didDisconnect Error Domain=NSPOSIXErrorDomain Code=57 "The operation couldn’t be completed. Socket is not connected"
What is odd, I cannot predict when this will happen. Also when I check to see isConnected, that returns true.
Here is the code (SWIFT):
var sendBytes:[Byte] = [0x0, 0x1, 0x2, 0x3]
var msgData = NSData(bytes: sendBytes, length: sendBytes.count)
socket.writeData(msgData, withTimeout: -1.0, tag: 0)
socket.readDataWithTimeout(-1.0, tag: 0)
The socket(didConnectToHost) callback fired with no issues and correct address and port returned, but when I try the above code to writeData to socket, I get the above error.
Any ideas why this would be happening randomly.
It looks simple, but don't know what goes wrong. I am trying to load a basic URL in WebView, as shown below
WebsiteWebView.delegate=self;
NSURL* url = [NSURL URLWithString:#"http://firstclasspizzaoc.com/"];
[WebsiteWebView loadRequest:[NSURLRequest requestWithURL:url]];
while loading i am getting below error everytime..
Error : Error Domain=NSURLErrorDomain Code=-999 "The operation couldn’t be completed. (NSURLErrorDomain error -999.)" UserInfo=0xe036d20 {NSErrorFailingURLKey=http://firstclasspizzaoc.com/, NSErrorFailingURLStringKey=http://firstclasspizzaoc.com/}
2014-01-07 15:18:46.142 FirstClassPizza[1583:
Error : Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo=0xe0ef310 {NSErrorFailingURLStringKey=XXXXXXXX, NSErrorFailingURLKey=XXXXXXXX, NSLocalizedDescription=A server with the specified hostname could not be found., NSUnderlyingError=0xcbe9130 "A server with the specified hostname could not be found."}
At Browser it is loading perfectly..
Please suggest what went wrong in my code..
Any Valuable suggestions will be appreciated...
Thanks
It is due to Your Web URL http://firstclasspizzaoc.com/ can you use your url with
http://www.firstclasspizzaoc.com/
You can find your answer here :
How do I fix NSURLErrorDomain error -999 in iPhone 3.0 OS
This thread contained this description for this error: "This error may occur if an another request is made before the previous request of WebView is completed..."
I worked around this by ignoring this error and letting the webview continue to load.
if ([error code] != NSURLErrorCancelled) {
//show error alert, etc.
}