IOS Issues clicking on some elements: An unknown server-side error occurred while processing the command

I have an issue clicking on an element, the error only happens if I run the TestCases on SauceLabs, if I run the same set of TestCases locally with Appium, the all past, but when running on SauceLabs I get this:

POST element/14/click
1m 60s (+0.71s)
id: “14”
=> An unknown server-side error occurred while processing the command.

If I check the Selenium Log, it seems like if it founds the element, but then it can’t click on it.

2014-11-06T16:47:55.696Z - debug: Got result from instruments: {“status”:0,“value”:{“ELEMENT”:“14”}}
10112014-11-06T16:47:55.696Z - debug: Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“14”},“sessionId”:“315eb00-02f4-4382-b61b-402072b9”}
10122014-11-06T16:47:55.697Z - info: ← POST /wd/hub/session/315eb00-02f4-4382-b61b-402072b9/element 200 4121.116 ms - 88 {“status”:0,“value”:{“ELEMENT”:“14”},“sessionId”:“315eb00-02f4-4382-b61b-402072b9”}

This tells me that the element was successfully found.
But them when it have to perform the click I got this:

10192014-11-06T16:47:55.871Z - debug: [INST] 2014-11-06 16:47:55 +0000 Debug: Got new command 46 from instruments: au.tapById(‘14’)
1020 2014-11-06 16:47:55 +0000 Debug: evaluating au.tapById(‘14’)
1021
10222014-11-06T16:47:55.871Z - debug: [INST] 2014-11-06 16:47:55 +0000 Debug: target.frontMostApp().elements()[0].elements()[13].elements()[0].elements()[3].tap()
1023
10242014-11-06T16:47:56.378Z - debug: [INST] 2014-11-06 16:47:56 +0000 Debug: target.frontMostApp().elements()[0].elements()[13].elements()[0].elements()[3] could not be tapped

So, what it’s happening there?
It finds the element but can’t click it.

@jonahss have you seen any similar behavior or have you any thoughts related to this?

Hm. It’s tapping the right element. The error message “could not be tapped” comes from instruments, so for whatever reason iOS Intruments cannot tap that element. Not sure what we can do.

Even i am facing this issue, with Jenkins. My Script finds the element when run locally, but fails on CI. And it gives this unknown server side error .

I already asked on saucelabs support for some help, because the issue seems to be related to the Instruments / Simulator on the VM created when running the TestCases.
But I haven’t received a good answer yet.

@jonahss looks like it doesn’t even clicked on the element; it received the click action and dies before performing it

It’s really weird that it’s an issue on Sauce but not locally. What version of iOS is it?

This is my local config:
OSX = 10.9.4 (Mavericks)
XCode = 5.1.1
XCode = 6.0.1
Appium = 1.3.1 (Ophiuchus)

I use XCode6 to build the app, but Appium is pointing to XCode5 to run the simulator.
I build the apps for iOS7.1, so XCode5 Simulator will work fine that way. This same app is the one I’m using on the Saucelabs runs.

And the capabilities settings>
capabilities.setCapability(“appium-version”, “1.0”);
capabilities.setCapability(“platformName”, “iOS”);
capabilities.setCapability(“platformVersion”, “7.1”);
capabilities.setCapability(“deviceName”, “iPhone Simulator”);

@Shrey_Mehta @jonahss @Neto18

I am also facing the exact same issue where whatever elements have been declared using the PageFactory mode (JAVA) cannot be located on the Travis CI tool am using. Even though everything works just fine locally.
Could it be that the Build language on the CI tool is Objective-C and am using jAVA in my tests? Still…it will run the simple appium commands…but not find/locate any elements that were declared using the page factory model

Have any one solution a am laso facing the same issue with appium 1.5.3 do no know how to do
Localy its woring fine

