danikula / AndroidVideoCache

Cache support for any video player with help of single line
Apache License 2.0
5.43k stars 1.16k forks source link

Error pinging server #134

Closed danikula closed 7 years ago

danikula commented 7 years ago

In some cases local server cache proxy is not pinged. One known problem is system proxy in connection's settings (wi-fi or apn). May be some another reasons exist. Typical stacktrace is


E/Pinger: Error reading ping response
          com.danikula.videocache.ProxyCacheException: Error opening connection for http://127.0.0.1:52645/ping with offset 0
              at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:75)
              at com.danikula.videocache.Pinger.pingServer(Pinger.java:86)
              at com.danikula.videocache.Pinger.access$100(Pinger.java:28)
              at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:108)
              at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:104)
              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
              at java.lang.Thread.run(Thread.java:818)
           Caused by: java.io.FileNotFoundException: http://127.0.0.1:52645/ping
              at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:238)
              at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:70)
              at com.danikula.videocache.Pinger.pingServer(Pinger.java:86) 
              at com.danikula.videocache.Pinger.access$100(Pinger.java:28) 
              at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:108) 
              at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:104) 
              at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
              at java.lang.Thread.run(Thread.java:818) 
E/Pinger: Error reading ping response
          com.danikula.videocache.ProxyCacheException: Error opening connection for http://127.0.0.1:52645/ping with offset 0
              at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:75)
              at com.danikula.videocache.Pinger.pingServer(Pinger.java:86)
              at com.danikula.videocache.Pinger.access$100(Pinger.java:28)
              at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:108)
              at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:104)
              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
              at java.lang.Thread.run(Thread.java:818)
           Caused by: java.io.FileNotFoundException: http://127.0.0.1:52645/ping
              at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:238)
              at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:70)
              at com.danikula.videocache.Pinger.pingServer(Pinger.java:86) 
              at com.danikula.videocache.Pinger.access$100(Pinger.java:28) 
              at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:108) 
              at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:104) 
              at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
              at java.lang.Thread.run(Thread.java:818) 
E/Pinger: Error reading ping response
          com.danikula.videocache.ProxyCacheException: Error opening connection for http://127.0.0.1:52645/ping with offset 0
              at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:75)
              at com.danikula.videocache.Pinger.pingServer(Pinger.java:86)
              at com.danikula.videocache.Pinger.access$100(Pinger.java:28)
              at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:108)
              at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:104)
              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
              at java.lang.Thread.run(Thread.java:818)
           Caused by: java.io.FileNotFoundException: http://127.0.0.1:52645/ping
              at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:238)
              at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:70)
              at com.danikula.videocache.Pinger.pingServer(Pinger.java:86) 
              at com.danikula.videocache.Pinger.access$100(Pinger.java:28) 
              at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:108) 
              at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:104) 
              at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
              at java.lang.Thread.run(Thread.java:818) 
E/Pinger: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, email me danikula@gmail.com or create issue here https://github.com/danikula/AndroidVideoCache/issues
          com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, email me danikula@gmail.com or create issue here https://github.com/danikula/AndroidVideoCache/issues
              at com.danikula.videocache.Pinger.ping(Pinger.java:67)
              at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:182)
              at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:119)
              at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:100)
              at com.danikula.videocache.sample.VideoFragment.startVideo(VideoFragment.java:59)
              at com.danikula.videocache.sample.VideoFragment.afterViewInjected(VideoFragment.java:44)
              at com.danikula.videocache.sample.VideoFragment_.onViewChanged(VideoFragment_.java:107)
              at org.androidannotations.api.view.OnViewChangedNotifier.notifyViewChanged(OnViewChangedNotifier.java:41)
              at com.danikula.videocache.sample.VideoFragment_.onViewCreated(VideoFragment_.java:72)
              at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1097)
              at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1259)
              at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
              at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1624)
              at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:330)
              at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:547)
              at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1237)
              at android.app.Activity.performStart(Activity.java:6268)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
              at android.app.ActivityThread.-wrap11(ActivityThread.java)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:148)
              at android.app.ActivityThread.main(ActivityThread.java:5417)
              at java.lang.reflect.Method.invoke(Native Method)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
danikula commented 7 years ago

Since #28 fixed by this commit it should be fixed too.

ricardorover commented 7 years ago

Hi. Using AndroidVideoCache version 2.7.0 I saw the log below, so here I am, reporting as asked :) Hope it helps somehow.

