我试图在我的 Windows 机器上启动 xcuitrunner,但出现以下异常:
Unhandled Exception: System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: No connection could be made because the target machine actively refused it: [::ffff:127.0.0.1]:27015
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapShot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Net.SOckets.Socket.Connect(IPAddress[] addresses, Int32 port)
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port)
at System.Net.Sockets.Socket.Connect(String host, Int32 port)
at Quamotion.Devices.iOS.Managed.MuxerDeviceClient.Connect(Boolean forceTcp, String muxerHost, Int32 muxerPort)
at Quamotion.Devices.iOS.Managed.MuxerDeviceClient.ListDevices(CancellationToken cancellationToken)
at XcuitRunner.Program.<>c__DisplayClass5_1.<Main>b__2()
at Microsoft.Extension.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at XcuitRunner.Program.Main(String[] args)
通过查看27015端口关联的进程netstat
,发现没有进程存在。
看起来 xcuitrunner 仍在寻找端口 27015。
我该如何解决这个问题?
端口 27015 是 Apple 移动设备服务使用的端口。此服务管理与 iOS 设备的连接。您可以通过安装 iTunes 安装 Apple Mobile Device Service。
您能否检查 iTunes 是否已安装,Apple Mobile Device Service 是否正在运行?