[debug] [iOS] Waiting for app source to contain elements
[debug] [UIAuto] Sending command to instruments: au.mainApp().getTreeForXML()
[debug] [Instruments] [INST] 2016-08-10 07:18:45 +0000 Debug: Got new command 2 from instruments: au.mainApp().getTreeForXML()
[debug] [Instruments] [INST] 2016-08-10 07:18:45 +0000 Debug: evaluating au.mainApp().getTreeForXML()
[debug] [Instruments] [INST] 2016-08-10 07:18:47 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-08-10 07:18:47 +0000 Debug: responding with:ue,“visible”:true,“hint”:null,“path”:"/0/0",“x”:0,“y”:0,“width”:320,“height”:568},">":[{“UIANavigationBar”:{"@":{“name”:“9443”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/0",“x”:0,“y”:20,“width”:320,“height”:44},">":[{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/0/0",“x”:0,“y”:0,“width”:320,“height”:64},">":[{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/0/0/0",“x”:0,“y”:64,“width”:320,“height”:0.5},">":[]}}]}},{“UIAButton”:{"@":{“name”:“Back”,“label”:“Back”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/0/1",“x”:8,“y”:31.5,“width”:21,“height”:21},">":[]}},{“UIAButton”:{"@":{“name”:“9443”,“label”:“9443”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/0/2",“x”:139.5,“y”:42,“width”:41,“height”:0},">":[]}},{“UIAButton”:{"@":{“name”:“Add”,“label”:“Add”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/0/3",“x”:275.5,“y”:26,“width”:40,“height”:30},">":[]}}]}},{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/1",“x”:0,“y”:64,“width”:320,“height”:44},">":[]}},{“UIASegmentedControl”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/2",“x”:8,“y”:71,“width”:304,“height”:29},">":[{“UIAButton”:{"@":{“name”:“Title”,“label”:“Title”,“value”:"",“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/2/0",“x”:8,“y”:71,“width”:151,“height”:29},">":[]}},{“UIAButton”:{"@":{“name”:“Title”,“label”:“Title”,“value”:"",“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/2/1",“x”:160,“y”:71,“width”:152,“height”:29},">":[]}}]}},{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/3",“x”:0,“y”:64,“width”:320,“height”:44},">":[]}},{“UIASearchBar”:{"@":{“name”:“Search”,“label”:“Search”,“value”:“Search”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/4",“x”:8,“y”:72,“width”:240,“height”:28},">":[]}},{“UIAButton”:{"@":{“name”:“Cancel”,“label”:“Cancel”,“value”:null,“dom”:null,“enabled”:false,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/5",“x”:259,“y”:70,“width”:53,“height”:30},">":[]}},{“UIATableView”:{"@":{“name”:null,“label”:null,“value”:“rows 1 to 6 of 7”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6",“x”:0,“y”:107,“width”:320,“height”:460},">":[{“UIATableGroup”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/6/0",“x”:0,“y”:107,“width”:320,“height”:0.01000213623046875},">":[]}},{“UIATableCell”:{"@":{“name”:“My Contacts”,“label”:null,“value”:"",“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6/1",“x”:0,“y”:107.01000213623047,“width”:320,“height”:88.00000762939453},">":[{“UIAStaticText”:{"@":{“name”:“My Contacts”,“label”:“My Contacts”,“value”:“My Contacts”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6/1/0",“x”:68,“y”:125.00999450683594,“width”:164,“height”:19},">":[]}},{“UIAStaticText”:{"@":{“name”:“Private, not shared”,“label”:“Private, not shared”,“value”:“Private, not shared”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6/1/1",“x”:86,“y”:144.00999450683594,“width”:177,“height”:18},">":[]}},{“UIAStaticText”:{"@":{“name”:“Rev No. - 1”,“label”:“Rev No. - 1”,“value”:“Rev No. - 1”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6/1/2",“x”:71,“y”:162.00999450683594,“width”:194,“height”:16},">":[]}},{“UIAStaticText”:{"@":{“name”:“117”,“label”:“117”,“value”:“117”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6/1/3",“x”:263,“y”:141.00999450683594,“width”:42,“height”:20},">":[]}},{“UIAButton”:{"@":{“name”:“caller 50x50”,“label”:“caller 50x50”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6/1/4",“x”:12,“y”:119.00999450683594,“width”:45,“height”:45},">":[]}}]}},{“UIATableGroup”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/6/2",“x”:0,“y”:195.010009765625,“width”:320,“height”:0.0099945068359375},">":[]}},{“UIATableGroup”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/6/3",“x”:0,“y”:195.02000427246094,“width”:320,“height”:14},">":[]}},{“UIATableCell”:{"@":{“name”:“Cjrghg”,“label”:null,“value”:"",“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6/4",“x”:0,“y”:209.02000427246094,“width”:320,“height”:88.00001525878906},">":[{“UIAStaticText”:{"@":{“name”:“Cjrghg”,“label”:“Cjrghg”,“value”:“Cjrghg”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6/4/0",“x”:68,“y”:227.02000427246094,“width”:164,“height”:19},">":[]}},{“UIAStaticText”:{"@":{“name”:“Shared with all members”,“label”:“Shared with all members”,“value”:“Shared with all members”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6/4/1",“x”:87,“y”:246.02000427246094,“width”:177,“height”:18.000015258789062},">":[]}},{“UIAStaticText”:{"@":{“name”:“Rev No. - 11”,“label”:“Rev No. - 11”,“value”:“Rev No. - 11”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6/4/2",“x”:71,“y”:264.02001953125,“width”:194,“height”:16},">":[]}},{“UIAStaticText”:{"@":{“name”:“0”,“label”:“0”,“value”:“0”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6/4/3",“x”:263,“y”:243.02000427246094,“width”:42,“height”:20.000015258789062},">":[]}},{“UIAButton”:{"@":{“name”:“caller 50x50”,“label”:“caller 50x50”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6/4/4",“x”:12,“y”:221.02000427246094,“width”:48,“height”:48.00001525878906},">":[]}}]}},{“UIATableCell”:{"@":{“name”:“Vendors”,“label”:null,“value”:"",“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6/5",“x”:0,“y”:297.02001953125,“width”:320,“height”:88},">":[{“UIAStaticText”:{"@":{“name”:“Vendors”,"lab

Even I am facing the same issue in appium 1.5.3. Does anyone has a solution??

Cannot set value on element: target.frontMostApp().elements()[0].elements()[1].elements()[3].elements()[4].elements()[0]

Appium log:
[debug] [UIAuto] Socket data received (146 bytes)
[debug] [UIAuto] Got result from instruments: {“status”:17,“value”:“Cannot set value on element: target.frontMostApp().elements()[0].elements()[1].elements()[3].elements()[4].elements()[0]”}
[HTTP] <-- POST /wd/hub/session/1f0c2334-a328-413b-a0d4-4af197b3a0cc/appium/element/12/value 500 1286 ms - 207
[debug] [Instruments] [INST] 2017-01-09 19:31:06 +0000 Error: VerboseError: Cannot set value on element: target.frontMostApp().elements()[0].elements()[1].elements()[3].elements()[4].elements()[0]

[debug] [Instruments] [INST] 2017-01-09 19:31:06 +0000 Error: Error during eval: setValue@[native code]
[debug] [Instruments] [INST] eval code
[debug] [Instruments] [INST] eval@[native code]
[debug] [Instruments] [INST] startProcessing@file:///Applications/Appium.app/Contents/Resources/node_modules/DF2BB8B6-4B49-4440-B782-6764E76DEF57/bootstrap-127a68ad74e63859.js:2793:30
[debug] [Instruments] [INST] bootstrap@file:///Applications/Appium.app/Contents/Resources/node_modules/DF2BB8B6-4B49-4440-B782-6764E76DEF57/bootstrap-127a68ad74e63859.js:2861:31
[debug] [Instruments] [INST] global code@file:///Applications/Appium.app/Contents/Resources/node_modules/DF2BB8B6-4B49-4440-B782-6764E76DEF57/bootstrap-127a68ad74e63859.js:2870:10
[debug] [Instruments] [INST] 2017-01-09 19:31:06 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2017-01-09 19:31:06 +0000 Debug: Running system command #141: /Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/zs/n5kr330s0dl_4zcrg7n3nzjm0000gn/T/instruments_sock 2,{“status”:17,"…

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.5.3”…
[HTTP] <-- GET /wd/hub/status 200 142 ms - 83

[HTTP] --> GET /wd/hub/status {}