I was testing using AndroidVideoCache inside recyclerview rows to pre-load audio and video. Scrolling between a lot of items very fast, around list position 650 the log stack traces appeared:

08-01 23:37:33.905 16591-16591 W/Pinger: Error pinging server (attempt: 0, timeout: 70). 
08-01 23:37:34.046 16591-16591 W/Pinger: Error pinging server (attempt: 1, timeout: 140). 
08-01 23:37:34.326 16591-16591 W/Pinger: Error pinging server (attempt: 2, timeout: 280). 
08-01 23:37:34.335 16591-16591 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.0
                                                              at com.danikula.videocache.Pinger.ping(Pinger.java:73)
                                                              at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:183)
                                                              at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:120)
                                                              at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:101)
                                                              at com.myapp.app.controller.AssetController.streamAsset(AssetController.java:117)
                                                              at com.myapp.app.ui.main.feed.cell.AppVideoCell.bind(AppVideoCell.java:38)
                                                              at com.myapp.app.ui.main.feed.AppListAdapter.onBindViewHolder(AppListAdapter.java:97)
                                                              at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6356)
                                                              at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6389)
                                                              at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5335)
                                                              at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5598)
                                                              at android.support.v7.widget.GapWorker.prefetchPositionWithDeadline(GapWorker.java:282)
                                                              at android.support.v7.widget.GapWorker.flushTaskWithDeadline(GapWorker.java:336)
                                                              at android.support.v7.widget.GapWorker.flushTasksWithDeadline(GapWorker.java:349)
                                                              at android.support.v7.widget.GapWorker.prefetch(GapWorker.java:356)
                                                              at android.support.v7.widget.GapWorker.run(GapWorker.java:387)
                                                              at android.os.Handler.handleCallback(Handler.java:751)
                                                              at android.os.Handler.dispatchMessage(Handler.java:95)
                                                              at android.os.Looper.loop(Looper.java:154)
                                                              at android.app.ActivityThread.main(ActivityThread.java:6126)
                                                              at java.lang.reflect.Method.invoke(Native Method)
                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

(...)

08-01 23:37:34.543 16591-16591 W/Pinger: Error pinging server (attempt: 0, timeout: 70). 
08-01 23:37:34.685 16591-16591 W/Pinger: Error pinging server (attempt: 1, timeout: 140). 
08-01 23:37:34.966 16591-16591 W/Pinger: Error pinging server (attempt: 2, timeout: 280). 
08-01 23:37:34.969 16591-16591 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.0
                                                              at com.danikula.videocache.Pinger.ping(Pinger.java:73)
                                                              at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:183)
                                                              at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:120)
                                                              at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:101)
                                                              at com.myapp.app.controller.AssetController.streamAsset(AssetController.java:117)
                                                              at com.myapp.app.ui.main.feed.cell.AppVideoCell.bind(AppVideoCell.java:38)
                                                              at com.myapp.app.ui.main.feed.AppListAdapter.onBindViewHolder(AppListAdapter.java:97)
                                                              at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6356)
                                                              at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6389)
                                                              at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5335)
                                                              at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5598)
                                                              at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5440)
                                                              at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5436)
                                                              at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2224)
                                                              at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1551)
                                                              at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1511)
                                                              at android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1325)
                                                              at android.support.v7.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:1061)
                                                              at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:4726)
                                                              at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
                                                              at android.view.Choreographer.doCallbacks(Choreographer.java:686)
                                                              at android.view.Choreographer.doFrame(Choreographer.java:618)
                                                              at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
                                                              at android.os.Handler.handleCallback(Handler.java:751)
                                                              at android.os.Handler.dispatchMessage(Handler.java:95)
                                                              at android.os.Looper.loop(Looper.java:154)
                                                              at android.app.ActivityThread.main(ActivityThread.java:6126)
                                                              at java.lang.reflect.Method.invoke(Native Method)
                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

(...)

