xcrun command for listing device processes not working when a debug app is open

I’m working on a macOS app that sends commands to the user’s shell environment for communicating with a connected iOS device through xcrun. At one point in the app’s workflow, I need to check if a certain app is running to decide if I want to kill the process or not. However, when executing the following command I’ve run into issues:

$ xcrun devicectl device info processes --device 00008210-0015358E1EE8502E

11:18:56  Acquired tunnel connection to device.
11:18:56  Enabling developer disk image services.
11:18:56  Acquired usage assertion.
ERROR: An error occurred while communicating with a remote process. (com.apple.dt.CoreDeviceError error 3 (0x03))
--------------------------------------------------------------------------------
ERROR:     The connection was invalidated. (com.apple.Mercury.error error 1001 (0x3E9))
           XPCConnectionDescription = <RemoteXPCPeerConnection 0x600003e4c410> { <remote connection: 0x1340325c0> { type = preconnected, state = canceled, remote service name = (null), server mode = 0, protocol version number = 1, protocol feature flags = 0x6, local service version = 0, remote service version = 0, traffic class = 0, (root, reply) helo received = (1, 1), next msg id = 5, first msg id = 1, send in progress = 0, preexisting socket = -1 }

The connection seems to be invalidated as soon as I try to access the device’s processes while an app that I’ve installed onto the device through Xcode is running. When I execute the same command without the installed app running I get the expected list of processes:

$ xcrun devicectl device info processes --device 00008210-0015358E1EE8502E

11:20:05  Acquired tunnel connection to device.
11:20:05  Enabling developer disk image services.
11:20:05  Acquired usage assertion.
 PID   Executable Path
----   --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   1   /sbin/launchd
  31   /usr/libexec/UserEventAgent
  32   /usr/libexec/logd
  33   /usr/libexec/runningboardd
  34   /System/Library/CoreServices/SpringBoard.app/SpringBoard

...

I’ve tried looking online for resources relating to the com.apple.Mercury.error error that I’m facing when running the app but I haven’t found any information relating to the problem I’m facing here.

Some info:

  • iPhone 13 connected to a MacBook through USB
  • The error is only reproducible when using an app that I’ve installed onto my iOS device through xcrun, not just any app on my iOS device

I’ve expected the command to list a device’s processes to be independent on a debug app running on the device at the time or not, and unfortunately the only time in my macOS app’s lifecycle where it is important to run this command is exactly when the debug app is running on the device.

Any advice for how to debug this would be appreciated!

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật