Open selimonline opened 5 years ago
same issue +1
Same issue +1
+1
+1
If you can't solve it. Please add all the issue in lable hacktoberfest so someone may help.
Hope everyone agreed.
+1
Same here +1
same
Same +1
same +1
same +1 @danikula Are you ok , we worry about you .
same, I also got the same error. @danikula please update its kinda urgent. Or if anyone got the solution please reply to this problem.
change the if statement to if (!socket.isInputShutdown()&&socket.isConnected()) might fix the error
same +1 Samsung A71
I think the bug waited long enough. I'm gonna attempt to find a fix or at least get the bottom of the issue. Inputs, suggestions, comments or concerns are all welcome.
same +1
same exception when using MediaPlayer, but not in ExoPlayer.
Change cache directory
val proxyServer = HttpProxyCacheServer
.Builder(context)
.cacheDirectory(context.filesDir)
.maxCacheSize(1024 * 1024 * 1024)
.build()
val proxyURL = proxyServer.getProxyUrl(sourceUrl)
+1
Hi everyone who is suffering from this disgusting error! I have figured out something in my source code that causes this error.
I was trying to open a connection from a URL and then read the InputStream for my use case.
try {
URLConnection conn = new URL(proxyUrl).openConnection();
conn.setConnectTimeout(5000);
conn.setReadTimeout(5000);
conn.connect();
is = conn.getInputStream();
} catch (MalformedURLException e) {
throw new RuntimeException(e);
} catch (IOException e) {
throw new RuntimeException(e);
}
When I try to remove these lines, the error has gone. I hope this information will also help you identify the root cause.
Happy coding..
Device : Samsung s7 Version : 2.7.1 Sdk Version : 27
HttpProxyCacheServer proxy = new HttpProxyCacheServer(this); String proxyUrl = proxy.getProxyUrl("HTTPS URL");
here is details logs :
26503-27478/com.oevo E/HttpProxyCacheServer: HttpProxyCacheServer error com.danikula.videocache.ProxyCacheException: Error closing socket input stream. Version: 2.7.1 at com.danikula.videocache.HttpProxyCacheServer.closeSocketInput(HttpProxyCacheServer.java:287) at com.danikula.videocache.HttpProxyCacheServer.releaseSocket(HttpProxyCacheServer.java:272) at com.danikula.videocache.HttpProxyCacheServer.processSocket(HttpProxyCacheServer.java:245) at com.danikula.videocache.HttpProxyCacheServer.access$200(HttpProxyCacheServer.java:54) at com.danikula.videocache.HttpProxyCacheServer$SocketProcessorRunnable.run(HttpProxyCacheServer.java:340) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764) Caused by: java.io.IOException: shutdown failed: ENOTCONN (Transport endpoint is not connected) at java.net.PlainSocketImpl.socketShutdown(PlainSocketImpl.java:267) at java.net.AbstractPlainSocketImpl.shutdownInput(AbstractPlainSocketImpl.java:582) at java.net.Socket.shutdownInput(Socket.java:1565) at com.danikula.videocache.HttpProxyCacheServer.closeSocketInput(HttpProxyCacheServer.java:280) at com.danikula.videocache.HttpProxyCacheServer.releaseSocket(HttpProxyCacheServer.java:272) at com.danikula.videocache.HttpProxyCacheServer.processSocket(HttpProxyCacheServer.java:245) at com.danikula.videocache.HttpProxyCacheServer.access$200(HttpProxyCacheServer.java:54) at com.danikula.videocache.HttpProxyCacheServer$SocketProcessorRunnable.run(HttpProxyCacheServer.java:340) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764) Caused by: android.system.ErrnoException: shutdown failed: ENOTCONN (Transport endpoint is not connected) at libcore.io.Linux.shutdown(Native Method) at libcore.io.ForwardingOs.shutdown(ForwardingOs.java:176)