Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flick command arguments are not bound correctly #134

Closed
ghost opened this issue Apr 18, 2016 · 1 comment
Closed

Flick command arguments are not bound correctly #134

ghost opened this issue Apr 18, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 18, 2016

When executing POST /wd/hub/session/<session_id>/touch/flick with payload:

{
  "element": "25",
  "xoffset": 0,
  "yoffset": -100,
  "speed": 100
}

... the command that is ran under the hood is the following (according to the logs):

{
  "cmd": "action",
  "action": "element:swipe",
  "params": {
    "startX": "25",
    "endY": 0,
    "steps": 6,
    "elementId": 100
  }
}

It looks like the payload arguments are not bound correctly to the command arguments, leading to a 500. See the full log below:

[HTTP] --> POST /wd/hub/session/ca72033a-5e56-444a-bf97-60507b7aaefb/touch/flick {"element":"25","xoffset":0,"yoffset":-100,"speed":100}
[MJSONWP] Calling AppiumDriver.flick() with args: ["25",null,null,0,-100,100,"ca72033a-5e56-444a-bf97-60507b7aaefb"]
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"element:swipe","params":{"startX":"25","endY":0,"steps":6,"elementId":100}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"element:swipe","params":{"startX":"25","endY":0,"steps":6,"elementId":100}}
[debug] [AndroidBootstrap] Received command result from bootstrap
[HTTP] <-- POST /wd/hub/session/ca72033a-5e56-444a-bf97-60507b7aaefb/touch/flick 500 3 ms - 154
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: swipe
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Command returned error:java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":13,"value":"Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference"}
@imurchie
Copy link
Contributor

The implementation was wrong, for unknown reasons. Thanks for the detailed report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant