Okhttp: Cache crashed, failed to delete file

Created on 6 Feb 2016  Â·  10Comments  Â·  Source: square/okhttp

I'm starting to see a lot of this exception in my app released with OkHttp 3.01 via Picasso 2.5.2 (using Jake's adapter from 3.01 to 2.5.2)

Fatal Exception: java.lang.RuntimeException: java.io.IOException: failed to delete /storage/emulated/0/Android/data/com.trixiesoft.clapp/cache/images/51d313bf28724ba47541b0ca45ac084f.0
at okhttp3.internal.DiskLruCache$1.run(DiskLruCache.java:178)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)

Caused by java.io.IOException: failed to delete /storage/emulated/0/Android/data/com.trixiesoft.clapp/cache/images/51d313bf28724ba47541b0ca45ac084f.0
at okhttp3.internal.io.FileSystem$1.delete(FileSystem.java:70)
at okhttp3.internal.DiskLruCache.removeEntry(DiskLruCache.java:599)
at okhttp3.internal.DiskLruCache.trimToSize(DiskLruCache.java:656)
at okhttp3.internal.DiskLruCache.access$200(DiskLruCache.java:85)
at okhttp3.internal.DiskLruCache$1.run(DiskLruCache.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)

bug

Most helpful comment

Closed with #2366.

All 10 comments

@KennyGoers do you happen to have any other information? Can you reproduce with a simple example or test case?

It's the best I can do for this one, it comes up in my crashlytics crashes.
I'll see if I can find some device correlation, but if I remember it was
scattered across 4 and 5 and different manufacturers.

On Mon, Feb 15, 2016, 7:22 AM Dave Roberge [email protected] wrote:

@KennyGoers https://github.com/KennyGoers do you happen to have any
other information? Can you reproduce with a simple example or test case?

—
Reply to this email directly or view it on GitHub
https://github.com/square/okhttp/issues/2318#issuecomment-184205494.

@KennyGoers the disk cache implementation should now recover from this scenario, see #2366. Hopefully you won't see this exception again :)

Awesome, time line on release!

Thanks!

On Thu, Feb 25, 2016, 3:24 PM Dave Roberge [email protected] wrote:

@KennyGoers https://github.com/KennyGoers the disk cache implementation
should now recover from this scenario, see #2366
https://github.com/square/okhttp/pull/2366. Hopefully you won't see
this exception again :)

—
Reply to this email directly or view it on GitHub
https://github.com/square/okhttp/issues/2318#issuecomment-188994682.

We do not provide release ETAs because OkHttp is not a product.

On Thu, Feb 25, 2016, 7:09 PM Kenny Goers [email protected] wrote:

Awesome, time line on release!

Thanks!

On Thu, Feb 25, 2016, 3:24 PM Dave Roberge [email protected]
wrote:

@KennyGoers https://github.com/KennyGoers the disk cache
implementation
should now recover from this scenario, see #2366
https://github.com/square/okhttp/pull/2366. Hopefully you won't see
this exception again :)

—
Reply to this email directly or view it on GitHub
https://github.com/square/okhttp/issues/2318#issuecomment-188994682.

—
Reply to this email directly or view it on GitHub
https://github.com/square/okhttp/issues/2318#issuecomment-189046594.

NP, just wondering if anything might be pushing one like the 3.1.2
situation. I can build my own.

Thanks for taking the time.
Your work is much appreciated.

On Thu, Feb 25, 2016, 6:15 PM Jake Wharton [email protected] wrote:

We do not provide release ETAs because OkHttp is not a product.

On Thu, Feb 25, 2016, 7:09 PM Kenny Goers [email protected]
wrote:

Awesome, time line on release!

Thanks!

On Thu, Feb 25, 2016, 3:24 PM Dave Roberge [email protected]
wrote:

@KennyGoers https://github.com/KennyGoers the disk cache
implementation
should now recover from this scenario, see #2366
https://github.com/square/okhttp/pull/2366. Hopefully you won't see
this exception again :)

—
Reply to this email directly or view it on GitHub
https://github.com/square/okhttp/issues/2318#issuecomment-188994682.

—
Reply to this email directly or view it on GitHub
https://github.com/square/okhttp/issues/2318#issuecomment-189046594.

—
Reply to this email directly or view it on GitHub
https://github.com/square/okhttp/issues/2318#issuecomment-189047941.

No ETAs. But Actual time of arrival of 3.2.0 is right now.

Closed with #2366.

@swankjesse so is this in 3.2 or 3.3? You say 3.2, Milestone says 3.3. So confoosed.

3.2.

Was this page helpful?
0 / 5 - 0 ratings