wendan1234 发表于 2017-8-29 15:51:46

安卓手机启动连接报错

本帖最后由 TestWriter 于 2017-9-7 14:18 编辑

以下是报错日志,麻烦看下怎么回事


2017-08-29 11:21:41,382 ERROR TestWriter.Common.Log4net.Log4netLoggingService - OpenQA.Selenium.Appium.Service.Exceptions.AppiumServerHasNotBeenStartedLocallyException: The local appium server has not been started. The given Node.js executable: C:\ProgramData\TestWriterEnviroment\Appium\Appium1_6_4\node.exe Arguments: "C:\ProgramData\TestWriterEnviroment\Appium\Appium1_6_4\node_modules\appium\build\lib\main.js" --port 4723 --address 127.0.0.1 --log C:\ProgramData\TestWriterData\Logs\androidEngineLog4723.txt.
Time 120000 ms for the service starting has been expired!
   在 OpenQA.Selenium.Appium.Service.AppiumLocalService.Start()
   在 TestWriter.Android.AppiumEmulator.Utils.AppiumServerManagerWithNativeSupport.?????????????????????????????????????????(AppiumLocalService )
   在 TestWriter.Android.AppiumEmulator.Utils.AppiumServerManagerWithNativeSupport.?????????????????????????????????????????(String , DesiredCapabilityInfo )
2017-08-29 11:23:41,765 ERROR TestWriter.Common.Log4net.Log4netLoggingService - OpenQA.Selenium.Appium.Service.Exceptions.AppiumServerHasNotBeenStartedLocallyException: The local appium server has not been started. The given Node.js executable: C:\ProgramData\TestWriterEnviroment\Appium\Appium1_6_4\node.exe Arguments: "C:\ProgramData\TestWriterEnviroment\Appium\Appium1_6_4\node_modules\appium\build\lib\main.js" --port 4731 --address 127.0.0.1 --log C:\ProgramData\TestWriterData\Logs\androidEngineLog4731.txt.
Time 120000 ms for the service starting has been expired!
   在 OpenQA.Selenium.Appium.Service.AppiumLocalService.Start()
   在 TestWriter.Android.AppiumEmulator.Utils.AppiumServerManagerWithNativeSupport.?????????????????????????????????????????(AppiumLocalService )
   在 TestWriter.Android.AppiumEmulator.Utils.AppiumServerManagerWithNativeSupport.?????????????????????????????????????????(String , DesiredCapabilityInfo )
2017-08-29 11:23:42,920 ERROR TestWriter.Common.Log4net.Log4netLoggingService - Restart AppiumDriver counts:1
2017-08-29 11:23:42,920 ERROR TestWriter.Common.Log4net.Log4netLoggingService - OpenQA.Selenium.WebDriverException: Unexpected error. System.Net.WebException: 无法连接到远程服务器 ---> System.Net.Sockets.SocketException: 由于目标计算机积极拒绝,无法连接。 127.0.0.1:4731
   在 System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   在 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- 内部异常堆栈跟踪的结尾 ---
   在 OpenQA.Selenium.Appium.Service.AppiumCommandExecutor.Execute(Command commandToExecute)
   在 OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   在 OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
   在 OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   在 OpenQA.Selenium.Appium.AppiumDriver`1.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   在 OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
   在 OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
   在 OpenQA.Selenium.Appium.AppiumDriver`1..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
   在 OpenQA.Selenium.Appium.AppiumDriver`1..ctor(Uri remoteAddress, ICapabilities desiredCapabilities, TimeSpan commandTimeout)
   在 OpenQA.Selenium.Appium.Android.AndroidDriver`1..ctor(Uri remoteAddress, DesiredCapabilities desiredCapabilities, TimeSpan commandTimeout)
   在 TestWriter.Android.AppiumEmulator.AndroidEmulator.?????????????????????????????????????????(DesiredCapabilityInfo )
   在 TestWriter.Android.AppiumEmulator.AndroidEmulator.Start(ApplicationCapability capability)


gengdong 发表于 2017-8-30 09:45:50

tw版本,Android版本

wendan1234 发表于 2017-8-30 14:54:08


tw版本:4.1.2.0 Android版本 7.0

sunshimeAime 发表于 2017-9-5 11:56:42

你是服务跟客户端装在不同电脑的吗?从报错来看不是说无法连接到服务器嘛?检查一下服务地址以及防火墙关了没有

JasonJue 发表于 2017-9-5 12:03:45

wendan1234 发表于 2017-8-30 14:54
tw版本:4.1.2.0 Android版本 7.0

麻烦提交一下对应的日志:C:\ProgramData\TestWriterData\Logs\androidEngineLog4723.txt. 或者可以远程协助看一下(QQ:839577481)
页: [1]
查看完整版本: 安卓手机启动连接报错