question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] Single tap action may sometimes return server-side error

See original GitHub issue

Hi,

In our android app we are using UI component that renders video player view. It takes the whole screen. When I’m trying to tap it (using either the video element itself or the whole screen) the action is actually performed (I see its result) but appium returns server-side error message and java client throws exception as well:

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)

Here’s the code I’m using to perform tap:

Dimension size = getDriver().manage().window().getSize();
int x = size.width / 2;
int y = size.height / 2;
int duration = 500;
TouchAction tap = new TouchAction(getDriver());
tap.press(x, y)
        .waitAction(duration)
        .release()
        .perform();

And here’s the appium log for that code snippet execution:

2015-03-04 11:10:56:030 - info: --> GET /wd/hub/session/38d1ce28-9fc0-4d79-afa9-d415500179b2/window/current/size {}
2015-03-04 11:10:56:031 - info: [debug] Pushing command to appium work queue: ["getDeviceSize"]
2015-03-04 11:10:56:036 - info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"getDeviceSize","params":{}}
2015-03-04 11:10:56:036 - info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
2015-03-04 11:10:56:036 - info: [debug] [BOOTSTRAP] [debug] Got command action: getDeviceSize
2015-03-04 11:10:56:036 - info: [debug] Responding to client with success: {"status":0,"value":{"width":1196,"height":720},"sessionId":"38d1ce28-9fc0-4d79-afa9-d415500179b2"}
2015-03-04 11:10:56:037 - info: <-- GET /wd/hub/session/38d1ce28-9fc0-4d79-afa9-d415500179b2/window/current/size 200 7.279 ms - 99 {"status":0,"value":{"width":1196,"height":720},"sessionId":"38d1ce28-9fc0-4d79-afa9-d415500179b2"}
2015-03-04 11:10:56:038 - info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":{"width":1196,"height":720},"status":0}
2015-03-04 11:10:56:040 - info: --> POST /wd/hub/session/38d1ce28-9fc0-4d79-afa9-d415500179b2/touch/perform {"actions":[{"action":"press","options":{"y":360,"x":598}},{"action":"wait","options":{"ms":500}},{"action":"release","options":{}}]}
2015-03-04 11:10:56:045 - info: [debug] Pushing command to appium work queue: ["element:touchDown",{"x":598,"y":360}]
2015-03-04 11:10:56:046 - info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:touchDown","params":{"x":598,"y":360}}
2015-03-04 11:10:56:047 - info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
2015-03-04 11:10:56:047 - info: [debug] [BOOTSTRAP] [debug] Got command action: touchDown
2015-03-04 11:10:56:048 - info: [debug] [BOOTSTRAP] [debug] Display bounds: [0,0][1196,720]
2015-03-04 11:10:56:048 - info: [debug] [BOOTSTRAP] [debug] Performing TouchDown using element? false x: 598, y: 360
2015-03-04 11:10:56:050 - info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
2015-03-04 11:10:56:550 - info: [debug] Pushing command to appium work queue: ["element:touchUp",{"x":598,"y":360}]
2015-03-04 11:10:56:553 - info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:touchUp","params":{"x":598,"y":360}}
2015-03-04 11:10:56:553 - info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
2015-03-04 11:10:56:553 - info: [debug] [BOOTSTRAP] [debug] Got command action: touchUp
2015-03-04 11:10:56:554 - info: [debug] Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command.","origValue":"Failed to execute touch event"},"sessionId":"38d1ce28-9fc0-4d79-afa9-d415500179b2"}
2015-03-04 11:10:56:555 - info: <-- POST /wd/hub/session/38d1ce28-9fc0-4d79-afa9-d415500179b2/touch/perform 500 515.191 ms - 198 
2015-03-04 11:10:56:555 - info: [debug] [BOOTSTRAP] [debug] Display bounds: [0,0][1196,720]
2015-03-04 11:10:56:556 - info: [debug] [BOOTSTRAP] [debug] Performing TouchUp using element? false x: 598, y: 360
2015-03-04 11:10:56:556 - info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"Failed to execute touch event","status":13}

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:24 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
prattprattcommented, Mar 4, 2015

Okay, so you can see the tap is performed, but Appium throws this server-side error which stops your test suite? Sounds like a good bug.

Correct. Tap is done, I can see it. But tap consists of 2 parts - touch down and touch up. As I can see from appium logs - touch down is done ok but smth goes wrong when doing touch up. And this case is only applicable for that specific video player component and only in fullcreen mode. When it is minimized everything is also ok - it can be tapped w/o errors.

Can you provide an app that we can use to replicate this behavior? We can then trace where the bug occurs in the appium code and make sure we don’t throw an error.

I will clarify this but I think I’ll not be able to do this. But may be I can do smth else from my side. Will check what happens if I use separatly touch down and touch up actions.

0reactions
lock[bot]commented, Apr 29, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Appium unknow error: An unknown server-side error occurred ...
If this adb command launches your APK file on your real device or emulator then that means [appPackage & appActivity] is valid. Play...
Read more >
Tasks and the back stack | Android Developers
Note: Although the activity starts in a new task, the Back button and gesture still return the user to the previous activity. "singleInstance"...
Read more >
Espresso basics - Android Developers
This document explains how to complete common automated testing tasks using the Espresso API. The Espresso API encourages test authors to ...
Read more >
Processes and threads overview - Android Developers
Do not access the Android UI toolkit from outside the UI thread. Worker threads. Because of the single threaded model described above, it's ......
Read more >
Crashes - Android Developers
By walking up the stack and examining the code, you may find a place that is passing an incorrect value. If your code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found