08-01 23:37:37.535 16591-20734 E/ProxyCache: ProxyCache error
                                                              com.danikula.videocache.ProxyCacheException: Error opening connection for http://api.myapp.com/asset/123 with offset 72932. Version: 2.7.0
                                                                  at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:75)
                                                                  at com.danikula.videocache.ProxyCache.readSource(ProxyCache.java:123)
                                                                  at com.danikula.videocache.ProxyCache.access$100(ProxyCache.java:19)
                                                                  at com.danikula.videocache.ProxyCache$SourceReaderRunnable.run(ProxyCache.java:187)
                                                                  at java.lang.Thread.run(Thread.java:761)
                                                               Caused by: java.io.FileNotFoundException: http://api.myapp.com/asset/123
                                                                  at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:250)
                                                                  at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:70)
                                                                  at com.danikula.videocache.ProxyCache.readSource(ProxyCache.java:123) 
                                                                  at com.danikula.videocache.ProxyCache.access$100(ProxyCache.java:19) 
                                                                  at com.danikula.videocache.ProxyCache$SourceReaderRunnable.run(ProxyCache.java:187) 
                                                                  at java.lang.Thread.run(Thread.java:761) 
08-01 23:37:37.537 16591-17446 E/HttpProxyCacheServer: HttpProxyCacheServer error
                                                                        com.danikula.videocache.ProxyCacheException: Error processing request. Version: 2.7.0
                                                                            at com.danikula.videocache.HttpProxyCacheServer.processSocket(HttpProxyCacheServer.java:241)
                                                                            at com.danikula.videocache.HttpProxyCacheServer.access$200(HttpProxyCacheServer.java:52)
                                                                            at com.danikula.videocache.HttpProxyCacheServer$SocketProcessorRunnable.run(HttpProxyCacheServer.java:338)
                                                                            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
                                                                            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                                            at java.lang.Thread.run(Thread.java:761)
                                                                         Caused by: com.danikula.videocache.ProxyCacheException: Error reading source 1 times. Version: 2.7.0
                                                                            at com.danikula.videocache.ProxyCache.checkReadSourceErrorsCount(ProxyCache.java:59)
                                                                            at com.danikula.videocache.ProxyCache.read(ProxyCache.java:45)
                                                                            at com.danikula.videocache.HttpProxyCache.responseWithCache(HttpProxyCache.java:79)
                                                                            at com.danikula.videocache.HttpProxyCache.processRequest(HttpProxyCache.java:45)
                                                                            at com.danikula.videocache.HttpProxyCacheServerClients.processRequest(HttpProxyCacheServerClients.java:42)
                                                                            at com.danikula.videocache.HttpProxyCacheServer.processSocket(HttpProxyCacheServer.java:234)
                                                                            at com.danikula.videocache.HttpProxyCacheServer.access$200(HttpProxyCacheServer.java:52) 
                                                                            at com.danikula.videocache.HttpProxyCacheServer$SocketProcessorRunnable.run(HttpProxyCacheServer.java:338) 
                                                                            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428) 
                                                                            at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
                                                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
                                                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
                                                                            at java.lang.Thread.run(Thread.java:761) 
Inxo commented 7 years ago

Have a some problem as @ricardorover

ziyuo commented 7 years ago

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.0 at com.danikula.videocache.Pinger.ping(Pinger.java:73) at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:183) at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:120) at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:101) at com.haier.cellarette.activity.VideoModuleActivity.startVideo(VideoModuleActivity.java:445) at com.haier.cellarette.activity.VideoModuleActivity.showContent(VideoModuleActivity.java:353) at com.haier.wine_consult.presenter.ConsultPresenter$5.onNext(ConsultPresenter.java:136) at com.haier.wine_consult.presenter.ConsultPresenter$5.onNext(ConsultPresenter.java:121) at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:139) at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:215) at rx.android.schedulers.LooperScheduler$ScheduledAction.run(LooperScheduler.java:107) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5280) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)

josinaldobarbosa commented 7 years ago
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.0
                                                                 at com.danikula.videocache.Pinger.ping(Pinger.java:73)
                                                                 at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:183)
                                                                 at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:120)
                                                                 at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:101)
                                                                 ...

after many days of frustration I managed to find something: https://github.com/NanoHttpd/nanohttpd/issues/270#issuecomment-251521454, as MrStanaland said, Mint is causing this, at least in my case, now it works for me :+1:

Mint.disableNetworkMonitoring();
Mint.initAndStartSession(context, BuildConfig.MINT);
SanfenR commented 7 years ago

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: [HTTP @ Version: 2.7.0 at com.danikula.videocache.Pinger.ping(Pinger.java:73) at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:183) at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:120) at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:101) at com.goodchef.liking.module.paly.VideoPlayActivity.onCreate(VideoPlayActivity.java:146) at android.app.Activity.performCreate(Activity.java:6910) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) at cn.jiguang.a.a.d.a.a.d.callActivityOnCreate(Unknown Source) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2746) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:156) at android.app.ActivityThread.main(ActivityThread.java:6577) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)

