Katalon Studio can't find my Appium installation on Mac

I’m running into an issue attempting to test our react-native iOS application on MacOS High Sierra. I have a clean install of Appium (have run appium-doctor w/out error), and Appium lives in /usr/loca/bin/appium. This is the default installation location of the npm install command.

However, I’m unable to set the path to the Appium directory in Preferences/Katalon/Mobile to this location location /usr/local/bin/appium.

Currently running:
Katalon 5.7.1 Build 1
MacOS 10.13.6

I am unable to clear the error ‘Value must be an existing directory’ regardless of what I change the path to (see the attached gif for the awkward UI interaction here). This causes recording of mobile UI tests to fail because the appium path is incorrect.

Please advise on how to work around this error. Thanks!
- Ryan

katalonAppiumError.gif

2 Likes

Is that the correct location to store Appium? If you install Appium by default, you will need to use this path:
/usr/local/lib/node_modules/appium

Regards

Hi Ryan,

Did you use nvm (Node Version Manager) to install node? If so, it’s going to put appium into a version-specific location, like:

/Users/chris/.nvm/versions/node/v9.2.0/lib/node_modules/appium/

If you’re not using nvm, then Vinh’s suggestion above for the location is correct. You may need to use browse to get to the folder for Katalon to accept your choice.

Hope this helps,

Chris

1 Like

Hi guys, thanks for the responses - I had already installed node via homebrew, which is the recommended method based on the doc here: https://www.katalon.com/videos/ios-mobile-testing/, which is also installed at /user/local/bin/node - the same root location as appium, so I’m not sure how nvm plays into this unless the docs need updating?

However, another part of my issue is, the UI appears broken because even when I copy+paste /usr/local/lib/node_modules/appium, the UI doesn’t let me (the ‘Apply’ button remains disabled as in the attached gif above).

According to the error, Katalon can’t tell what a valid directory is on the Mac. Thanks again for any other pointers!

Hi Ryan,

I had the same problem with the UI where it wouldn’t let me enter a directory that I knew was valid after I had ever put an invalid one in there. For me, the trick was to type the correct path and then explicitly hit the TAB key to get the Apply and OK buttons to reactivate.

Hope this helps,

Chris

Hi Chris, thanks for the suggestion! Unfortunately, starting from an error-free state, typing the path, and tabbing out of the field immediately disables the ‘Apply’ button, so that doesn’t work either.

It’s quite a frustrating bug that blocks any attempts to test the mobile tools

Hi Ryan,

If you want to bypass the dialog altogether, you can edit the preferences file directly at:

/Applications/Katalon Studio.app/Contents/MacOS/config/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.kms.katalon.composer.mobile.prefs

- Chris

Very cool Chris, appreciate the continued tips!

Maybe part of my issue is that I don’t have the `com.kms.katalon.composer.mobile.prefs` file in the /.settings dir?

Perhaps something went sideway with my installation?

Could be an install problem or could be that the file doesn’t exist by default and it only saves when it’s successful. Here’s what mine looks like for reference:

eclipse.preferences.version=1
mobile.appiumDirectory=/Users/chris/.nvm/versions/node/v9.2.0/lib/node_modules/appium/

I wonder if you create that file manually and relaunch Katalon if it will find Appium for you.

- Chris

Ok, so I reinstalled Katalon, and now have the mobile.prefs file - it shows the correct appium path per my file system /usr/local/bin/appium.

Just rolling with that and attempting to work around the error, I fired up the iOS Mobile Recorder, selecting the Device and Application File Path, but get te error ‘Appium directory is invalid: Cannot find appium executable file’

Unsure if this gives any more clues?

Can you try using the following for your Appium location; it’s not really the binary file but the location of all the library files, which is what Katalon Studio really needs:

/usr/local/lib/node_modules/appium

- Chris

1 Like

Hey Chris - thanks for the suggestion, that got me past the error! Now I need to figure out why Katalon things my xCode version is 0.0 (lol), but will do some digging on that first.

Again, appreciate the patience and continued responses!

Oh yeah, Xcode 10 isn’t supported by Katalon Studio yet, so you have to install an older version (9.4.1 is what I have) alongside Xcode 10. You can do this by going to https://developer.apple.com/download/more/ and downloading the older one.

You’ll be asked to “Keep Both” when you install - do that. I named mine “Xcode_9.4.app”. Then you’ll have to set the default version to the older version:

sudo xcode-select -s /Applications/Xcode_9.4.app/Contents/Developer

Enter your login/system password when prompted.

Now you can use Xcode 10 to develop, but still run Katalon Studio.

- Chris

1 Like