Appium 1.6.4, IOS 10.2 Simulator, XCUITest WDA swipe and dragFromToForDuration hanging

TL;DR – Swiping and dragFromToForDuration “succeeding” but taking > 4 minutes on IOS 10.2 Simulator

I’ve seen multiple people mention this, with various workarounds / things that were supposedly already fixed, but I’ve tried all the options available (also the other threads mentioned 1.6.4-beta)

I have uninstalled the WebDriverAgent from the simulator, I have uninstalled/reinstalled Appium, I have cleared out all WebDriverAgent builds from “~/Library/Developer/Xcode/DerivedData/WebDriverAgent-*” and have tried an “xcodebuild clean” in appium/node_modules/appium-xcuitest-driver/WebDriverAgent

Unfortunately the appium log doesn’t have anything much in it (this is with IOS logs enabled). I’ve also tried to bypass everything appium is doing, and just execute “mobile: swipe”. Has anyone figured out how to fix this issue completely?

appium.log gist

Code executed

JavascriptExecutor js = client.getAppDriver();
Map<String, Object> params = new HashMap<>();
params.put("direction", "down");
js.executeScript("mobile: swipe", params);

Thanks ahead of time for the help / pointers

Appium node module versions:

bedouglas appium $ npm list | grep appium
[email protected] /Users/bedouglas/build_tools/node_modules/appium
├─┬ [email protected]
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
├─┬ [email protected]
├─┬ [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ ├─┬ [email protected]
├─┬ [email protected]
├─┬ [email protected]
├─┬ [email protected]
├─┬ [email protected]
│ ├── [email protected]
├─┬ [email protected]
├─┬ [email protected]
├── [email protected]
npm ERR! extraneous: [email protected] /Users/bedouglas/build_tools/node_modules/appium/node_modules/nan
bedouglas appium $

Full Session appium.log (295.1 KB)

Note that I’m seeing this issue with appium-xcuitest-driver 28.2 as well… unsure if there’s something in the simulator that should be done.

I’ve also tried a reboot of the mac I’m running on as well.

google -> “Error occurred while trying to retrieve motion state update: CMErrorDomain Code:104” = many issues

However sometimes when the command works in > 4 minutes, I see different “errors” without the motion state update output

2017-04-19 19:00:12:820 - [HTTP] --> POST /wd/hub/session/a3a6ba6e-076f-4cae-a95b-0df5b596df91/execute {"script":"mobile: swipe","args":[{"direction":"down"}]}
2017-04-19 19:00:12:820 - [debug] [MJSONWP] Calling AppiumDriver.execute() with args: ["mobile: swipe",[{"direction":"down"}],"a3a6ba6e-076f-4cae-a95b-0df5b596df91"]
2017-04-19 19:00:12:821 - [debug] [XCUITest] Executing command 'execute'
2017-04-19 19:00:12:822 - [debug] [BaseDriver] Waiting up to 0 ms for condition
2017-04-19 19:00:12:823 - [debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/7A002227-00A4-4834-AFC6-14B17ACC456D/element] with body: {"using":"class name","value":"XCUIElementTypeApplication"}
2017-04-19 19:00:13:140 - [debug] [JSONWP Proxy] Got response with status 200: {"value":{"ELEMENT":"AA893D38-9060-4B3D-8F4E-8F2A57C13BEF","type":"XCUIElementTypeApplication","label":"TripAdvisor Owner App"},"sessionId":"7A002227-00A4-4834-AFC6-14B17ACC456D","status":0}
2017-04-19 19:00:13:143 - [debug] [JSONWP Proxy] Proxying [POST /wda/element/AA893D38-9060-4B3D-8F4E-8F2A57C13BEF/swipe] to [POST http://localhost:8100/session/7A002227-00A4-4834-AFC6-14B17ACC456D/wda/element/AA893D38-9060-4B3D-8F4E-8F2A57C13BEF/swipe] with body: {"direction":"down"}
2017-04-19 19:03:01:100 - [iOSLog] [IOS_SYSLOG_ROW] Apr 19 15:03:01 bedouglas-mac photoanalysisd[5608]: objc[5608]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x109d0b998) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x106514880). One of the two will be used. Which one is undefined.
2017-04-19 19:03:01:181 - [iOSLog] [IOS_SYSLOG_ROW] Apr 19 15:03:01 bedouglas-mac logd[3288]: metadata shared cached uuid is null (using logd's shared cache info) photoanalysisd (5608)
2017-04-19 19:03:01:209 - [iOSLog] [IOS_SYSLOG_ROW] Apr 19 15:03:01 bedouglas-mac logd[3288]: Failed to harvest strings for pathless uuid '00000000-0000-0000-0000-000000000000'
2017-04-19 19:04:14:633 - [debug] [JSONWP Proxy] Got response with status 200: {"value":{},"sessionId":"7A002227-00A4-4834-AFC6-14B17ACC456D","status":0}
2017-04-19 19:04:14:634 - [debug] [MJSONWP] Responding to client with driver.execute() result: null
2017-04-19 19:04:14:635 - [HTTP] <-- POST /wd/hub/session/a3a6ba6e-076f-4cae-a95b-0df5b596df91/execute 200 241821 ms - 76

Appium uses https://github.com/facebook/WebDriverAgent for iOS. You may try to ask here.