Tap occurs but returns error

Helo,

I’m trying to use appium tap by x,y coordinates and very often the tap occurs but returns an error: “Remote end closed connection without response”. I check for errors when tapping and assume that tap did not occur if error occurs, which leads my test to tapping two times in the same spot, first time with error, second time without it. What’s worse is that the tap doesn’t always occur when the error is returned so I am stuck with no reliable way of telling if the tap did actually occur or not. I’ve tried setting longer command timeouts by setting:
self.driver.command_executor.set_timeout(5)
The appium log doesn’t seem to show anything interesting and I have no idea how to handle that situation.
I have marked in log a place where the faulty tap occurs, and the next tap after it is the repeated second tap which doesn’t produce the error.

Appium Log

2017-08-11 06:32:22:910 - info: [Appium] Welcome to Appium v1.6.5
2017-08-11 06:32:22:912 - info: [Appium] Non-default server args:
2017-08-11 06:32:22:913 - info: [Appium] port: 13451
2017-08-11 06:32:22:913 - info: [Appium] bootstrapPort: 13452
2017-08-11 06:32:22:913 - info: [Appium] log: /web/appiumLogs/appium_13451_2017-08-11_08:32:17_-------------/-------------.log
2017-08-11 06:32:22:913 - info: [Appium] nodeconfig: /Users/user/node.json
2017-08-11 06:32:22:914 - info: [Appium] tmpDir: /web/appiumLogs/appium_13451_2017-08-11_08:32:-------------
2017-08-11 06:32:22:914 - info: [Appium] deviceName: -------------
2017-08-11 06:32:22:914 - warn: [Appium] Deprecated server args:
2017-08-11 06:32:22:914 - warn: [Appium] --device-name => --default-capabilities ‘{“deviceName”:“-------------”}’
2017-08-11 06:32:22:915 - info: [Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
2017-08-11 06:32:22:917 - info: [Appium] deviceName: ‘-------------’
2017-08-11 06:32:22:973 - info: [debug] [Appium] Starting auto register thread for grid. Will try to register every 5000 ms.
2017-08-11 06:32:22:975 - info: [Appium] Appium REST http interface listener started on 0.0.0.0:13451
2017-08-11 06:32:28:001 - info: [debug] [Appium] Appium successfully registered with the grid on localhost:3333
2017-08-11 06:32:33:013 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:32:33:016 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:32:33:031 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:32:33:036 - info: [HTTP] ← GET /wd/hub/status 200 21 ms - 83
2017-08-11 06:32:38:038 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:32:38:038 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:32:38:050 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:32:38:052 - info: [HTTP] ← GET /wd/hub/status 200 14 ms - 83
2017-08-11 06:32:39:670 - info: [HTTP] → POST /wd/hub/session {“requiredCapabilities”:{},“desiredCapabilities”:{“realDeviceLogger”:“/usr/local/lib/node_modules/deviceconsole/deviceconsole”,“gamePackage”:“-------------”,“deviceName”:“iPadPro12”,“wdaLocalPort”:“13453”,“newCommandTimeout”:“300”,“processArguments”:{“args”:[“-------------=-------------”],“env”:{“-------------”:“-------------”}},“xcodeConfigFile”:“/XcodeConfig/Config.xcconfig”,“useNewWDA”:“true”,“platformName”:“iOS”,“automationName”:“XCUITest”,“orientation”:“LANDSCAPE”,“bundleId”:“-------------”,“autoDismissAlerts”:“true”,“showIOSLog”:“false”,“udid”:“-------------”,“platformVersion”:“”}}
2017-08-11 06:32:39:671 - info: [debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“realDeviceLogger”:“/usr/local/lib/node_modules/deviceconsole/deviceconsole”,“gamePackage”:“-------------”,“deviceName”:“iPadPro12”,“wdaLocalPort”:“13453”,“newCommandTimeout”:“300”,“processArguments”:{“args”:[“-------------=-------------”],“env”:{“-------------”:“-------------”}},“xcodeConfigFile”:“/XcodeConfig/Config.xcconfig”,“useNewWDA”:“true”,“platformName”:“iOS”,“automationName”:“XCUITest”,“orientation”:“LANDSCAPE”,“bundleId”:“-------------*r”,“autoDismissAlerts”:“true”,“showIOSLog”:“false”,“udid”:“-------------”,“platformVersion”:“”},{},null]
2017-08-11 06:32:39:671 - info: [debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1502433159671 (08:32:39 GMT+0200 (CEST))
2017-08-11 06:32:39:673 - info: [Appium] Creating new XCUITestDriver (v2.30.0) session
2017-08-11 06:32:39:673 - info: [Appium] Capabilities:
2017-08-11 06:32:39:674 - info: [Appium] realDeviceLogger: ‘/usr/local/lib/node_modules/deviceconsole/deviceconsole’
2017-08-11 06:32:39:674 - info: [Appium] gamePackage: '-------------
2017-08-11 06:32:39:674 - info: [Appium] deviceName: ‘iPadPro12’
2017-08-11 06:32:39:675 - info: [Appium] wdaLocalPort: ‘13453’
2017-08-11 06:32:39:675 - info: [Appium] newCommandTimeout: ‘300’
2017-08-11 06:32:39:675 - info: [Appium] processArguments: { args: [ ‘-------------=-------------’ ],
env: { -------------: ‘-------------’ } }
2017-08-11 06:32:39:675 - info: [Appium] xcodeConfigFile: ‘/XcodeConfig/Config.xcconfig’
2017-08-11 06:32:39:675 - info: [Appium] useNewWDA: ‘true’
2017-08-11 06:32:39:676 - info: [Appium] platformName: ‘iOS’
2017-08-11 06:32:39:676 - info: [Appium] automationName: ‘XCUITest’
2017-08-11 06:32:39:676 - info: [Appium] orientation: ‘LANDSCAPE’
2017-08-11 06:32:39:676 - info: [Appium] bundleId: ‘-------------’
2017-08-11 06:32:39:676 - info: [Appium] autoDismissAlerts: ‘true’
2017-08-11 06:32:39:676 - info: [Appium] showIOSLog: ‘false’
2017-08-11 06:32:39:677 - info: [Appium] udid: ‘-------------’
2017-08-11 06:32:39:677 - info: [Appium] platformVersion: ‘’
2017-08-11 06:32:39:679 - info: [debug] [XCUITest] XCUITestDriver version: 2.30.0
2017-08-11 06:32:39:681 - warn: [BaseDriver] Capability ‘useNewWDA’ changed from string to boolean. This may cause unexpected behavior
2017-08-11 06:32:39:682 - warn: [BaseDriver] Capability ‘autoDismissAlerts’ changed from string to boolean. This may cause unexpected behavior
2017-08-11 06:32:39:682 - warn: [BaseDriver] Capability ‘showIOSLog’ changed from string to boolean. This may cause unexpected behavior
2017-08-11 06:32:39:683 - warn: [BaseDriver] Capability ‘newCommandTimeout’ changed from string (‘300’) to integer (300). This may cause unexpected behavior
2017-08-11 06:32:39:683 - warn: [BaseDriver] Capability ‘wdaLocalPort’ changed from string (‘13453’) to integer (13453). This may cause unexpected behavior
2017-08-11 06:32:39:689 - warn: [BaseDriver] The following capabilities were provided, but are not recognized by appium: realDeviceLogger, gamePackage.
2017-08-11 06:32:39:689 - warn: [XCUITest] The capabilities ‘autoAcceptAlerts’ and ‘autoDismissAlerts’ do not work for XCUITest-based tests. Please adjust your alert handling accordingly.
2017-08-11 06:32:39:749 - info: [BaseDriver] Session created with session id: db9b4a77-365d-4364-b953-ebbedfcf0069
2017-08-11 06:32:39:858 - info: [debug] [XCUITest] Xcode version set to ‘8.3.2’
2017-08-11 06:32:39:867 - info: [debug] [XCUITest] iOS SDK Version set to ‘10.3’
2017-08-11 06:32:39:868 - info: [debug] [BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1502433159867 (08:32:39 GMT+0200 (CEST))
2017-08-11 06:32:39:992 - info: [debug] [XCUITest] Available devices: -------------,-------------, -------------, -------------, -------------, -------------, -------------, -------------
2017-08-11 06:32:39:993 - info: [debug] [XCUITest] Creating iDevice object with udid ‘-------------’
2017-08-11 06:32:39:995 - info: [XCUITest] Determining device to run tests on: udid: ‘-------------’, real device: true
2017-08-11 06:32:39:996 - info: [debug] [BaseDriver] Event ‘appConfigured’ logged at 1502433159996 (08:32:39 GMT+0200 (CEST))
2017-08-11 06:32:40:216 - info: [debug] [BaseDriver] Event ‘resetStarted’ logged at 1502433160215 (08:32:40 GMT+0200 (CEST))
2017-08-11 06:32:40:216 - info: [debug] [XCUITest] Reset: running ios real device reset flow
2017-08-11 06:32:40:217 - info: [debug] [BaseDriver] Event ‘resetComplete’ logged at 1502433160217 (08:32:40 GMT+0200 (CEST))
2017-08-11 06:32:40:221 - info: [debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
2017-08-11 06:32:40:222 - info: [debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
2017-08-11 06:32:40:273 - info: [debug] [BaseDriver] Event ‘logCaptureStarted’ logged at 1502433160272 (08:32:40 GMT+0200 (CEST))
2017-08-11 06:32:40:274 - info: [XCUITest] Setting up real device
2017-08-11 06:32:40:276 - info: [debug] [BaseDriver] Event ‘wdaStartAttempted’ logged at 1502433160276 (08:32:40 GMT+0200 (CEST))
2017-08-11 06:32:40:276 - info: [XCUITest] Using WDA path: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
2017-08-11 06:32:40:276 - info: [XCUITest] Using WDA agent: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
2017-08-11 06:32:40:277 - info: [debug] [XCUITest] Capability ‘useNewWDA’ set, so uninstalling WDA before proceeding
2017-08-11 06:32:40:277 - info: [debug] [XCUITest] Removing WDA application from device
2017-08-11 06:32:40:427 - info: [debug] [BaseDriver] Event ‘wdaUninstalled’ logged at 1502433160427 (08:32:40 GMT+0200 (CEST))
2017-08-11 06:32:40:428 - info: [XCUITest] Launching WebDriverAgent on the device
2017-08-11 06:32:40:431 - info: [debug] [XCUITest] Carthage found: ‘/usr/local/bin/carthage’
2017-08-11 06:32:40:432 - info: [debug] [XCUITest] Killing hanging processes
2017-08-11 06:32:40:553 - warn: [XCUITest] Cannot parse major and minor version numbers from platformVersion “”. Will build for the default platform instead
2017-08-11 06:32:40:554 - info: [debug] [XCUITest] Using Xcode configuration file: ‘/XcodeConfig/Config.xcconfig’
2017-08-11 06:32:40:554 - info: [debug] [XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=e9836c0d68f03d9a14a1ec268ad80ab80108e22c -configuration Debug -xcconfig /XcodeConfig/Config.xcconfig’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
2017-08-11 06:32:40:554 - info: [debug] [XCUITest] Output from xcodebuild will not be logged
2017-08-11 06:32:40:554 - info: [debug] [XCUITest] Starting iproxy to forward traffic from local port 13453 to device port 8100 over USB
2017-08-11 06:32:43:055 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:32:43:055 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:32:46:208 - info: [debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
2017-08-11 06:32:46:210 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:46:753 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:47:125 - info: [debug] [XCUITest] Log file for xcodebuild test: /Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/50EDC53D-C11D-4950-832F-7192408F2F37/Session-WebDriverAgentRunner-2017-08-11_083247-0hMRJ2.log
2017-08-11 06:32:47:266 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:47:786 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:48:312 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:48:839 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:49:354 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:49:865 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:50:375 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:50:886 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:51:401 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:51:911 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:52:427 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:52:944 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:53:453 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:53:968 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:54:477 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:13453/status] with no body
2017-08-11 06:32:54:492 - info: [debug] [JSONWP Proxy] Got response with status 200: “{\n "value" : {\n "state" : "success",\n "os" : {\n "name" : "iOS",\n "version" : "10.3.3"\n },\n "ios" : {\n "simulatorVersion" : "10.3.3",\n "ip" : "192.168.34.13"\n },\n "build" : {\n "time" : "Jul 26 2017 11:39:33"\n }\n },\n "sessionId" : "2B3C93F6-8F75-4329-B0CE-039E35D7062A",\n "status" : 0\n}”
2017-08-11 06:32:54:493 - info: [debug] [XCUITest] WebDriverAgent running on ip ‘192.168.34.13’
2017-08-11 06:32:54:493 - info: [debug] [XCUITest] WebDriverAgent successfully started after 8929ms
2017-08-11 06:32:54:495 - info: [debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1502433174495 (08:32:54 GMT+0200 (CEST))
2017-08-11 06:32:54:495 - info: [debug] [XCUITest] Sending createSession command to WDA
2017-08-11 06:32:54:498 - info: [debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:13453/session] with body: {“desiredCapabilities”:{“bundleId”:“-------------”,“arguments”:[“-------------=-------------”],“environment”:{“-------------”:“-------------”},“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
2017-08-11 06:33:03:443 - info: [debug] [JSONWP Proxy] Got response with status 200: {“value”:{“sessionId”:“66E82E47-9AB3-485E-B50C-79C06BECA346”,“capabilities”:{“device”:“ipad”,“browserName”:“-------------”,“sdkVersion”:“10.3.3”,“CFBundleIdentifier”:“-------------”}},“sessionId”:“66E82E47-9AB3-485E-B50C-79C06BECA346”,“status”:0}
2017-08-11 06:33:03:444 - info: [debug] [BaseDriver] Event ‘wdaSessionStarted’ logged at 1502433183443 (08:33:03 GMT+0200 (CEST))
2017-08-11 06:33:03:445 - info: [debug] [XCUITest] Found WDA derived data folder: ‘/Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy’
2017-08-11 06:33:03:446 - info: [XCUITest] Setting ‘555’ permissions to ‘/Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/Attachments’ folder
2017-08-11 06:33:03:446 - info: [debug] [BaseDriver] Event ‘wdaPermsAdjusted’ logged at 1502433183446 (08:33:03 GMT+0200 (CEST))
2017-08-11 06:33:03:447 - info: [debug] [BaseDriver] Event ‘wdaStarted’ logged at 1502433183447 (08:33:03 GMT+0200 (CEST))
2017-08-11 06:33:03:447 - info: [debug] [XCUITest] Setting initial orientation to ‘LANDSCAPE’
2017-08-11 06:33:03:450 - info: [debug] [JSONWP Proxy] Proxying [POST /orientation] to [POST http://localhost:13453/session/66E82E47-9AB3-485E-B50C-79C06BECA346/orientation] with body: {“orientation”:“LANDSCAPE”}
2017-08-11 06:33:03:944 - info: [debug] [JSONWP Proxy] Got response with status 200: {“value”:{},“sessionId”:“66E82E47-9AB3-485E-B50C-79C06BECA346”,“status”:0}
2017-08-11 06:33:03:944 - info: [debug] [BaseDriver] Event ‘orientationSet’ logged at 1502433183944 (08:33:03 GMT+0200 (CEST))
2017-08-11 06:33:03:945 - info: [Appium] New XCUITestDriver session created successfully, session db9b4a77-365d-4364-b953-ebbedfcf0069 added to master session list
2017-08-11 06:33:03:946 - info: [debug] [BaseDriver] Event ‘newSessionStarted’ logged at 1502433183946 (08:33:03 GMT+0200 (CEST))
2017-08-11 06:33:03:946 - info: [debug] [MJSONWP] Responding to client with driver.createSession() result: {“webStorageEnabled”:false,“locationContextEnabled”:false,“browserName”:“”,“platform”:“MAC”,“javascriptEnabled”:true,“databaseEnabled”:false,“takesScreenshot”:true,“networkConnectionEnabled”:false,“realDeviceLogger”:“/usr/local/lib/node_modules/deviceconsole/deviceconsole”,“gamePackage”:“-------------”,“deviceName”:“iPadPro12”,“wdaLocalPort”:“13453”,“newCommandTimeout”:“300”,“processArguments”:{“args”:[“-------------=-------------”],“env”:{“-------------”:“-------------”}},“xcodeConfigFile”:“/XcodeConfig/Config.xcconfig”,“useNewWDA”:“true”,“platformName”:“iOS”,“automationName”:“XCUITest”,“orientation”:“LANDSCAPE”,“bundleId”:“-------------”,“autoDismissAlerts”:“true”,“showIOSLog”:“false”,“udid”:“-------------”,“platformVersion”:“”}
2017-08-11 06:33:03:948 - info: [HTTP] ← POST /wd/hub/session 200 24278 ms - 915
2017-08-11 06:33:03:960 - info: [HTTP] → GET /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/alert_text {}
2017-08-11 06:33:03:965 - info: [debug] [MJSONWP] Calling AppiumDriver.getAlertText() with args: [“db9b4a77-365d-4364-b953-ebbedfcf0069”]
2017-08-11 06:33:03:965 - info: [debug] [XCUITest] Executing command ‘getAlertText’
2017-08-11 06:33:03:991 - info: [debug] [JSONWP Proxy] Proxying [GET /alert/text] to [GET http://localhost:13453/session/66E82E47-9AB3-485E-B50C-79C06BECA346/alert/text] with no body
2017-08-11 06:33:03:996 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:33:03:998 - info: [HTTP] ← GET /wd/hub/status 200 20943 ms - 83
2017-08-11 06:33:04:113 - info: [debug] [JSONWP Proxy] Got response with status 200: “{\n "value" : {\n\n },\n "sessionId" : "66E82E47-9AB3-485E-B50C-79C06BECA346",\n "status" : 27\n}”
2017-08-11 06:33:04:123 - info: [HTTP] ← GET /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/alert_text 500 163 ms - 87
2017-08-11 06:33:04:134 - info: [HTTP] → GET /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/window/current/size {}
2017-08-11 06:33:04:136 - info: [debug] [MJSONWP] Calling AppiumDriver.getWindowSize() with args: [“current”,“db9b4a77-365d-4364-b953-ebbedfcf0069”]
2017-08-11 06:33:04:138 - info: [debug] [XCUITest] Executing command ‘getWindowSize’
2017-08-11 06:33:04:139 - info: [debug] [JSONWP Proxy] Proxying [GET /window/size] to [GET http://localhost:13453/session/66E82E47-9AB3-485E-B50C-79C06BECA346/window/size] with no body
2017-08-11 06:33:04:532 - info: [debug] [JSONWP Proxy] Got response with status 200: “{\n "value" : {\n "width" : 1366,\n "height" : 1024\n },\n "sessionId" : "66E82E47-9AB3-485E-B50C-79C06BECA346",\n "status" : 0\n}”
2017-08-11 06:33:04:535 - info: [debug] [MJSONWP] Responding to client with driver.getWindowSize() result: {“width”:1366,“height”:1024}
2017-08-11 06:33:04:536 - info: [HTTP] ← GET /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/window/current/size 200 401 ms - 100
2017-08-11 06:33:04:538 - info: [HTTP] → GET /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/window/current/size {}
2017-08-11 06:33:04:539 - info: [debug] [MJSONWP] Calling AppiumDriver.getWindowSize() with args: [“current”,“db9b4a77-365d-4364-b953-ebbedfcf0069”]
2017-08-11 06:33:04:539 - info: [debug] [XCUITest] Executing command ‘getWindowSize’
2017-08-11 06:33:04:545 - info: [debug] [JSONWP Proxy] Proxying [GET /window/size] to [GET http://localhost:13453/session/66E82E47-9AB3-485E-B50C-79C06BECA346/window/size] with no body
2017-08-11 06:33:05:109 - info: [debug] [JSONWP Proxy] Got response with status 200: “{\n "value" : {\n "width" : 1366,\n "height" : 1024\n },\n "sessionId" : "66E82E47-9AB3-485E-B50C-79C06BECA346",\n "status" : 0\n}”
2017-08-11 06:33:05:110 - info: [debug] [MJSONWP] Responding to client with driver.getWindowSize() result: {“width”:1366,“height”:1024}
2017-08-11 06:33:05:111 - info: [HTTP] ← GET /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/window/current/size 200 573 ms - 100
2017-08-11 06:33:08:152 - info: [HTTP] → GET /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/window/current/size {}
2017-08-11 06:33:08:152 - info: [debug] [MJSONWP] Calling AppiumDriver.getWindowSize() with args: [“current”,“db9b4a77-365d-4364-b953-ebbedfcf0069”]
2017-08-11 06:33:08:152 - info: [debug] [XCUITest] Executing command ‘getWindowSize’
2017-08-11 06:33:08:158 - info: [debug] [JSONWP Proxy] Proxying [GET /window/size] to [GET http://localhost:13453/session/66E82E47-9AB3-485E-B50C-79C06BECA346/window/size] with no body
2017-08-11 06:33:09:002 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:33:09:003 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:33:09:016 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:33:09:018 - info: [HTTP] ← GET /wd/hub/status 200 15 ms - 83
2017-08-11 06:33:09:198 - info: [debug] [JSONWP Proxy] Got response with status 200: “{\n "value" : {\n "width" : 1366,\n "height" : 1024\n },\n "sessionId" : "66E82E47-9AB3-485E-B50C-79C06BECA346",\n "status" : 0\n}”
2017-08-11 06:33:09:201 - info: [debug] [MJSONWP] Responding to client with driver.getWindowSize() result: {“width”:1366,“height”:1024}
2017-08-11 06:33:09:202 - info: [HTTP] ← GET /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/window/current/size 200 1049 ms - 100
2017-08-11 06:33:09:204 - info: [HTTP] → GET /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/window/current/size {}
2017-08-11 06:33:09:204 - info: [debug] [MJSONWP] Calling AppiumDriver.getWindowSize() with args: [“current”,“db9b4a77-365d-4364-b953-ebbedfcf0069”]
2017-08-11 06:33:09:204 - info: [debug] [XCUITest] Executing command ‘getWindowSize’
2017-08-11 06:33:09:211 - info: [debug] [JSONWP Proxy] Proxying [GET /window/size] to [GET http://localhost:13453/session/66E82E47-9AB3-485E-B50C-79C06BECA346/window/size] with no body
2017-08-11 06:33:10:141 - info: [debug] [JSONWP Proxy] Got response with status 200: “{\n "value" : {\n "width" : 1366,\n "height" : 1024\n },\n "sessionId" : "66E82E47-9AB3-485E-B50C-79C06BECA346",\n "status" : 0\n}”
2017-08-11 06:33:10:142 - info: [debug] [MJSONWP] Responding to client with driver.getWindowSize() result: {“width”:1366,“height”:1024}
2017-08-11 06:33:10:143 - info: [HTTP] ← GET /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/window/current/size 200 939 ms - 100
2017-08-11 06:33:14:020 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:33:14:020 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:33:14:033 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:33:14:034 - info: [HTTP] ← GET /wd/hub/status 200 14 ms - 83
2017-08-11 06:33:19:041 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:33:19:044 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:33:19:057 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:33:19:058 - info: [HTTP] ← GET /wd/hub/status 200 17 ms - 83
2017-08-11 06:33:24:067 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:33:24:067 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:33:24:080 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:33:24:081 - info: [HTTP] ← GET /wd/hub/status 200 14 ms - 83
2017-08-11 06:33:29:087 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:33:29:087 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:33:29:101 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:33:29:101 - info: [HTTP] ← GET /wd/hub/status 200 14 ms - 83
2017-08-11 06:33:34:103 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:33:34:104 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:33:34:116 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:33:34:118 - info: [HTTP] ← GET /wd/hub/status 200 14 ms - 83
2017-08-11 06:33:36:174 - info: [HTTP] → POST /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/touch/perform {“actions”:[{“action”:“press”,“options”:{“x”:204,“y”:870}},{“action”:“moveTo”,“options”:{“x”:69,“y”:51}},{“action”:“release”,“options”:{}}],“sessionId”:“db9b4a77-365d-4364-b953-ebbedfcf0069”}
2017-08-11 06:33:36:175 - info: [debug] [MJSONWP] Calling AppiumDriver.performTouch() with args: [[{“action”:“press”,“options”:{“x”:204,“y”:870}},{“action”:“moveTo”,“options”:{“x”:69,“y”:51}},{“action”:“release”,“options”:{}}],“db9b4a77-365d-4364-b953-ebbedfcf0069”]
2017-08-11 06:33:36:175 - info: [debug] [XCUITest] Executing command ‘performTouch’
2017-08-11 06:33:36:183 - info: [debug] [XCUITest] Received the following touch action: press(options={“x”:204,“y”:870})-moveTo(options={“x”:69,“y”:51})-release(options={})
2017-08-11 06:33:36:183 - info: [debug] [XCUITest] Found matching gesture: scroll
2017-08-11 06:33:36:186 - info: [debug] [JSONWP Proxy] Proxying [POST /wda/dragfromtoforduration] to [POST http://localhost:13453/session/66E82E47-9AB3-485E-B50C-79C06BECA346/wda/dragfromtoforduration] with body: {“fromX”:204,“fromY”:870,“toX”:273,“toY”:921,“duration”:0}
2017-08-11 06:33:39:128 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:33:39:129 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:33:39:141 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:33:39:142 - info: [HTTP] ← GET /wd/hub/status 200 14 ms - 83
2017-08-11 06:33:44:153 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:33:44:154 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:33:44:166 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:33:44:169 - info: [HTTP] ← GET /wd/hub/status 200 13 ms - 83
2017-08-11 06:33:45:278 - info: [debug] [JSONWP Proxy] Got response with status 200: {“value”:{},“sessionId”:“66E82E47-9AB3-485E-B50C-79C06BECA346”,“status”:0}
2017-08-11 06:33:45:279 - info: [debug] [MJSONWP] Responding to client with driver.performTouch() result: null
2017-08-11 06:33:45:280 - info: [HTTP] ← POST /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/touch/perform 200 9106 ms - 76
2017-08-11 06:33:48:341 - info: [HTTP] → POST /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/touch/perform {“actions”:[{“action”:“tap”,“options”:{“x”:61,“y”:61,“count”:1}}],“sessionId”:“db9b4a77-365d-4364-b953-ebbedfcf0069”}
2017-08-11 06:33:48:342 - info: [debug] [MJSONWP] Calling AppiumDriver.performTouch() with args: [[{“action”:“tap”,“options”:{“x”:61,“y”:61,“count”:1}}],“db9b4a77-365d-4364-b953-ebbedfcf0069”]
2017-08-11 06:33:48:342 - info: [debug] [XCUITest] Executing command ‘performTouch’
2017-08-11 06:33:48:345 - info: [debug] [XCUITest] Received the following touch action: tap(options={“x”:61,“y”:61,“count”:1})
2017-08-11 06:33:48:345 - info: [debug] [XCUITest] Found matching gesture: tap
2017-08-11 06:33:48:348 - info: [debug] [JSONWP Proxy] Proxying [POST /wda/tap/0] to [POST http://localhost:13453/session/66E82E47-9AB3-485E-B50C-79C06BECA346/wda/tap/0] with body: {“x”:61,“y”:61}
2017-08-11 06:33:49:169 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:33:49:169 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:33:49:182 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:33:49:183 - info: [HTTP] ← GET /wd/hub/status 200 13 ms - 83
2017-08-11 06:33:53:353 - info: [HTTP] ← POST /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/touch/perform - - ms - -
2017-08-11 06:33:54:191 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:33:54:191 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:33:54:206 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:33:54:207 - info: [HTTP] ← GET /wd/hub/status 200 16 ms - 83
2017-08-11 06:33:54:356 - info: [HTTP] → POST /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/touch/perform {“actions”:[{“action”:“tap”,“options”:{“x”:61,“y”:61,“count”:1}}],“sessionId”:“db9b4a77-365d-4364-b953-ebbedfcf0069”}
2017-08-11 06:33:54:356 - info: [debug] [MJSONWP] Calling AppiumDriver.performTouch() with args: [[{“action”:“tap”,“options”:{“x”:61,“y”:61,“count”:1}}],“db9b4a77-365d-4364-b953-ebbedfcf0069”]
2017-08-11 06:33:54:359 - info: [debug] [XCUITest] Executing command ‘performTouch’
2017-08-11 06:33:54:881 - info: [debug] [JSONWP Proxy] Got response with status 200: {“value”:{},“sessionId”:“66E82E47-9AB3-485E-B50C-79C06BECA346”,“status”:0}
2017-08-11 06:33:54:882 - info: [debug] [XCUITest] Received the following touch action: tap(options={“x”:61,“y”:61,“count”:1})
2017-08-11 06:33:54:882 - info: [debug] [XCUITest] Found matching gesture: tap
2017-08-11 06:33:54:884 - info: [debug] [JSONWP Proxy] Proxying [POST /wda/tap/0] to [POST http://localhost:13453/session/66E82E47-9AB3-485E-B50C-79C06BECA346/wda/tap/0] with body: {“x”:61,“y”:61}
2017-08-11 06:33:54:885 - info: [debug] [MJSONWP] Responding to client with driver.performTouch() result: null
2017-08-11 06:33:59:210 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:33:59:210 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:33:59:223 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:33:59:224 - info: [HTTP] ← GET /wd/hub/status 200 14 ms - 83
2017-08-11 06:34:01:858 - info: [debug] [JSONWP Proxy] Got response with status 200: {“value”:{},“sessionId”:“66E82E47-9AB3-485E-B50C-79C06BECA346”,“status”:0}
2017-08-11 06:34:01:859 - info: [debug] [MJSONWP] Responding to client with driver.performTouch() result: null
2017-08-11 06:34:01:860 - info: [HTTP] ← POST /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069/touch/perform 200 7504 ms - 76
2017-08-11 06:34:04:229 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:34:04:230 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:34:04:242 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:34:04:243 - info: [HTTP] ← GET /wd/hub/status 200 13 ms - 83
2017-08-11 06:34:08:115 - info: [HTTP] → DELETE /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069 {}
2017-08-11 06:34:08:115 - info: [debug] [MJSONWP] Calling AppiumDriver.deleteSession() with args: [“db9b4a77-365d-4364-b953-ebbedfcf0069”]
2017-08-11 06:34:08:116 - info: [debug] [BaseDriver] Event ‘quitSessionRequested’ logged at 1502433248116 (08:34:08 GMT+0200 (CEST))
2017-08-11 06:34:08:118 - info: [debug] [JSONWP Proxy] Proxying [DELETE /session/db9b4a77-365d-4364-b953-ebbedfcf0069] to [DELETE http://localhost:13453/session/66E82E47-9AB3-485E-B50C-79C06BECA346] with no body
2017-08-11 06:34:08:978 - info: [debug] [JSONWP Proxy] Got response with status 200: “{\n "value" : {\n\n },\n "sessionId" : "DB8AD011-8143-415F-9EDA-0ABEB8551E20",\n "status" : 0\n}”
2017-08-11 06:34:08:979 - info: [XCUITest] Shutting down sub-processes
2017-08-11 06:34:08:979 - info: [XCUITest] Shutting down xcodebuild process (pid 49007)
2017-08-11 06:34:09:003 - info: [XCUITest] xcodebuild exited with code ‘null’ and signal ‘SIGTERM’
2017-08-11 06:34:09:004 - info: [XCUITest] Shutting down iproxy process (pid 49005)
2017-08-11 06:34:09:006 - info: [debug] [XCUITest] iproxy exited with code ‘null’
2017-08-11 06:34:09:007 - info: [debug] [XCUITest] Found WDA derived data folder: ‘/Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy’
2017-08-11 06:34:09:008 - info: [XCUITest] Setting ‘755’ permissions to ‘/Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/Attachments’ folder
2017-08-11 06:34:09:008 - info: [debug] [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
2017-08-11 06:34:09:009 - info: [debug] [iOSLog] Stopping iOS log capture
2017-08-11 06:34:09:010 - info: [Appium] Removing session db9b4a77-365d-4364-b953-ebbedfcf0069 from our master session list
2017-08-11 06:34:09:011 - info: [debug] [BaseDriver] Event ‘quitSessionFinished’ logged at 1502433249011 (08:34:09 GMT+0200 (CEST))
2017-08-11 06:34:09:011 - info: [debug] [MJSONWP] Received response: null
2017-08-11 06:34:09:011 - info: [debug] [MJSONWP] But deleting session, so not returning
2017-08-11 06:34:09:011 - info: [debug] [MJSONWP] Responding to client with driver.deleteSession() result: null
2017-08-11 06:34:09:012 - info: [HTTP] ← DELETE /wd/hub/session/db9b4a77-365d-4364-b953-ebbedfcf0069 200 897 ms - 76
2017-08-11 06:34:09:253 - info: [HTTP] → GET /wd/hub/status {}
2017-08-11 06:34:09:253 - info: [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args:
2017-08-11 06:34:09:267 - info: [debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.5”,“revision”:null}}
2017-08-11 06:34:09:268 - info: [HTTP] ← GET /wd/hub/status 200 15 ms - 83

As of today I have discovered that this error occurs only when using Xcode version 8.3 and above, that means that problem probably lies on the WDA side. Also this error affects not only taps but most of the wda server commands, which randomly can return this error.