A resource was acquired at attached stack trace but never released
See original GitHub issueA resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:180)
at java.io.FileOutputStream.<init>(FileOutputStream.java:89)
at okio.Okio.appendingSink(Okio.java:185)
at okhttp3.internal.io.FileSystem$1.appendingSink(FileSystem.java:59)
at okhttp3.internal.cache.DiskLruCache.newJournalWriter(DiskLruCache.java:310)
at okhttp3.internal.cache.DiskLruCache.readJournal(DiskLruCache.java:302)
at okhttp3.internal.cache.DiskLruCache.initialize(DiskLruCache.java:229)
at okhttp3.internal.cache.DiskLruCache.get(DiskLruCache.java:431)
at okhttp3.Cache.get(Cache.java:194)
at okhttp3.Cache$1.get(Cache.java:144)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:70)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:124)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at com.xiangkan.android.base.http.CommonInterceptor.intercept(CommonInterceptor.java:53)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at com.xiangkan.android.base.http.CacheInterceptor.intercept(CacheInterceptor.java:24)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:212)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:170)
at okhttp3.RealCall.access$100(RealCall.java:33)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:120)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
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)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
A resource was acquired at attached stack trace but never ...
That means you have opened something but never close them. Closable have a method close which you must call to release the resources...
Read more >Android – A resource was acquired at attached stack trace but ...
"A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.".
Read more >Strict Mode “A resource was acquired at attached stack trace ...
Bug: Strict Mode “A resource was acquired at attached stack trace but never released” exception with Google Map. 36. Hotlists
Read more >Android : A resource was acquired at attached stack trace but ...
Android : A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource ...
Read more >What did you expect to see? - GitLab
gradlew check shows alot of "A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can fix.
@ytrjp I had the same error I solved this by creating the OkHttpClient as singleton I think that when you create multiple instance of OkHttpclient, all of them want access the cache file at the same time, and that is where the error came from
I am not 100% sure, but this approach helped me