ProtocolException: Expected ':status' header not present

Today faced the same problem. The reason was in updating nginx on the server to the latest version (1.13.6). Ask your backend team if they did not update nginx on the server.

nginx changelog - http://nginx.org/en/CHANGES


I am using OkHttp2 (2.7.5) and I solved this issue by forcing the client to use HTTP 1.1 protocol

OkHttpClient client = new OkHttpClient();
client.setProtocols(Arrays.asList(Protocol.HTTP_1_1)); // <- add this line

After hours of mess, finally got a solution. Updating Retrofit and Okhttp3 libraries to the latest version did the trick for me.

compile 'com.squareup.okhttp3:okhttp:3.9.0'

compile 'com.squareup.retrofit2:retrofit:2.3.0'