I was fetching data from XAMPP localhost server using PHP-MySQL for my android project where I am using android volley library. It was working fine from the beginning but giving me "com.android.volley.NoConnectionError" (sometimes "unexpected end of stream on Connection", sometimes "unexpected status line") from yesterday. But the links are working perfectly while accessing from web browser.
I have tried https://api.androidhive.info/contacts/ for checking whether the problem is on the app or not, and got perfect response from server. But when then file is saved & hosted from localhost same error occurred (com.android.volley.NoConnectionError in logcat & running well in web browser).
Also tried all of these after re-installing XAMPP, but that has not solved the problem.
I searched for this error but no specific solution is found.
I am attaching the error message.
Thanks in advance for helping me.
13:46:05.867 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: com.android.volley.NoConnectionError: java.io.IOException: unexpected end of stream on Connection{192.168.2.33:80, proxy=DIRECT hostAddress=192.168.2.33 cipherSuite=none protocol=http/1.1} (recycle count=0)
08-25 13:46:05.867 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:151)
08-25 13:46:05.867 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:112)
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: Caused by: java.io.IOException: unexpected end of stream on Connection{192.168.2.33:80, proxy=DIRECT hostAddress=192.168.2.33 cipherSuite=none protocol=http/1.1} (recycle count=0)
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: at com.android.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:210)
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:80)
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: at com.android.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:906)
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:782)
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:463)
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:405)
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:521)
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: at com.android.volley.toolbox.HurlStack.performRequest(HurlStack.java:110)
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:96)
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: ... 1 more
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: Caused by: java.io.EOFException: \n not found: size=98 content=00401d0609254bb78adb828b01c9075413fb7fba1732c9b7e6b1f620cc6de9af...
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: at com.android.okhttp.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:200)
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: at com.android.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:191)
08-25 13:46:05.868 30807-30807/com.scripto.bhagat.enterprise.admin W/System.err: ... 9 more