AndroidVideoCache
AndroidVideoCache copied to clipboard
Error pinging server
2019-12-17 15:44:39.301 28787-28819/com.example.videocachesample E/Pinger: Error reading ping response
com.danikula.videocache.ProxyCacheException: Error opening connection for http://127.0.0.1:39266/ping with offset 0. Version: 2.7.1
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:85)
at com.danikula.videocache.Pinger.pingServer(Pinger.java:101)
at com.danikula.videocache.Pinger.access$100(Pinger.java:33)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:123)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:119)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.io.IOException: Cleartext HTTP traffic to 127.0.0.1 not permitted
at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:115)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:458)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:407)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:538)
at com.danikula.videocache.HttpUrlSource.openConnection(HttpUrlSource.java:171)
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:78)
at com.danikula.videocache.Pinger.pingServer(Pinger.java:101)
at com.danikula.videocache.Pinger.access$100(Pinger.java:33)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:123)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:119)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
2019-12-17 15:44:39.309 28787-28819/com.example.videocachesample I/chatty: uid=10200(com.example.videocachesample) pool-3-thread-1 identical 1 line
2019-12-17 15:44:39.317 28787-28819/com.example.videocachesample E/Pinger: Error reading ping response
com.danikula.videocache.ProxyCacheException: Error opening connection for http://127.0.0.1:39266/ping with offset 0. Version: 2.7.1
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:85)
at com.danikula.videocache.Pinger.pingServer(Pinger.java:101)
at com.danikula.videocache.Pinger.access$100(Pinger.java:33)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:123)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:119)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.io.IOException: Cleartext HTTP traffic to 127.0.0.1 not permitted
at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:115)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:458)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:407)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:538)
at com.danikula.videocache.HttpUrlSource.openConnection(HttpUrlSource.java:171)
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:78)
at com.danikula.videocache.Pinger.pingServer(Pinger.java:101)
at com.danikula.videocache.Pinger.access$100(Pinger.java:33)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:123)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:119)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
2019-12-17 15:44:39.327 28787-28787/com.example.videocachesample E/Pinger: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at https://github.com/danikula/AndroidVideoCache/issues/134. Default proxies are: [DIRECT]
com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at https://github.com/danikula/AndroidVideoCache/issues/134. Default proxies are: [DIRECT]. Version: 2.7.1
at com.danikula.videocache.Pinger.ping(Pinger.java:73)
at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:185)
at com.danikula.videocache.HttpProxyCacheServer.
You have to add http://127.0.0.1 to your network security config for android version 9 and later .. like this
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">127.0.0.1</domain>
</domain-config>
and if you do not have an idea about what I am saying kindly check this link https://developer.android.com/training/articles/security-config
I added 127.0.0.1 because the library uses it as a default proxy. for me, it is working but still faces some issues and I do not know if it related to this or not