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.

Swipe throws an error java.lang.NullPointerException

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
dpgrahamcommented, Nov 26, 2018

@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.

2reactions
mykola-mokhnachcommented, Nov 26, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nullpointer exception on swipe - java - Stack Overflow
I get a NullPointerException on doing a swipe. What is wrong and how to correct? The exception is triggered in method onTouchEvent by ......
Read more >
How to Fix and Avoid NullPointerException in Java - Rollbar
The NullPointerException occurs due to a situation in application code where an uninitialized object is attempted to be accessed or modified.
Read more >
Null Pointer exception in any activity containing Java Step
Hi I am getting Null Pointer Error while running any activity with Java step. Even the OOTB Getcontent activity is also unable to...
Read more >
Java NullPointerException - Detect, Fix, and Best Practices
When we run the above program, it throws the following NullPointerException error message. Exception in thread "main" java.lang.
Read more >
java.lang.NullPointerException, FATAL EXCEPTION at ...
[Solved]-java.lang.NullPointerException, FATAL EXCEPTION at listview-eclipse · score:3. Accepted answer. Your problem is in the onStart method: · score:0. Better ...
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