【问题标题】:Unable to launch WebDriverAgent because of xcodebuild failure: "Carthage binary is not found."由于 xcodebuild 失败,无法启动 WebDriverAgent:“找不到 Carthage 二进制文件。”
【发布时间】:2018-08-21 10:32:17
【问题描述】:

每次我尝试使用 iOS 功能启动 appium 桌面时,我都会收到以下错误:

由于 xcodebuild 失败,无法启动 WebDriverAgent:“找不到 Carthage 二进制文件。如果未安装,请使用 brew install carthage 安装,并确保安装 carthage 二进制文件的根文件夹存在于 PATH 环境变量中。

完整的appium日志可以在以下link找到

用于此的功能是:

{
"platformName": "iOS",
"deviceName": "iPhone X",
"app": "path/to/my/App.app",
"platformVersion": "11.2",
"automationName": "XCUITest",
"xcodeOrgId": "myXcodeOrgId",
"bundleId": "bundleIdOfMyApp"
}

哪个 carthage 输出是 /usr/local/bin/carthage,carthage 的版本是 0.28.0

XCode 版本为 9.2 (9C40b) 版

【问题讨论】:

  • 安装cathrage

标签: xcode appium appium-ios appium-desktop


【解决方案1】:

您需要先在您的机器上安装 Carthage,方法是在您的终端上执行以下命令

$ brew install carthage

更多详情请咨询here

【讨论】:

  • 即使已经安装了 carthage,我也遇到了这个问题,在这种情况下只需执行“brew reinstall carthage”即可。这为我解决了问题。
  • 遗憾的是,它对我不起作用。即使升级 carthage 的版本,我仍然收到相同的错误消息。
  • 检查您的基本路径是否在您的 bash 配置文件中正确设置。
【解决方案2】:

我也遇到了这个问题。你可以尝试在macOS桌面上重新安装appium。 https://github.com/appium/appium-desktop/releases/tag/v1.6.3 选择appium-desktop-1.6.3-mac.zip

【讨论】:

  • 添加一些描述 jere
  • 我不知道这是怎么发生的,但是我通过这一步解决了问题。我第一次安装 appium 但服务器没有设置。所以我的 macOS 上的 appium 没有权限。
【解决方案3】:

Carthage 文件夹有问题,请检查以下路径 /Applications/Appium.app/Contents/Resources/app/node_modules/appium-webdriveragent

Carthage 文件夹如果不存在,请按照以下步骤操作

Step-1:适用于 Appium 1.15.1 及更高版本

在终端中打开下面的路径 $ cd /Applications/Appium.app/Contents/Resources/app/node_modules

$ sudo chmod -R 777 。 appium-webdriveragent/*

步骤 2: 转到 1) $ cd /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent

2) sudo mkdir -p 资源/WebDriverAgent.bundle

3) sudo sh ./Scripts/bootstrap.sh -d

第 3 步: 构建带有签名的 WebDriverAgent 项目

在 XCode /Applications/Appium.app/Contents/Resources/app/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj 中打开下面的项目

【讨论】:

    猜你喜欢
    • 2020-03-11
    • 2019-03-06
    • 2021-10-06
    • 2018-07-25
    • 2021-02-18
    • 2019-07-13
    • 2017-03-28
    • 2018-12-23
    • 2015-11-13
    相关资源
    最近更新 更多