Can launch Appium 1.5 server via CLI but not via Appium.app

Mac OSX 10.10.5
Python 2.7.11
Appium-Python-Client 0.21
Xcode 7.2

I used to live in the beautiful, simple world of Appium.app until it stopped being maintained.

So, I’ve installed node and npm (into my /Users/ directory to negate sudo requirement), I’ve then installed the official Appium server 1.5, can launch it successfully via CLI, my tests run, my iOS sim is launched, everything is just dandy.

At least until I need to perform app discovery to update locators.

So I find this page which details plugging in the node and Appium server locations into Appium.app which should effectively return me to a fully 100% usable Appium.app experience including to both launch the server as well as the Inspector. However, it doesn’t work. It seems to be looking for main.js in the wrong location.

CHRIGRAH-M-2038:bin chrigrah$ which node /usr/local/bin/node CHRIGRAH-M-2038:bin chrigrah$ which appium /Users/chrigrah/npm/bin/appium

I plug those both into Appium.app Developer Settings. Click Launch. The server does not launch, no explicit error is documented. I’ve reset the And see this and only this.

Launching Appium with command: '/usr/local/bin/node' lib/server/main.js --command-timeout "7200" --debug-log-spacing --platform-version "8.1" --platform-name "iOS" --show-ios-log --default-device

Then there’s this, which seems to indicate main.js is in a different location.

CHRIGRAH-M-2038:bin chrigrah$ ls -al /Users/chrigrah/npm/bin/ total 32 drwxr-xr-x 6 chrigrah staff 204 Mar 8 16:12 . drwxr-xr-x 5 chrigrah staff 170 Jan 6 11:15 .. lrwxr-xr-x 1 chrigrah staff 44 Mar 8 16:12 appium -> ../lib/node_modules/appium/build/lib/main.js lrwxr-xr-x 1 chrigrah staff 47 Jan 6 11:23 appium-doctor -> ../lib/node_modules/appium/bin/appium-doctor.js lrwxr-xr-x 1 chrigrah staff 58 Mar 8 16:12 authorize-ios -> ../lib/node_modules/appium/node_modules/.bin/authorize-ios lrwxr-xr-x 1 chrigrah staff 47 Jan 6 11:23 authorize_ios -> ../lib/node_modules/appium/bin/authorize-ios.js

I’m sure I’m missing something simple. But I’m unable to figure out what it is.

Can’t you just launch Appium from CLI and then use the Inspector from the app without trying to start Appium from app?

Example: I sometimes will set a breakpoint in my scripts, run the test, and then open the Inspector to troubleshoot.

Caveat: I have not tried to use the Inspector with 1.5.

Caveat2: After what’s been done to your current Appium.app, you might need to delete & download again so that everything is set to default.

I can launch from CLI, then as long as a test has already invoked the simulator and it’s up and running, I can use launch the Inspector. So setting debug break points then launching the inspector is viable. So at least I’m not dead in the water.

But if I launch from CLI and simply attempt to click the Inspector, it throws an error “…could not start a new session…” and that’s that. Looks like it’s due to Appium.app not sending New Command Timeout as a number but as a string.

[MJSONWP] Calling AppiumDriver.createSession() with args: [{"platformName":"iOS","platformVersion":"8.1","newCommandTimeout":"999999","automationName":"Appium","deviceName":"iPhone 6"},null,null,null] [Appium] Creating new IosDriver session [Appium] Capabilities: [Appium] platformName: 'iOS' [Appium] platformVersion: '8.1' [Appium] newCommandTimeout: '999999' [Appium] automationName: 'Appium' [Appium] deviceName: 'iPhone 6' [Appium] app: '/Users/chrigrah/Library/Developer/Xcode/DerivedData/techsupp-epzjepnxayzshqcudjnpftxnsjjd/Build/Products/InHouse-iphonesimulator/TechnicalSupport.app' [BaseDriver] SessionNotCreatedError: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): newCommandTimeout must be of type number.

I wonder if it fails without a breakpoint because the app is changing state? I’m not sure.

I can launch the Inspector without a break point as long as a test has physically caused the simulator to be launched.

What I can’t do, and what I understand I should be able to do, is utilize Appium.app fully by simply pointing it to the node and appium paths from the CLI installs. That’s been the Appium dev team’s response to complaints that Appium.app hasn’t been maintained.

Anyway, I at least have one viable path for utilizing the Inspector so my blocker has been removed for now.

I would think that’s the case for the 1.4.X releases. 1.5 is supposed to be a complete rewrite so I would not expect that to work.