title: Volley: [355] NetworkDispatcher.processRequest: Unhandled exception java.lang.IllegalArgumentException
body: <p>Hi I'm trying to run the below code to post data to a an online MySQL database</p>
  
  <pre><code>    if (data.getCount() &gt; 0) {
                      data.moveToFirst();
                      do {
                          save(orderId,client, data.getString(0),data.getString(3),String.valueOf(finalCost),data.getString(4),longitude,latitude,"_",progressDialog);
                      } while (data.moveToNext());
                         data.close();
                      mydb.clearCart();
  
      private void save(final String orderId, final String client, final String prodid, final String Seller, final String amount, final String quantity, final double longi, final double lat, final String location, final ProgressDialog progressDialog) {
      String URL_ORDER = "https://foodfuzz.co.ke/foodfuzzbackend/market/orders/order.php";
      StringRequest orderStringRequest = new StringRequest(Request.Method.POST, URL_ORDER,
              //android M
  
              new Response.Listener&lt;String&gt;() {
                  @Override
                  public void onResponse(String response) {
                      try {
                          JSONObject orderObject = new JSONObject(response);
                          String orderSuccess = orderObject.getString("success");
                          if(orderSuccess.equals("1")){
                              pay.setVisibility(View.GONE);
                              progressDialog.dismiss();
                              Toast.makeText(CheckOutActivity.this,"Order Placed Successfully " , Toast.LENGTH_SHORT).show();
                          }else{
                              Logger.getLogger("Error",orderObject.getString("message"));
                              pay.setVisibility(View.GONE);
                              progressDialog.dismiss();
                              Toast.makeText(CheckOutActivity.this,"Order failed "+orderObject.getString("message") , Toast.LENGTH_SHORT).show();
                          }
                      } catch (JSONException e) {
                          e.printStackTrace();
                          progressDialog.dismiss();
                          Toast.makeText(CheckOutActivity.this,"Unable to place order " + e.toString(), Toast.LENGTH_SHORT).show();
                          pay.setEnabled(true);
                      }
                  }
              },
              new Response.ErrorListener() {
                  @Override
                  public void onErrorResponse(VolleyError error) {
                      progressDialog.dismiss();
                      error.printStackTrace();
                      Toast.makeText(CheckOutActivity.this,"Error placing order " + error.toString(), Toast.LENGTH_SHORT).show();
                      pay.setEnabled(true);
                  }
              }){
          protected Map&lt;String, String&gt; getParams() {
              Map&lt;String, String&gt; params = new HashMap&lt;&gt;();
              params.put("orderId",orderId);
              params.put("client", client);
              params.put("name", prodid);
              params.put("seller", Seller);
              params.put("amount", amount);
              params.put("quantity",quantity);
              params.put("longitude",String.valueOf(longi));
              params.put("latitude",String.valueOf(lat));
              params.put("location",location);
              return params;
          }
      };
      RequestQueue orderRequestQueue = Volley.newRequestQueue(this);
      orderRequestQueue.add(orderStringRequest);
  
  }
  </code></pre>
  
  <p>The data is from an sqlite database wchich is retrieving it correctly. When I run this on android version less that 26 it works correctly but on version greater than 26 I get the error bellow</p>
  
  <pre><code>    2019-10-30 17:57:45.206 8589-8697/com.otemainc.foodfuzzapp E/Volley: [355] NetworkDispatcher.processRequest: Unhandled exception java.lang.IllegalArgumentException: Request#getParams() or Request#getPostParams() returned a map containing a null key or value: (client, null). All keys and values must be non-null.
  java.lang.IllegalArgumentException: Request#getParams() or Request#getPostParams() returned a map containing a null key or value: (client, null). All keys and values must be non-null.
      at com.android.volley.Request.encodeParameters(Request.java:478)
      at com.android.volley.Request.getBody(Request.java:466)
      at com.android.volley.toolbox.HurlStack.addBodyIfExists(HurlStack.java:275)
      at com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest(HurlStack.java:249)
      at com.android.volley.toolbox.HurlStack.executeRequest(HurlStack.java:94)
      at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:123)
      at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:131)
      at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111)
      at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90)
  </code></pre>
  
  <p>Could there be something that I need to update on my code to take care of the new version? If yes what is it?</p>