我们能够在大多数机器上启动 xcuitrunner。在一台机器上,我们仍然收到以下异常:
Unhandled Exception: System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: No connection could be made because the target machine actively refused it: [_IP ADDRESS]: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)
Apple 移动设备服务正在运行,iTunes 和类似工具idevicesyslog
可以正常看到该设备。
有办法解决此错误吗?
答案1
这很奇怪!您能分享以下信息吗:
- 完整的错误消息。您已从错误消息中排除 IP 地址。您能分享确切的错误消息吗?IP 地址应为 127.0.0.1,或 IPv6 等效地址。
- 您能否仔细检查一下 Apple Mobile Device Service 是否正在运行?
netstat -a -p tcp
你能分享一下和的输出netstat -a -p tcpv6
吗? 服务是否在监听端口 27015? 在 127.0.0.1 还是 ::1?- 你能运行
ping localhost
吗ping -4 localhost
?它在工作和不工作的机器上会产生不同的输出吗?