2

I'm using Volley in my app to make HTTP calls to my rest server. When a user is not authenticated (no SESSION ID cookie) the server returns a 401.

But with Android 4.1.2 (with Android higher that 4.2.2 I don't have this problem) the calls fails with this error

java.io.IOException: No authentication challenges found

I had a look around and apparently it's because my server doesn't return the WWW-Authenticate header. But even after I made the change server side, I still get the same error when the app tries to make a call without valid cookie.

I have debugged a bit a in the HUrlStack when the code attempt a

connection.getResponseCode();

it returns that IOException error. But if a Re-do that call (with the Debugger) it then returns the correct 401... !

Could someone explain what's happening? Is this possible to fix only server side?

Johny19
  • 5,364
  • 14
  • 61
  • 99
  • This is a known issue in Android. Check this response: http://stackoverflow.com/a/15973063 – kepa Mar 21 '16 at 13:40

0 Answers0