0

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
  • Make sure your xampp server is running. The problem is not with the app.Check if both your system and and mobile is connected to same network while testing. – p.mathew13 Aug 25 '17 at 09:41
  • Thanks @p.mathew13 Server is running & giving proper data when I hit the links via web browser. Actually I am testing my app from emulator. Localhost was returning data properly on the day before yesterday before leaving my workplace & when I started work yesterday, it started to give error. – Dipanjan Das Aug 25 '17 at 10:30
  • Clean install & copying only project files lead me to solve this problem. Thank you. – Dipanjan Das Aug 25 '17 at 11:17
  • Maybe it will help you->>>> https://stackoverflow.com/questions/38496799/android-volley-library-does-not-work-on-local-ip – pedram shabani Sep 07 '17 at 17:41

0 Answers0