Appium inspector unable to launch mac application proporly

We are trying to use appium inspector to identify elements of mac application. But we are getting below error when we are trying to start the session with below capabilities:
{
“platformName”: “Mac”,
“platformVersion”: “10.13.5”,
“deviceName”: “Mac”,
“app”: “/Applications/Calendar.app”
}

Configuration:
MAC OS: Mac High Sierra #10.13.5
Appium version: v1.7.2
AppiumForMac Version: 1.1.0

Logs:

The server is running

[Appium] Welcome to Appium v1.8.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/sessions
[HTTP] {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 7 ms - 40
[HTTP]
[HTTP] --> POST /wd/hub/session
[HTTP] {“desiredCapabilities”:{“app”:"/Applications/Calendar.app",“deviceName”:“Mac”,“platformName”:“Mac”,“platformVersion”:“10.13.5”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Applications/Calendar.app",“deviceName”:“Mac”,“platformName”:“Mac”,“platformVersion”:“10.13.5”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true},null,null]
[BaseDriver] Event ‘newSessionRequested’ logged at 1530191782045 (18:46:22 GMT+0530 (IST))
[Appium] Creating new MacDriver (v1.2.0) session
[Appium] Capabilities:
[Appium] app: /Applications/Calendar.app
[Appium] deviceName: Mac
[Appium] platformName: Mac
[Appium] platformVersion: 10.13.5
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true
[BaseDriver] Creating session with MJSONWP desired capabilities: {“app”:"/Applications/Calen…
[BaseDriver] The following capabilities were provided, but are not recognized by appium: app, connectHardwareKeyboard.
[BaseDriver] Session created with session id: 6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7
[MacDriver] Killing any old AppiumForMac
[MacDriver] Successfully cleaned up old Appium4Mac servers
[MacDriver] Spawning AppiumForMac with: undefined
[Appium4Mac] [STDERR] 2018-06-28 18:46:22:551 AppiumForMac[4215:307] HTTPServer: Started HTTP server on port 4622
[JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:4622/wd/hub/session] with body: {“desiredCapabilities”:{“app”:"/Applications/Calendar.app",“deviceName”:“Mac”,“platformName”:“Mac”,“platformVersion”:“10.13.5”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true}}
[JSONWP Proxy] Got response with status 200: {“status”:0,“sessionId”:“6HtSRFUG”,“value”:{“locationContextEnabled”:false,“webStorageEnabled”:false,“browserName”:“Mac”,“platform”:“Mac”,“databaseEnabled”:false,“version”:“10.13.5”,“javascriptEnabled”:true,“takesScreenshot”:true,“nativeEvents”:true}}
[MacDriver] Automatically navigating to app ‘/Applications/Calendar.app’
[JSONWP Proxy] Proxying [POST /url] to [POST htp://127.0.0.1:4622/wd/hub/session/6HtSRFUG/url] with body: {“url”:"/Applications/Calendar.app"}
[JSONWP Proxy] Got response with status 200: {“status”:0,“sessionId”:“6HtSRFUG”}
[Appium] New MacDriver session created successfully, session 6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7 added to master session list
[BaseDriver] Event ‘newSessionStarted’ logged at 1530191784733 (18:46:24 GMT+0530 (IST))
[MJSONWP] Responding to client with driver.createSession() result: {“app”:"/Applications/Calendar.app",“deviceName”:“Mac”,“platformName”:“Mac”,“platformVersion”:“10.13.5”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true}
[HTTP] <-- POST /wd/hub/session 200 2690 ms - 229
[HTTP]
[HTTP] --> POST /wd/hub/session/6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7/context
[HTTP] {“name”:“NATIVE_APP”}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7/context] to [POST htp://127.0.0.1:4622/wd/hub/session/6HtSRFUG/context] with body: {“name”:“NATIVE_APP”}
[JSONWP Proxy] Got response with status 200: {“status”:9,“sessionId”:“6HtSRFUG”,“value”:{“message”:“Could not find selector (post_context:data:) for path ‘/session/6HtSRFUG/context’.”}}
[JSONWP Proxy] Replacing sessionId 6HtSRFUG with 6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7
[HTTP] <-- POST /wd/hub/session/6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7/context 200 6 ms - 168
[HTTP]
[HTTP] --> GET /wd/hub/session/6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7/source
[HTTP] {}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [GET /wd/hub/session/6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7/source] to [GET htp://127.0.0.1:4622/wd/hub/session/6HtSRFUG/source] with body: {}
[JSONWP Proxy] Got response with status 200: “{\n “status” : 0,\n “sessionId” : “6HtSRFUG”,\n “value” : “\n”\n}”
[JSONWP Proxy] Replacing sessionId 6HtSRFUG with 6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7
[HTTP] <-- GET /wd/hub/session/6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7/source 200 4 ms - 99
[HTTP]
[HTTP] --> GET /wd/hub/session/6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7/screenshot
[HTTP] {}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [GET /wd/hub/session/6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7/screenshot] to [GET http://127.0.0.1:4622/wd/hub/session/6HtSRFUG/screenshot] with body: {}
[JSONWP Proxy] Got response with status 200: "{\n “status” : 0,\n “sessionId” : “6HtSRFUG”,\n “value” : "TU0AKgE8aAjh7fb\/4e32\/+Ht9v\/h7fb\/4e32\/+Ht9v\/h7fb\/4e32\/+Ht9v\/h7fb\/\r\n4e32\/+Ht9v\/h7fb\/4e32\/+Ht9v\/h7fb\/4e32\/+Ht9v\/h7fb\/4e32\/+Ht9v\/h7fb\/\r\n4e32\/+Ht9v\/h7fb\/4e32\/+Lt9v\/i7fb\/4u32\/+Lt9v\/i7fb\/4u32\/+Lt9v\/h7fb\/\r\n4e32\/+Ht9v\/h7fb\/4e32\/+Ht9v\/h7fb\/4e32\/+Ht9v\/h7fb\/4e32\/+Ht9v\/h7fb\/\r\n4e32\/+Ht9v\/h7fb\/4e32\/+Ht9v\/h7fb\/4e32\/+Ht9v\/h7fb\/4e32\/+Ht9v\/h7fb\/\r\n4e32\/+Ht9v\/h7fb\/4u32\/+Lt9v\/i7fb\/4u32\/+Lt9v\/i7fb\/4u32\/+Lt9v\/i7fb\/\r\n4u32\/+Lt9v\/i7fb\/4u32\/+Lt9v\/i7fb\/4u32\/+Lt9v\/i7fb\/4u32\/+Lt9v\/i7fb\/\r\n4u32\/+Lt9v\/i7fb\/4u32\/+Lt9v\/i7fb\/4u32\/+Lt9v\/i7fb\/4u32\/+Lt9v\/i7fb\/\r\n4u32\/+Lt9v\/i7fb\/4u32\/+Lt9v\/i7fb\/4u32\/+Lt9v\/i7fb\/4u32\/+Lt9\/\/i7ff\/\r\n4u33\/+Lt9\/\/i7ff\/4u33\/+Lt9\/\/i7ff\/4u33\/+Lt9\/\/i7ff\/4u33\/+Lt9\/\/i7ff\/\r\n4u3…
[JSONWP Proxy] Replacing sessionId 6HtSRFUG with 6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7
[HTTP] <-- GET /wd/hub/session/6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7/screenshot 200 1646 ms - 29383858
[HTTP]
[HTTP] --> GET /wd/hub/session/6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7/window/current/size
[HTTP] {}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [GET /wd/hub/session/6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7/window/current/size] to [GET http://127.0.0.1:4622/wd/hub/session/6HtSRFUG/window/current/size] with body: {}
[Appium4Mac] [STDERR] 2018-06-28 18:46:30.764 AppiumForMac[4215:176710] Exception in dispatch_sync(dispatch_get_main_queue()): *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]
[JSONWP Proxy] Got response with status 200: “{\n “status” : 7,\n “sessionId” : “6HtSRFUG”,\n “value” : {\n “message” : “An element could not be located on the page using the given search parameters.”\n }\n}”
[JSONWP Proxy] Replacing sessionId 6HtSRFUG with 6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7
[HTTP] <-- GET /wd/hub/session/6ca8b8d0-7643-4731-a8fd-b9d1e2330ae7/window/current/size 200 5 ms - 164
[HTTP]

Here’s an example python script:

Looks like they get the app they want to automate like this:

print 'Opening the "Calculator" app'
driver.get("Calculator")

Have you read the documentation on this?

http://appium.io/docs/en/drivers/mac/

I don’t think it works, ‘Out of the box’. Some setup is required.

Thanks @wreed for quick replay. I redded the documentation. I could able to run the script using java but i am looking for the inspectors which would be helpful for identifying elements xpaths etc I have gone through default “Accessibility Inspector” of xcode but i could not find much comfort. I have been using “Appium Inspector” for IOS mobile automation hence I am trying to get same for mac also. You have mentioned "
Some setup is required." ==> If you don’t mind, could you please help me with the required setup?

Full disclosure: I have not automated OS X apps with this.

However, the documentation I’m referring to I linked in my post above. There is an app you need to install & more. Good luck.

hello,I just started to use AppiumForMac.
Using Appium Inspector to get element, but appear to “parsererror”.
I wonder if you have solved the problem, could you help me with the problem?
Very grateful!
xcode9.3
appium desktop 1.6.1
appiumForMac 1.1.0

@Chandra0714 are u using a real device?

Hi
I am facing similar issue. My requirement is to automate mac desktop application.
I installed appium 1.10 (tried 1.9.0 as well) for mac. Installed appiumformac 1.1.0.
Any pointers would be appreciated.

  1. My mac version is 10.13.6 high sierra. Launched appium successfully from applications folder
  2. Launched inspector with the correct desired capabilities with the appName of the desktop application
  3. It gave some xpath of the desktop but did not launch the actual app
  4. console log gives the below message .

[info] e[35m[JSONWP Proxy]e[39m Replacing sessionId JoqX4hfG with 0516aea4-37a2-4c8f-b7cf-6e093c15af7e
[info] e[35m[HTTP]e[39m e[37m<-- GET /wd/hub/session/0516aea4-37a2-4c8f-b7cf-6e093c15af7e/screenshot e[39me[32m200e[39m e[90m10144 ms - 39992650e[39m
[info] e[35m[HTTP]e[39m e[90me[39m[info] e[35m[HTTP]e[39m e[37m–>e[39m e[37mGETe[39m e[37m/wd/hub/session/0516aea4-37a2-4c8f-b7cf-6e093c15af7e/window/current/sizee[39m
[info] e[35m[HTTP]e[39m e[90m{}e[39m
[info] e[35m[MJSONWP (0516aea4)]e[39m Driver proxy active, passing request on via HTTP proxy
[debug] e[35m[JSONWP Proxy]e[39m Matched ‘/wd/hub/session/0516aea4-37a2-4c8f-b7cf-6e093c15af7e/window/current/size’ to command name ‘getWindowSize’
[debug] e[35m[JSONWP Proxy]e[39m Proxying [GET /wd/hub/session/0516aea4-37a2-4c8f-b7cf-6e093c15af7e/window/current/size] to [GET http://127.0.0.1:4622/wd/hub/session/JoqX4hfG/window/current/size] with body: {}
[debug] e[35m[JSONWP Proxy]e[39m Got response with status 200: “{\n “status” : 0,\n “sessionId” : “JoqX4hfG”,\n “value” : {\n “width” : 0,\n “height” : 0\n }\n}”
[info] e[35m[JSONWP Proxy]e[39m Replacing sessionId JoqX4hfG with 0516aea4-37a2-4c8f-b7cf-6e093c15af7e
[info] e[35m[HTTP]e[39m e[37m<-- GET /wd/hub/session/0516aea4-37a2-4c8f-b7cf-6e093c15af7e/window/current/size e[39me[32m200e[39m e[90m14 ms - 94e[39m