When I loaded the local video, there was' Error pinging server (attempt: 2, timeout: 280) 'and this Error

firebaseempower commented 6 years ago

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.0 at com.danikula.videocache.Pinger.ping(Pinger.java:73) at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:183) at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:120) at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:101) at com.danikula.videocache.sample.VideoFragment.setupPlayer(VideoFragment.java:80) at com.danikula.videocache.sample.VideoFragment.afterViewInjected(VideoFragment.java:63) at com.danikula.videocache.sample.VideoFragment.onViewChanged(VideoFragment.java:107) at org.androidannotations.api.view.OnViewChangedNotifier.notifyViewChanged(OnViewChangedNotifier.java:41) at com.danikula.videocache.sample.VideoFragment.onViewCreated(VideoFragment.java:72) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1097) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1259) at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1624) at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:330) at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:547) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1270) at android.app.Activity.performStart(Activity.java:6689) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2622) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2724) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1473) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6123) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)

getting this issue

dechaow commented 6 years ago

Hello,I using this library,this but I rest on video list pager a long time, again scroll list,they throw the error:

`E/Pinger: Error reading ping response com.danikula.videocache.ProxyCacheException: Error opening connection for http://127.0.0.1:58762/ping with offset 0. Version: 2.7.0 at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:75) 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:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:776) Caused by: java.io.FileNotFoundException: http://127.0.0.1:58762/ping at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:250) at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:70) 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:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:776)

//When I look this lines,I don't think Default proxy is [HTTP @ 10.8.8.103:81] but proxy in Library is //[127.0.0.1] ,my should modify Default proxy in library?

E/Pinger: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [HTTP @ 10.8.8.103:81] com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [HTTP @ 10.8.8.103:81]. Version: 2.7.0 at com.danikula.videocache.Pinger.ping(Pinger.java:73) at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:183) at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:120) at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:101) at com.shuyu.gsyvideoplayer.video.base.GSYVideoView.setUp(GSYVideoView.java:381) at com.shuyu.gsyvideoplayer.video.base.GSYVideoControlView.setUp(GSYVideoControlView.java:524) ` I hope you can answer my question,thanks.

gongtingshisi commented 6 years ago

thanks author's masterpiece . response error still occurs on my phone,even though it has "IgnoreHostProxySelector.install(PROXY_HOST, port);" in HttpProxyCacheServer constructor function.Anyone knows how to resolve it?thank you.

Hackforid commented 6 years ago

I saw this log when I connected to Wifi which has no Connection to Internet

AND If I close both wifi and cell data, your proxy can not provider cached res.

ycdm commented 6 years ago

This problem still occurs even if wifi is connected

mazzonem commented 6 years ago

Reporting here, Still seeing this problem on 2.7.0.

krishnapatel086 commented 6 years ago

i also

carozhu commented 6 years ago

me too

eqenkhjin commented 6 years ago

too too :)

arashsammak commented 6 years ago

me too

github2013j commented 6 years ago

+1

xksds commented 6 years ago

+1

hojjatimani commented 6 years ago

✋ on 2.7.1

javieritis commented 6 years ago

+1

alexkong1 commented 6 years ago

Was getting this issue using the Android emulator. Turns out it was because Android P by default blocks cleartext support for HTTP calls, so if you're using 127.0.0.1 or something like that for your proxy, it'll be blocked. You can add exceptions for certain domains to get around that. Not sure if this helps anybody else.

maxdylan commented 6 years ago

09-13 16:01:11.816 17978-17978/com.xintu.microvoice W/Pinger: Error pinging server (attempt: 0, timeout: 70). 09-13 16:01:11.968 17978-17978/com.xintu.microvoice W/Pinger: Error pinging server (attempt: 1, timeout: 140). 09-13 16:01:12.250 17978-17978/com.xintu.microvoice W/Pinger: Error pinging server (attempt: 2, timeout: 280). 09-13 16:01:12.258 17978-17978/com.xintu.microvoice 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.getProxyUrl(HttpProxyCacheServer.java:122) at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:103) at com.xintu.microvoice.service.PlayVoiceService.playMediaWhileDownload(PlayVoiceService.java:1154) at com.xintu.microvoice.service.PlayVoiceService.controlVoice(PlayVoiceService.java:230) at com.xintu.microvoice.service.PlayVoiceService.controlVoice(PlayVoiceService.java:186) at com.xintu.microvoice.service.PlayVoiceService.onVoiceChanged(PlayVoiceService.java:517) at com.xintu.microvoice.util.PlayListManager.playPreVoice(PlayListManager.java:176) at com.xintu.microvoice.ui.activity.CarModeActivity.onClick(CarModeActivity.java:567) at android.view.View.performClick(View.java:5215) at android.view.View$PerformClick.run(View.java:21196) at android.os.Handler.handleCallback(Handler.java:742) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:157) at android.app.ActivityThread.main(ActivityThread.java:5684) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:746) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)

