I have an issue with a Volley request that on some phone returns a result, but on other phones returns a different result. I have no idea how this is possible.
It is a POST request that contains the following data:
“user_id” : “5c62d7d060rt64321ee60a53”,
“category” : “57gh4f66a1f8ae9c0e287ca0”,
“lat” : “54.40423071683623”,
“long” : “16.09879057854414”
This is supposed to return some data, but when the backend responds, it returns a different JSON, depending on the phone that I am using. If I do the same request from Postman, I get the correct response.
Do you have any ideas on how to approach this? (I’ve also replaced the obsolete Volley library from the app and used the latest version, but it acts the same exact way).
EDIT: If I put “user_id” as null, I get the same response (a list of 8 users) on the “faulty phone”, whereas on the “working phone” I get an error, as it should. How can that be? Also, if I don’t put any category key-value pair for the request, in Postman, I get the list of 8 users. The same happens in the faulty phones and in the working ones.
So basically, the faulty phone acts as if it’s making a correct request, with the required user_id and without a category key-value pair (and receives the list of 8 users), regardless of what you put in the body of the request. I actually deleted everything from the jsonParams, sending an empty body. The response from the backend was the same 8 elements, despite my request not having the required “user_id” key.