This error does not crash the app although is concerning. I have been unable to determine why it is occurring although I have figured out that it occurs only whenever I call present(picker, animated: true)
where picker
is a UIImagePickerController()
. I have added all of the necessary permissions to my info.plist and even created a small test app to reproduce this bug.
It does not occur when using any of the simulators and I have only been able to find one other SO post about an error like this, although that post is also unanswered.
The test app I made consists of a simple storyboard with a button to call the UIImagePickerController()
present function and then an imageView to accept that photo.
Here is the code for the ViewController.swift
:
import UIKit
class ViewController: UIViewController {
@IBOutlet var imageView: UIImageView!
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func setPicture(_ sender: Any) {
let picker = UIImagePickerController()
if UIImagePickerController.isSourceTypeAvailable(.photoLibrary) {
picker.delegate = self
picker.sourceType = .photoLibrary
picker.allowsEditing = true
present(picker, animated: true)
}
}
extension ViewController: UIImagePickerControllerDelegate, UINavigationControllerDelegate {
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage {
imageView.image = image
}
picker.dismiss(animated: true, completion: nil)
}
func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
picker.dismiss(animated: true, completion: nil)
}
}
I will include the full error I am seeing in the console below:
2021-01-21 09:40:00.160241-0500 Outdoorist[2480:608042] [AXRuntimeCommon] Unknown client: Outdoorist
2021-01-21 09:40:07.259911-0500 Outdoorist[2480:608307] [AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:2483 (
0 AXRuntime 0x00000001a3f9eeac 0C4A28F7-3959-3709-8C05-A1A91EED978B + 347820
1 AXRuntime 0x00000001a3f4dfb8 _AXGetPortFromCache + 548
2 AXRuntime 0x00000001a3f4f610 AXUIElementPerformFencedActionWithValue + 460
3 UIKit 0x00000001ce67823c 737C2677-858F-3820-AD45-0EBAABC788BB + 852540
4 libdispatch.dylib 0x0000000102e8bce4 _dispatch_call_block_and_release + 24
5 libdispatch.dylib 0x0000000102e8d528 _dispatch_client_callout + 16
6 libdispatch.dylib 0x0000000102e945ac _dispatch_lane_serial_drain + 748
7 libdispatch.dylib 0x0000000102e95234 _dispatch_lane_invoke + 452
8 libdispatch.dylib 0x0000000102ea0a5c _dispatch_workloop_worker_thread + 1456
9 libsystem_pthread.dylib 0x00000001ce3935a4 _pthread_wqthread + 272
10 libsystem_pthread.dylib 0x00000001ce396874 start_wqthread + 8
)
2021-01-21 09:40:07.260672-0500 Outdoorist[2480:608307] [AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:2483 (
0 AXRuntime 0x00000001a3f9eeac 0C4A28F7-3959-3709-8C05-A1A91EED978B + 347820
1 AXRuntime 0x00000001a3f4dfb8 _AXGetPortFromCache + 548
2 AXRuntime 0x00000001a3f4f610 AXUIElementPerformFencedActionWithValue + 460
3 UIKit 0x00000001ce67823c 737C2677-858F-3820-AD45-0EBAABC788BB + 852540
4 libdispatch.dylib 0x0000000102e8bce4 _dispatch_call_block_and_release + 24
5 libdispatch.dylib 0x0000000102e8d528 _dispatch_client_callout + 16
6 libdispatch.dylib 0x0000000102e945ac _dispatch_lane_serial_drain + 748
7 libdispatch.dylib 0x0000000102e95234 _dispatch_lane_invoke + 452
8 libdispatch.dylib 0x0000000102ea0a5c _dispatch_workloop_worker_thread + 1456
9 libsystem_pthread.dylib 0x00000001ce3935a4 _pthread_wqthread + 272
10 libsystem_pthread.dylib 0x00000001ce396874 start_wqthread + 8
)
2021-01-21 09:40:07.261213-0500 Outdoorist[2480:608307] [AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:2483 (
0 AXRuntime 0x00000001a3f9eeac 0C4A28F7-3959-3709-8C05-A1A91EED978B + 347820
1 AXRuntime 0x00000001a3f4dfb8 _AXGetPortFromCache + 548
2 AXRuntime 0x00000001a3f4f610 AXUIElementPerformFencedActionWithValue + 460
3 UIKit 0x00000001ce67823c 737C2677-858F-3820-AD45-0EBAABC788BB + 852540
4 libdispatch.dylib 0x0000000102e8bce4 _dispatch_call_block_and_release + 24
5 libdispatch.dylib 0x0000000102e8d528 _dispatch_client_callout + 16
6 libdispatch.dylib 0x0000000102e945ac _dispatch_lane_serial_drain + 748
7 libdispatch.dylib 0x0000000102e95234 _dispatch_lane_invoke + 452
8 libdispatch.dylib 0x0000000102ea0a5c _dispatch_workloop_worker_thread + 1456
9 libsystem_pthread.dylib 0x00000001ce3935a4 _pthread_wqthread + 272
10 libsystem_pthread.dylib 0x00000001ce396874 start_wqthread + 8
)
I would greatly appreciate any assistance with solving this problem or how to avoid it.
I am using Xcode Version 12.3 if that is of any relevance.