Errors when running devicectl to extract diagnostic information from iPhone

I have Xcode 15.1 and iPhone 14 with iOS 17.3. Developer mode is enabled on the iPhone.

I am executing the command xcrun devicectl diagnose -k -v

I encounter errors when the command is executed (Truncated some output without any errors to be within 7000 char limit)

Using verbose logging.
Collecting diagnostics from this machine and all nearby devices. You can restrict the list of targeted devices using --devices.
This may take several minutes.
5413D57C-7CBD-4F75-94AF-E8AE7CDF2C8C: Adding device results entry for 'iPhone-7675 (iPhone 14)'
iPhone-7675 (iPhone 14): Fetch DDI metadata
iPhone-7675 (iPhone 14): Starting operation 'Fetch DDI metadata'
iPhone-7675 (iPhone 14): Finished 'Fetch DDI metadata'. Results at /private/var/folders/zf/3p2mcxsx6tj36w19yfthy81jxrfr_j/T/TemporaryItems/NSIRD_devicectl_Hohg2i/devicectl_diagnose_2024_02_20.14-44-05/5413D57C-7CBD-4F75-94AF-E8AE7CDF2C8C/DDIMetadata.json
iPhone-7675 (Connected, iOS 17.3 21D50, 5413D57C-7CBD-4F75-94AF-E8AE7CDF2C8C): Collecting diagnostics
iPhone-7675 (iPhone 14): Starting operation 'Gather network state'
host: Adding host results entry for 'Host System'
Host System: Starting operation 'Gather network state'
Host System: Starting operation 'Gather Bonjour adverts'
Host System: Starting operation 'Gather CoreDevice defaults'
Host System: Starting operation 'Gather RemotePairing defaults'
iPhone-7675 (iPhone 14): Gather network state: Failed to spawn binary: The specified operation is not implemented on this device. (com.apple.dt.CoreDeviceError error 1.)
--------------------------------------------------------------------------------
Host System: Starting operation 'Get CoreDevice version'
The operation couldn’t be completed. (CoreDevice.ActionError error 2.)
  NSDebugDescription = This operation cannot be performed on this device.
