Getting an error - Appium directory is not set. Please set it in Window/Katalon Studio Preferences

Hi,

I am trying to execute test suite through TFS build but getting below error message:-

05-28-2018 01:58:30 em - [FAILED] - Unable to start app at: ‘C:\\xxx\\KatalonStudio_LMO\\APKs\\20180525\\250518_xxx_xxxAndroidSE_release.apk’ (Root cause: com.kms.katalon.core.appium.exception.AppiumStartException: Appium directory is not set. Please set it in Window/Katalon Studio Preferences/Katalon/Mobile.)

05-28-2018 01:58:30 em - [END] - End action : startApplication

05-28-2018 01:58:30 em - [FAILED] - Test Cases/xxx Login/xxx_Login FAILED because (of) Unable to start app at: ‘C:\\xxx\\KatalonStudio_xxx\\APKs\\20180525\\250518_xxx_xxxAndroidSE_release.apk’ (Root cause: com.kms.katalon.core.appium.exception.AppiumStartException: Appium directory is not set. Please set it in Window/Katalon Studio Preferences/Katalon/Mobile.)

I have already set the appium directory at the mentioned path but still getting an error message.

This is the below extract from appium.log:-

[MJSONWP] Driver proxy active, passing request on via HTTP proxy

[JSONWP Proxy] Replacing sessionId 84c72f43-b6d4-4c57-82ed-08cb439a466c with 2302d888-04ca-4339-adfa-4490992530f0

[HTTP] <-- GET /wd/hub/session/2302d888-04ca-4339-adfa-4490992530f0/source 200 324 ms - 3669

[HTTP] --> GET /wd/hub/session/2302d888-04ca-4339-adfa-4490992530f0/screenshot {}

[HTTP] <-- GET /wd/hub/session/2302d888-04ca-4339-adfa-4490992530f0/screenshot 200 742 ms - 63394

[HTTP] --> GET /wd/hub/session/2302d888-04ca-4339-adfa-4490992530f0/source {}

[MJSONWP] Driver proxy active, passing request on via HTTP proxy

[JSONWP Proxy] Replacing sessionId 84c72f43-b6d4-4c57-82ed-08cb439a466c with 2302d888-04ca-4339-adfa-4490992530f0

[HTTP] <-- GET /wd/hub/session/2302d888-04ca-4339-adfa-4490992530f0/source 200 179 ms - 14497

[HTTP] --> GET /wd/hub/session/2302d888-04ca-4339-adfa-4490992530f0/screenshot {}

[HTTP] <-- GET /wd/hub/session/2302d888-04ca-4339-adfa-4490992530f0/screenshot 200 692 ms - 164586

[HTTP] --> DELETE /wd/hub/session/2302d888-04ca-4339-adfa-4490992530f0 {}

[Appium] Removing session 2302d888-04ca-4339-adfa-4490992530f0 from our master session list

[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: ProxyRequestError: Could not proxy command to remote server. Original error: Error: read ECONNRESET

[HTTP] <-- DELETE /wd/hub/session/2302d888-04ca-4339-adfa-4490992530f0 200 1494 ms - 76

What is your Appium directory which you’ve used in this case? It should be the following directory:

Windows: (Window → Katalon Studio Preferences → Mobile → Appium Directory)

C:\Users\<Username>\AppData\Roaming\npm\node_modules\appium

MacOS: (Katalon Studio → Preferences → Mobile → Appium Directory)
/usr/local/lib/node_modules/appium

@Vinh Nguyen - I have already set the appium directory to the path you have mentioned in above comment.
When I run the test suite using TFS build I am getting error - “Appium directory is not set. Please set it in Window/Katalon Studio Preferences”
But when it is run through command line it is working as expected.
Can you please help me to find out the root cause for this?

===

I also get this error and have the correct file path for appium. Any update on this issue?

This might help
have you installed Node.JS?
If it was installed, so you can use cmd (without administrator run) and type this
npm install -g appium@1.8.1

i prefer use appium at 1.8.1 version, bcause the latest version is not supported yet on katalon
source: https://docs.katalon.com/display/KD/Mobile+on+Windows

and afterwards the appium will installed on this directory
C:\Users\<Username>\AppData\Roaming\npm\node_modules\appium