changjiashuai commented 6 years ago

10-11 20:29:16.834 19335-19335/in.togetu.video W/HttpProxyCacheDebuger: Error pinging server (attempt: 2, timeout: 280). 10-11 20:29:16.834 19335-19335/in.togetu.video E/HttpProxyCacheDebuger: 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@] 10-11 20:29:17.144 19335-19335/in.togetu.video W/System.err: at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:194) 10-11 20:29:17.144 19335-19335/in.togetu.video W/System.err: at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:128) 10-11 20:29:17.144 19335-19335/in.togetu.video W/System.err: at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:109)

changjiashuai commented 6 years ago

@danikula

lucazin commented 6 years ago

me too

hkstar commented 6 years ago

me too

ZalaJanaksinh commented 6 years ago

me too

selimonline commented 6 years ago

Having same issues, honestly this library has tons of issues...

wcquan2008 commented 6 years ago

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.0 at com.danikula.videocache.Pinger.ping(Pinger.java:73) at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:183) at com.danikula.videocache.HttpProxyCacheServer.(HttpProxyCacheServer.java:82) at com.danikula.videocache.HttpProxyCacheServer.(HttpProxyCacheServer.java:52) at com.danikula.videocache.HttpProxyCacheServer$Builder.build(HttpProxyCacheServer.java:435) at com.iflytek.common.cache.MediaCacheProxy.newProxy(MediaCacheProxy.kt:49) at com.iflytek.common.cache.MediaCacheProxy.init(MediaCacheProxy.kt:21) at com.iflytek.yyspoken.read.ReadApplication.onCreate(ReadApplication.kt:47) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5503) at android.app.ActivityThread.-wrap2(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1595) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:203) at android.app.ActivityThread.main(ActivityThread.java:6251) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)

vecharm commented 5 years ago

me toooooo,version:2.7.1 , how resolve it?

crjacinro commented 5 years ago

This is becoming a recurring issue in our end. Anyone has leads on this issue? @danikula Do you have plans on fixing or probably investigating this issue? Or anyone knows any alternative library to use? Thanks.

baidongliang commented 5 years ago

这个是不是在android 9.0后爆出的问题

HulShun commented 5 years ago

这个是不是在android 9.0后爆出的问题 I also see this issue in android 8.0

christopherperry commented 5 years ago

Seeing this issue in our app.

01-11 08:26:39.530 14814-14935/com.airbnb.android.development E/Pinger: Error reading ping response
    com.danikula.videocache.ProxyCacheException: Error opening connection for http://127.0.0.1:36586/ping with offset 0. Version: 2.7.0
        at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:75)
        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:160)
        at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:68)
        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) 
01-11 08:26:39.535 14814-14935/com.airbnb.android.development I/chatty: uid=10086(com.airbnb.android.development) pool-18-thread- identical 1 line
01-11 08:26:39.538 14814-14935/com.airbnb.android.development E/Pinger: Error reading ping response
    com.danikula.videocache.ProxyCacheException: Error opening connection for http://127.0.0.1:36586/ping with offset 0. Version: 2.7.0
        at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:75)
        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:160)
        at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:68)
        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) 
01-11 08:26:39.540 14814-14908/com.airbnb.android.development 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.0
        at com.danikula.videocache.Pinger.ping(Pinger.java:73)
        at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:183)
        at com.danikula.videocache.HttpProxyCacheServer.<init>(HttpProxyCacheServer.java:82)
        at com.danikula.videocache.HttpProxyCacheServer.<init>(HttpProxyCacheServer.java:67)
whutlichao commented 5 years ago

com.danikula.videocache.ProxyCacheException: Error opening connection for http://127.0.0.1:38222/ping with offset 0. Version: 6.0.3

ghost commented 5 years ago

Heppened to me Version: 2.7.1

reamal commented 5 years ago

Heppened to me Version: 2.7.1 . nokia x6 android 9.0

pezezzle commented 5 years ago

me to with version 2.7.1 and android 9.0

vivekkumarmaru commented 5 years ago

In my case the issue is the target version you have chosen for your android application. if it's android 9.0 or higher it will not work with legacy applications.

I simply resolved it by adding <uses-library android:name="org.apache.http.legacy" android:required="false" /> under my <application> in AndroidManifest.xml

Because server try to make an http request instead of an https request.

pezezzle commented 5 years ago

i have solved by adding android:usesCleartextTraffic="true" to <application> in Manifest

iamriajul commented 5 years ago

Hi, I have got the error to in Logcat. 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.getProxyUrl(HttpProxyCacheServer.java:122) at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:103)

As requested to submit, I'm submitting... Details: Using: 2.7.1 of library Playing mp3 audio from S3 server with ExoPlayer, I'm passing proxy url to ExoPlayer. AndroidX Project

juanlabrador commented 5 years ago

I have this error in Android 6 Lg Phone, with Android Pie works with this line android:usesCleartextTraffic="true"

panosx2 commented 5 years ago
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
pcg92 commented 5 years ago

Fixed using this answer: https://stackoverflow.com/a/54268640/3994630

dkent commented 5 years ago

10/08/2019 20:31:38.113 HttpUrlSource - Open connection to http://127.0.0.1:37361/ping 10/08/2019 20:31:38.177 Pinger - Error pinging server (attempt: 0, timeout: 70). 10/08/2019 20:31:38.317 Pinger - Error pinging server (attempt: 1, timeout: 140). 10/08/2019 20:31:38.598 Pinger - Error pinging server (attempt: 2, timeout: 280). 10/08/2019 20:31:38.602 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) ~[na:0.0] at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:185) ~[na:0.0] at com.danikula.videocache.HttpProxyCacheServer.(HttpProxyCacheServer.java:84) ~[na:0.0] at com.danikula.videocache.HttpProxyCacheServer.(HttpProxyCacheServer.java:54) ~[na:0.0] at com.danikula.videocache.HttpProxyCacheServer$Builder.build(HttpProxyCacheServer.java:451) ~[na:0.0] at com.circle38.photocircle.PCApplication.onCreate(PCApplication.java:127) ~[na:0.0] at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154) ~[na:0.0] at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6209) ~[na:0.0] at android.app.ActivityThread.access$1200(ActivityThread.java:236) ~[na:0.0] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1784) ~[na:0.0] at android.os.Handler.dispatchMessage(Handler.java:106) ~[na:0.0] at android.os.Looper.loop(Looper.java:214) ~[na:0.0] at android.app.ActivityThread.main(ActivityThread.java:7037) ~[na:0.0] at java.lang.reflect.Method.invoke(Native Method) ~[na:0.0] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) ~[na:0.0] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965) ~[na:0.0] 10/08/2019 20:31:38.602 HttpProxyCacheServer - Proxy cache server started. Is it alive? false

omidraha commented 5 years ago

I have the same issue.

mdeora commented 5 years ago

Same issue, its because of using http url for ping instead of https.

mdeora commented 5 years ago

can we change the ping to https? Since you are pinging localhost should be possible?

brandoFS commented 5 years ago

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.getProxyUrl(HttpProxyCacheServer.java:122) at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:103) at com.vilynx.sdk.mappers.VilynxResponseDataMapper$Companion.mapResponse(VilynxResponseDataMapper.kt:38) at com.vilynx.sdk.repository.GetHashesRemoteDataSource$getHashes$1.onResponse(GetHashesRemoteDataSource.kt:44) at com.google.firebase.perf.network.zzf.onResponse(com.google.firebase:firebase-perf@@18.0.1:22) at com.newrelic.agent.android.instrumentation.okhttp3.CallbackExtension.onResponse(CallbackExtension.java:41) at com.google.firebase.perf.network.zzf.onResponse(com.google.firebase:firebase-perf@@18.0.1:22) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) 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:919)

It said to report this message so here I am reporting

rdonik commented 5 years ago

In my case the issue is the target version you have chosen for your android application. if it's android 9.0 or higher it will not work with legacy applications.

I simply resolved it by adding <uses-library android:name="org.apache.http.legacy" android:required="false" /> under my <application> in AndroidManifest.xml

Because server try to make an http request instead of an https request.

this helps for me too, thanks)