Host System: Finished 'Gather network state'. Results at /private/var/folders/zf/3p2mcxsx6tj36w19yfthy81jxrfr_j/T/TemporaryItems/NSIRD_devicectl_Hohg2i/devicectl_diagnose_2024_02_20.14-44-05/host/ifconfig.txt
Host System: Starting operation 'Get default Xcode version'
Host System: Starting operation 'Get path to the default Xcode install'
Host System: Starting operation 'List information about all devices'
Host System: Finished 'List information about all devices'. Results at /private/var/folders/zf/3p2mcxsx6tj36w19yfthy81jxrfr_j/T/TemporaryItems/NSIRD_devicectl_Hohg2i/devicectl_diagnose_2024_02_20.14-44-05/host/CoreDevice-listDevices.json
Host System: Starting operation 'List preferred DDIs for all platforms'
Host System: Finished 'Get path to the default Xcode install'. Results at /private/var/folders/zf/3p2mcxsx6tj36w19yfthy81jxrfr_j/T/TemporaryItems/NSIRD_devicectl_Hohg2i/devicectl_diagnose_2024_02_20.14-44-05/host/DefaultXcode-path.txt
Unable to find preferred DDI for iOS platform: CoreDeviceError(errorCode: 12007, errorUserInfo: ["DDIPlatform": "iOS", "NSLocalizedDescription": "Unable to find a developer disk image to use for the iOS platform (variants: Internal).", "DDIVariants": ["Internal"]])
Unable to find preferred DDI for tvOS platform: CoreDeviceError(errorCode: 12007, errorUserInfo: ["DDIVariants": ["Internal"], "NSLocalizedDescription": "Unable to find a developer disk image to use for the tvOS platform (variants: Internal).", "DDIPlatform": "tvOS"])
Unable to find preferred DDI for watchOS platform: CoreDeviceError(errorCode: 12007, errorUserInfo: ["DDIPlatform": "watchOS", "DDIVariants": ["Internal"], "NSLocalizedDescription": "Unable to find a developer disk image to use for the watchOS platform (variants: Internal)."])
Unable to find preferred DDI for macOS platform: CoreDeviceError(errorCode: 12007, errorUserInfo: ["DDIPlatform": "macOS", "DDIVariants": ["Public"], "NSLocalizedDescription": "Unable to find a developer disk image to use for the macOS platform (variants: Public)."])
Unable to find preferred DDI for macOS platform: CoreDeviceError(errorCode: 12007, errorUserInfo: ["DDIPlatform": "macOS", "NSLocalizedDescription": "Unable to find a developer disk image to use for the macOS platform (variants: Internal).", "DDIVariants": ["Internal"]])
Unable to find preferred DDI for visionOS platform: CoreDeviceError(errorCode: 12007, errorUserInfo: ["DDIPlatform": "xrOS", "DDIVariants": ["Public"], "NSLocalizedDescription": "Unable to find a developer disk image to use for the xrOS platform (variants: Public)."])
Unable to find preferred DDI for visionOS platform: CoreDeviceError(errorCode: 12007, errorUserInfo: ["DDIPlatform": "xrOS", "NSLocalizedDescription": "Unable to find a developer disk image to use for the xrOS platform (variants: Internal).", "DDIVariants": ["Internal"]])
Host System: Finished 'List preferred DDIs for all platforms'. Results at /private/var/folders/zf/3p2mcxsx6tj36w19yfthy81jxrfr_j/T/TemporaryItems/NSIRD_devicectl_Hohg2i/devicectl_diagnose_2024_02_20.14-44-05/host/CoreDevice-preferredDDIs.json
Host System: Starting operation 'Copy the Core Device database'
Copying CoreDevice database
Host System: Finished 'Copy the Core Device database'. Results at /private/var/folders/zf/3p2mcxsx6tj36w19yfthy81jxrfr_j/T/TemporaryItems/NSIRD_devicectl_Hohg2i/devicectl_diagnose_2024_02_20.14-44-05/host/CoreDevice-db.sqlite
Host System: Starting operation 'Copy the DDI version.plists from /Library/Developer/DeveloperDiskImages'
Copying DDI version.plists from /Library/Developer/DeveloperDiskImages
Host System: 'Copy the DDI version.plists from /Library/Developer/DeveloperDiskImages' failed: The file “DeveloperDiskImages” couldn’t be opened because there is no such file. (NSCocoaErrorDomain error 260.)
  NSFilePath = /Library/Developer/DeveloperDiskImages
  NSURL = file:///Library/Developer/DeveloperDiskImages/
--------------------------------------------------------------------------------
The operation couldn’t be completed. No such file or directory (NSPOSIXErrorDomain error 2.)
<TRUNCATED>
Effective timeout: 3600, remainingTime: 3596, will wait: 3536 seconds
Waiting for 1/14 tasks to finish…
Pending operations:
  - Host System: Gather Bonjour adverts
Host System: Finished 'Gather Bonjour adverts'. Results at /private/var/folders/zf/3p2mcxsx6tj36w19yfthy81jxrfr_j/T/TemporaryItems/NSIRD_devicectl_Hohg2i/devicectl_diagnose_2024_02_20.14-44-05/host/dns-sd.txt
Wrote file to /tmp/devicectl_diagnose_2024_02_20.14-44-05.zip
Setting diagnostics destination to '/tmp/devicectl_diagnose_2024_02_20.14-44-05.zip'
Captured diagnostics do not include a host sysdiagnose. Please capture one separately.
Captured diagnostics do not include a sysdiagnose from any device. Please capture one if relevant to your issue.

Command Completed, took 6.333 seconds
  1. How to resolve these errors.

  2. Additionally I am also not able to see the crash logs in the Xcode, when I go into Windows > Devices and Simulators > Open Recent Logs

Thanks!

Errors when running devicectl to extract diagnostic information from iPhone
 
 
Q