appium / appium/java-client

Getting exception Command 'xcrun' is not found. Is it installed? while executing using eclipse

Open
#1,233 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

User side problem/problem of an external tool
Dominant language
Java
Stars
1.3k
Forks
752
Avg merge
6d 21h
Merged PRs (30d)
8

Description

The problem

When I am trying to start the appium server programmatically and then instantiate the IOSDriver, I am getting the Exception Command 'xcrun' is not found. Is it installed?

Environment

  • Appium version (or git revision) that exhibits the issue:1.13.0
  • Desktop OS/version used to run Appium: macOS Mojave
  • Node.js version (unless using Appium.app|exe):v12.6.0
  • Npm or Yarn package manager: Npm
  • Mobile platform/version under test: ios 12.4
  • Real device or emulator/simulator: Simulator

Details

Please find the testng trace:
java.lang.RuntimeException: Failed to initialize Test --- Failed to start Device --- Error in starting the DeviceFailed to getDriver --- An unknown server-side error occurred while processing the command. Original error: Command 'xcrun' not found. Is it installed?
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T15:28:36.4Z'
System info: host: 'HQSML-152086', ip: '2601:88:8201:5f80:b91e:11d:3bdd:5188', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_151'
Driver info: driver.version: GetMobileDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Command 'xcrun' not found. Is it installed?
at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9)
at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:447:37)
at com.comcast.utils.ComcastTestMain.startTestMain(ComcastTestMain.java:1138)
at com.comcast.utils.ComcastTestMain.beforeTest_startTestMain(ComcastTestMain.java:955)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:510)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:211)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at org.testng.TestRunner.beforeRun(TestRunner.java:648)
at org.testng.TestRunner.run(TestRunner.java:616)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1191)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1116)
at org.testng.TestNG.run(TestNG.java:1024)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

I am not getting this issue when I am starting the appium server manually and instantiating the IOSDriver

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at ComcastTestMain.startTestMain (line 1138) and beforeTest_startTestMain (line 955), comparing the programmatic Appium startup with the manual startup described in the issue. Reproduce the IOSDriver initialization on the listed macOS, Appium, Node.js, and iOS versions; done means the programmatic path no longer reports that xcrun is unavailable, or the required limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.