appium-espresso-driver: Swipe throws an error java.lang.NullPointerException

ENV

Appium Beta 1.10.0-beta.0

With Wait POST http://localhost:4798/wd/hub/session/9932a90d-f9f6-4198-99a0-d3e1255330af/touch/perform

{
  "actions": [
    { "action": "press", "options": { "x": 540, "y": 1000 } },
    { "action": "wait", "options": { "ms": "500" } },
    { "action": "moveTo", "options": { "x": 540, "y": 700 } },
    { "action": "release", "options": {} }
  ],
  "sessionId": "9932a90d-f9f6-4198-99a0-d3e1255330af"
}

RETURN 500

{
    "status": 13,
    "value": {
        "message": "An unknown server-side error occurred while processing the command. Original error: java.lang.NullPointerException: Attempt to invoke virtual method 'float java.lang.Float.floatValue()' on a null object reference\n\tat io.appium.espressoserver.lib.helpers.w3c.models.Tick.calculateTickDuration(Tick.java:52)\n\tat io.appium.espressoserver.lib.helpers.w3c.models.ActionSequence.dispatch(ActionSequence.java:79)\n\tat io.appium.espressoserver.lib.helpers.w3c.models.Actions.perform(Actions.java:56)\n\tat io.appium.espressoserver.lib.handlers.TouchAction$1.run(TouchAction.java:30)\n\tat io.appium.espressoserver.lib.handlers.TouchAction$1.run(TouchAction.java:22)\n\tat io.appium.espressoserver.lib.viewaction.UiControllerPerformer.perform(UiControllerPerformer.java:43)\n\tat android.support.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:356)\n\tat android.support.test.espresso.ViewInteraction.doPerform(ViewInteraction.java:241)\n\tat android.support.test.espresso.ViewInteraction.access$100(ViewInteraction.java:62)\n\tat android.support.test.espresso.ViewInteraction$1.call(ViewInteraction.java:149)\n\tat android.support.test.espresso.ViewInteraction$1.call(ViewInteraction.java:146)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat android.os.Handler.handleCallback(Handler.java:873)\n\tat android.os.Handler.dispatchMessage(Handler.java:99)\n\tat android.os.Looper.loop(Looper.java:193)\n\tat android.app.ActivityThread.main(ActivityThread.java:6669)\n\tat java.lang.reflect.Method.invoke(Native Method)\n\tat com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)\n\tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)\n"
    },
    "sessionId": "9932a90d-f9f6-4198-99a0-d3e1255330af"
}

Without Wait POST http://localhost:4798/wd/hub/session/9932a90d-f9f6-4198-99a0-d3e1255330af/touch/perform

{
  "actions": [
    { "action": "press", "options": { "x": 540, "y": 1000 } },
    { "action": "moveTo", "options": { "x": 540, "y": 700 } },
    { "action": "release", "options": {} }
  ],
  "sessionId": "9932a90d-f9f6-4198-99a0-d3e1255330af"
}

RETURN 200

{
    "id": "a6c40812-ebd8-4c2f-b5c3-949994acb08c",
    "sessionId": "03350a1e-0199-4e74-aabd-f42d1c96f950",
    "status": 0,
    "value": null
}

But Without “Wait” I can’t perform swipe correctly. I was able to do it in previous version.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 22 (12 by maintainers)

Most upvoted comments

@nichotined I’d be very happy to have contributions! You can get started by just checking out this repo and running it on your machine. You need to have NodeJS installed and you need to have Android SDK installed (installing Android Studio will do the trick). There’s some documentation on how to do this in the README.md.

Feel free to have a look at the issues and let me know if any of them interest you. There’s definitely going to be a lot of work to be done on this in the foreseeable future.

Of course you can and you are welcome to. Here is the documentation we have https://github.com/appium/appium/tree/master/docs/en/contributing-to-appium