[Appium 1.7.0]Error: Carthage not found. Install using `brew install carthage` when use AppiumDriverLocalService start Appium Server
See original GitHub issueThe problem
Use AppiumDriverLocalService
Get “Error: Carthage not found. Install using brew install carthage
” error
In fact, carthage already installed
Warning: carthage 0.25.0 is already installed
Environment
- Appium version :V1.7.0
- Last Appium version that did not exhibit the issue (if applicable):1.7.0
- Desktop OS/version used to run Appium:Mac OS 10.12.6
- Node.js version (unless using Appium.app|exe):v8.2.1
- Mobile platform/version under test:iOS11
- Real device or emulator/simulator:Simulator
- Appium CLI or Appium.app|exe:Appium CLI(AppiumDriverLocalService, only AppiumDriverLocalService)
Details
If necessary, describe the problem you have been experiencing in more detail.
Link to Appium logs
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Error: Carthage not found. Install using brew install carthage
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at checkForDependencies$ (…/…/…/lib/wda/utils.js:58:9)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js💯21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
Error: Carthage not found. Install using brew install carthage
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at checkForDependencies$ (…/…/…/lib/wda/utils.js:58:9)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js💯21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
[debug] [BaseDriver] Event ‘wdaStartFailed’ logged at 1506353306468 (23:28:26 GMT+0800 (CST))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: “Carthage not found. Install using brew install carthage
”.
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[debug] [XCUITest] Removing WDA application from device
[debug] [BaseDriver] Event ‘wdaStartAttempted’ logged at 1506353317625 (23:28:37 GMT+0800 (CST))
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Error: Carthage not found. Install using brew install carthage
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at checkForDependencies$ (…/…/…/lib/wda/utils.js:58:9)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js💯21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
Error: Carthage not found. Install using brew install carthage
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at checkForDependencies$ (…/…/…/lib/wda/utils.js:58:9)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js💯21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
[debug] [BaseDriver] Event ‘wdaStartFailed’ logged at 1506353317628 (23:28:37 GMT+0800 (CST))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: “Carthage not found. Install using brew install carthage
”.
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[debug] [XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: “Carthage not found. Install using brew install carthage
”.
at XCUITestDriver.quitAndUninstall$ (…/…/lib/driver.js:381:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js💯21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Unable to launch WebDriverAgent because of xcodebuild failure: “Carthage not found. Install using brew install carthage
”.
at XCUITestDriver.quitAndUninstall$ (…/…/lib/driver.js:381:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js💯21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
[debug] [XCUITest] Not clearing log files. Use clearSystemFiles
capability to turn on.
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: “Carthage not found. Install using brew install carthage
”.
at XCUITestDriver.quitAndUninstall$ (…/…/lib/driver.js:381:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js💯21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
[HTTP] <-- POST /wd/hub/session 500 26591 ms - 262
Create a GIST which is a paste of your full Appium logs, and link them here.
Do NOT paste your full Appium logs here, as it will make this issue very long and hard to read!
If you are reporting a bug, always include Appium logs!
Code To Reproduce Issue [ Good To Have ]
Please remember that with sample code it’s easier to reproduce the bug and it’s much faster to fix it.
Please git clone https://github.com/appium/sample-code and use one of your favourite languages and sample apps to reproduce the issue.
In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.
import io.appium.java_client.MobileElement; import io.appium.java_client.ios.IOSDriver; import io.appium.java_client.remote.MobileCapabilityType; import main.java.com.dbyl.appiumServer.AppiumServerUtils;
import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.remote.DesiredCapabilities; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test;
import java.net.MalformedURLException; import java.net.URL; import java.util.concurrent.TimeUnit;
public class iOSBrowser { IOSDriver<MobileElement> driver; public URL url; DesiredCapabilities capabilities = new DesiredCapabilities();
@BeforeClass(alwaysRun = true)
public void startAppiumServer() {
capabilities.setCapability("platformName", "iOS");
//只需要在这里使用data provider控制一下版本,传入不同的版本号
capabilities.setCapability("platformVersion", "11.0");
AppiumServerUtils.getInstance().stopServer();
url = AppiumServerUtils.getInstance().startServer("127.0.0.1", 4723, capabilities);
}
@BeforeMethod
public void setUpDriver() throws MalformedURLException {
capabilities.setCapability("browserName", "safari");
if (capabilities.getCapability("platformVersion").toString().contains("11")) {
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");
capabilities.setCapability("platformVersion", "11.0");
capabilities.setCapability("deviceName", "iPhone SE");
} else {
capabilities.setCapability("platformVersion", "8.4");
capabilities.setCapability("deviceName", "iPhone 5s");
}
driver = new IOSDriver<MobileElement>(url, capabilities);
}
@Test
public void iOSTest() {
driver.get("http://www.baidu.com");
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
JavascriptExecutor jse = (JavascriptExecutor) driver;
String status = (String) jse.executeScript("var status=document.readyState;return status");
Assert.assertTrue(status.contains("complete"));
System.out.println(driver.getTitle());
jse = (JavascriptExecutor) driver;
jse.executeScript("document.getElementById('index-kw').value='appium'");
driver.findElement(By.xpath("//button[@id='index-bn']")).click();
System.out.println(driver.getTitle());
Assert.assertTrue(driver.getTitle().contains("appium"));
}
@AfterClass
public void afterTest() {
driver.quit();
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:11
Top GitHub Comments
I fixed this by doing the following steps:
1- Right click on your project > Run as > Run Configuration 2- Select Environment 3- Update your project PATH to be like this: /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin @tobecrazy @garlapati99
I fixed issue by doing the following steps: