It seems to occur very rarely
Perhaps glide has canceled it and it seems to be thread interrupted
use library
OkHttp Log
06-12 14:29:36.716 17923 18274 W OkHttp : Failed to read public suffix list
06-12 14:29:36.716 17923 18274 W OkHttp : java.io.InterruptedIOException: thread interrupted
06-12 14:29:36.716 17923 18274 W OkHttp : at okio.Timeout.throwIfReached(Timeout.java:146)
06-12 14:29:36.716 17923 18274 W OkHttp : at okio.Okio$2.read(Okio.java:135)
06-12 14:29:36.716 17923 18274 W OkHttp : at okio.RealBufferedSource.request(RealBufferedSource.java:66)
06-12 14:29:36.716 17923 18274 W OkHttp : at okio.RealBufferedSource.require(RealBufferedSource.java:59)
06-12 14:29:36.716 17923 18274 W OkHttp : at okio.GzipSource.consumeHeader(GzipSource.java:114)
06-12 14:29:36.716 17923 18274 W OkHttp : at okio.GzipSource.read(GzipSource.java:73)
06-12 14:29:36.716 17923 18274 W OkHttp : at okio.RealBufferedSource.request(RealBufferedSource.java:66)
06-12 14:29:36.716 17923 18274 W OkHttp : at okio.RealBufferedSource.require(RealBufferedSource.java:59)
06-12 14:29:36.716 17923 18274 W OkHttp : at okio.RealBufferedSource.readInt(RealBufferedSource.java:255)
06-12 14:29:36.716 17923 18274 W OkHttp : at okhttp3.internal.publicsuffix.PublicSuffixDatabase.readTheList(PublicSuffixDatabase.java:288)
06-12 14:29:36.716 17923 18274 W OkHttp : at okhttp3.internal.publicsuffix.PublicSuffixDatabase.findMatchingRule(PublicSuffixDatabase.java:109)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.internal.publicsuffix.PublicSuffixDatabase.getEffectiveTldPlusOne(PublicSuffixDatabase.java:82)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.Cookie.parse(Cookie.java:310)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.Cookie.parse(Cookie.java:218)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.Cookie.parseAll(Cookie.java:444)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.internal.http.HttpHeaders.receiveHeaders(HttpHeaders.java:179)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:95)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:211)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
06-12 14:29:36.717 17923 18274 W OkHttp : at okhttp3.RealCall.execute(RealCall.java:69)
06-12 14:29:36.717 17923 18274 W OkHttp : at com.bumptech.glide.integration.okhttp3.OkHttpStreamFetcher.loadData(OkHttpStreamFetcher.java:43)
06-12 14:29:36.718 17923 18274 W OkHttp : at com.bumptech.glide.integration.okhttp3.OkHttpStreamFetcher.loadData(OkHttpStreamFetcher.java:19)
06-12 14:29:36.718 17923 18274 W OkHttp : at com.bumptech.glide.load.model.ImageVideoModelLoader$ImageVideoFetcher.loadData(ImageVideoModelLoader.java:70)
06-12 14:29:36.718 17923 18274 W OkHttp : at com.bumptech.glide.load.model.ImageVideoModelLoader$ImageVideoFetcher.loadData(ImageVideoModelLoader.java:53)
06-12 14:29:36.718 17923 18274 W OkHttp : at com.bumptech.glide.load.engine.DecodeJob.decodeSource(DecodeJob.java:170)
06-12 14:29:36.718 17923 18274 W OkHttp : at com.bumptech.glide.load.engine.DecodeJob.decodeFromSource(DecodeJob.java:128)
06-12 14:29:36.718 17923 18274 W OkHttp : at com.bumptech.glide.load.engine.EngineRunnable.decodeFromSource(EngineRunnable.java:122)
06-12 14:29:36.718 17923 18274 W OkHttp : at com.bumptech.glide.load.engine.EngineRunnable.decode(EngineRunnable.java:101)
06-12 14:29:36.718 17923 18274 W OkHttp : at com.bumptech.glide.load.engine.EngineRunnable.run(EngineRunnable.java:58)
06-12 14:29:36.718 17923 18274 W OkHttp : at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
06-12 14:29:36.718 17923 18274 W OkHttp : at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-12 14:29:36.718 17923 18274 W OkHttp : at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
06-12 14:29:36.718 17923 18274 W OkHttp : at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
06-12 14:29:36.718 17923 18274 W OkHttp : at java.lang.Thread.run(Thread.java:761)
06-12 14:29:36.718 17923 18274 W OkHttp : at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(FifoPriorityThreadPoolExecutor.java:118)
HttpLoggingInterceptor Log
<-- HTTP FAILED: java.lang.IllegalStateException: Unable to load publicsuffixes.gz resource from the classpath.
Can fix.
@swankjesse any thoughts on action to take in this scenario? Re-throw the exception? I can grab this one if you like.
@dave-r12 we鈥檙e in a tough spot. We can鈥檛 throw a checked exception and it is user-hostile to throw an unchecked exception. Without loading the file we don鈥檛 know what the domain is, and so we can鈥檛 parse the cookie correctly.
So I think our best option is to steal the technique used in Guava鈥檚 Uninterruptibles. Just retry the load and re-interrupt the calling thread once that completes.
Ahh, I see. Got it, thanks.
Most helpful comment
Can fix.