【问题标题】:Unable to launch WebDriverAgent because of xcodebuild failure exit Code 127由于 xcodebuild 失败退出代码 127,无法启动 WebDriverAgent
【发布时间】:2021-02-18 07:19:05
【问题描述】:

我在尝试运行 iOS appium 测试时收到此错误。似乎我在退出代码 127 失败时找不到太多信息。任何帮助都会很棒。谢谢

org.openqa.selenium.WebDriverException:处理命令时发生未知的服务器端错误。原始错误:由于 xcodebuild 失败,无法启动 WebDriverAgent:命令'/bin/bash /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/Scripts/carthage-wrapper.sh bootstrap - -平台 iOS,tvOS' 退出代码 127 构建信息:版本:'3.6.0',修订:'6fbf3ec767',时间:'2017-09-27T15:28:36.4Z' 系统信息:主机:'andriidd.local',ip:'192.168.29.55',os.name:'Mac OS X',os.arch:'x86_64',os.version:'10.14.4',java.version :'14.0.2' 驱动信息:driver.version:IOSDriver 远程堆栈跟踪:UnknownError:处理命令时发生未知的服务器端错误。原始错误:由于 xcodebuild 失败,无法启动 WebDriverAgent:命令'/bin/bash /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/Scripts/carthage-wrapper.sh bootstrap - -平台 iOS,tvOS' 退出代码 127 在 getResponseForW3CError (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9) 在 asyncHandler (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:381:37) 在 java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 在 java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 在 java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 在 java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) 在 java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481) 在 org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57) 在 org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104) 在 org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123) 在 java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) 在 java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958) 在 java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127) 在 java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502) 在 java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488) 在 java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) 在 java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150) 在 java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 在 java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543) 在 org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126) 在 org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73) 在 org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:138) 在 io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:89) 在 org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) 在 io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42) 在 io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) 在 io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1) 在 org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219) 在 org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142) 在 io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38) 在 io.appium.java_client.AppiumDriver.(AppiumDriver.java:83) 在 io.appium.java_client.AppiumDriver.(AppiumDriver.java:93) 在 io.appium.java_client.ios.IOSDriver.(IOSDriver.java:78) 在 AppTest.setupAppium(AppTest.java:36) 在 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 在 java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在 java.base/java.lang.reflect.Method.invoke(Method.java:564) 在 org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124) 在 org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59) 在 org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:458) 在 org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222) 在 org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142) 在 org.testng.SuiteRunner.privateRun(SuiteRunner.java:401) 在 org.testng.SuiteRunner.run(SuiteRunner.java:364) 在 org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) 在 org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84) 在 org.testng.TestNG.runSuitesSequentially(TestNG.java:1208) 在 org.testng.TestNG.runSuitesLocally(TestNG.java:1137) 在 org.testng.TestNG.runSuites(TestNG.java:1049) 在 org.testng.TestNG.run(TestNG.java:1017) 在 org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115) 在 org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) 在 org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

【问题讨论】:

    标签: ios automation appium


    【解决方案1】:

    这个问题可能与没有使用最新的cartage版本有关,请尝试运行:

    brew upgrade carthage

    然后直接在终端重新运行失败的命令:

    cd /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/Scripts/
    carthage-wrapper.sh bootstrap --platform iOS\,tvOS
    

    您也可以查看此issue 作为参考。

    【讨论】:

      猜你喜欢
      • 2019-03-06
      • 2018-07-25
      • 2020-03-11
      • 2018-08-21
      • 2018-12-23
      • 2021-10-06
      • 2019-07-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多