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

Volley crash on request #201

Closed
Jayce2177 opened this issue Jun 13, 2018 · 2 comments
Closed

Volley crash on request #201

Jayce2177 opened this issue Jun 13, 2018 · 2 comments
Milestone

Comments

@Jayce2177
Copy link

I recently started to get this error when I try to send a POST request and not sure how I fix it, this is the first time in a year I have seen volley crash.

E/Volley: [1157] NetworkDispatcher.processRequest: Unhandled exception java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
at java.net.URLEncoder.encode(URLEncoder.java:204)
at com.android.volley.Request.encodeParameters(Request.java:491)
at com.android.volley.Request.getBody(Request.java:477)
at com.android.volley.toolbox.HurlStack.addBodyIfExists(HurlStack.java:245)
at com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest(HurlStack.java:219)
at com.android.volley.toolbox.HurlStack.executeRequest(HurlStack.java:97)
at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:131)
at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:120)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:87)

@jpd236
Copy link
Collaborator

jpd236 commented Jun 13, 2018

Looks like the same thing as #150. Please see my comment there and let me know if that resolves the problem.

Leaving this open as now that we've gotten multiple reports of this, it's clear that we should have a better error message here.

@jpd236 jpd236 added this to the 1.1.1 milestone Jun 13, 2018
@ghost
Copy link

ghost commented Jun 14, 2018

That was the issue, I had a null value that wasn't set before doing the volley request. Thanks for posting that, I tried to look for something before I posted this, but since it didn't tell me null error I had no clue what to look for.

Ooops looks like I logged into the wrong account to post.. Either way :)

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

2 participants