Touch action not working on version 1.15.1 and 1.16

Calling AppiumDriver.performTouch() with args: [[{“action”:“tap”,“options”:{“x”:100,“y”:100}}],“ed58f6ff-f8bf-437a-9a13-6661e5addff7”]

[debug] [WD Proxy] Proxying [POST /appium/tap] to [POST http://localhost:8205/wd/hub/session/a4a5818a-6ea4-455c-a43a-add0ed3f64ec/appium/tap] with body: {“x”:100,“y”:100}

[WD Proxy] Got an unexpected response with status 400: {“sessionId”:“a4a5818a-6ea4-455c-a43a-add0ed3f64ec”,“value”:{“error”:“invalid element state”,“message”:“Click failed at (100, 100) coordinates”,“stacktrace”:"io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Click failed at (100, 100) coordinates\n\tat io.appium.uiautomator2.handler.Click.safeHandle(Click.java:66)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.j…

[debug] [W3C] Matched W3C error code ‘invalid element state’ to InvalidElementStateError

[debug] [W3C (ed58f6ff)] Encountered internal error running command: io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Click failed at (100, 100) coordinates

[debug] [W3C (ed58f6ff)] at io.appium.uiautomator2.handler.Click.safeHandle(Click.java:66)

[debug] [W3C (ed58f6ff)] at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)

[debug] [W3C (ed58f6ff)] at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)

[debug] [W3C (ed58f6ff)] at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)

[debug] [W3C (ed58f6ff)] at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)

[debug] [W3C (ed58f6ff)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)

[debug] [W3C (ed58f6ff)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)

[debug] [W3C (ed58f6ff)] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)

[debug] [W3C (ed58f6ff)] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)

[debug] [W3C (ed58f6ff)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)

[debug] [W3C (ed58f6ff)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)

[debug] [W3C (ed58f6ff)] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)

[debug] [W3C (ed58f6ff)] at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)

[debug] [W3C (ed58f6ff)] at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)

[debug] [W3C (ed58f6ff)] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)

[debug] [W3C (ed58f6ff)] at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)

[debug] [W3C (ed58f6ff)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)

[debug] [W3C (ed58f6ff)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)

[debug] [W3C (ed58f6ff)] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)

[debug] [W3C (ed58f6ff)] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)

[debug] [W3C (ed58f6ff)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)

[debug] [W3C (ed58f6ff)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)

[debug] [W3C (ed58f6ff)] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)

[debug] [W3C (ed58f6ff)] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)

[debug] [W3C (ed58f6ff)] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)

[debug] [W3C (ed58f6ff)] at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)

[debug] [W3C (ed58f6ff)] at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)

[debug] [W3C (ed58f6ff)] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)

[debug] [W3C (ed58f6ff)] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)

[debug] [W3C (ed58f6ff)] at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)

[debug] [W3C (ed58f6ff)] at java.lang.Thread.run(Thread.java:764)

[debug] [W3C (ed58f6ff)]

[HTTP] <-- POST /wd/hub/session/ed58f6ff-f8bf-437a-9a13-6661e5addff7/touch/perform 400 150 ms - 3278

[HTTP]

@jitender_yadav make sure that the point (found by coordinates) you are trying to tap is actually tap-able . If might be failing if you are running it on different resolution’s device/ simulator than the one with which script was originally created.

@abhiqa same code is working perfectly on appium version 1.13.0 with same set of devices.
i am using java client version :- 6.1.0

Server response for appium version 1.13.0:-

[HTTP] --> POST /wd/hub/session/9bb03525-157e-4040-bec4-63cfe9ac0614/touch/perform

[HTTP] {“actions”:[{“action”:“tap”,“options”:{“x”:100,“y”:100}}]}

[W3C (9bb03525)] Calling AppiumDriver.performTouch() with args: [[{“action”:“tap”,“options”:{“x”:100,“y”:100}}],“9bb03525-157e-4040-bec4-63cfe9ac0614”]

[WD Proxy] Proxying [POST /appium/tap] to [POST http://localhost:8205/wd/hub/session/a18d4252-13e6-4d9b-bced-df0be4618d27/appium/tap] with body: {“x”:100,“y”:100}

[WD Proxy] Got response with status 200: {“sessionId”:“a18d4252-13e6-4d9b-bced-df0be4618d27”,“status”:0,“value”:false}

[W3C (9bb03525)] Responding to client with driver.performTouch() result: null

[HTTP] <-- POST /wd/hub/session/9bb03525-157e-4040-bec4-63cfe9ac0614/touch/perform 200 128 ms - 14

@jitender_yadav from logs of your original post it seems you are getting above error which Indicates that a WebElement is in a state that means actions cannot be performed with it. Examples would include an element being obscured by another when clicking, or perhaps not being visible on the DOM. Subclasses of this provide more detailed information.

source InvalidElementStateException

You need to dig-in for the cause of this issue.

@abhiqa here i am just clicking on some coordinates to hide the popup, and not clicking on any element, same is working fine with appium 1.13.0 and not with 1.15.1 and 1.16

@jitender_yadav You can try to close the pop up by tapping on ‘cancel’ button (if available.). or it’ll be good if you can share your code which is failing, to further dig in.