Swipe throws an error java.lang.NullPointerException
See original GitHub issueENV
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:
- Created 5 years ago
- Comments:22 (12 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub 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