Skip to content

FileNotFoundException drops the request #394

@CodeBreak524

Description

@CodeBreak524

After performing one of the requests in my app I receive that kind of error which results in failed request:

java.io.FileNotFoundException: /data/user/0/app.name.dev/cache/chucker-21 (No such file or directory)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:308)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:238)
        at okio.Okio__JvmOkioKt.sink(JvmOkio.kt:170)
        at okio.Okio.sink(Unknown Source:1)
        at okio.Okio__JvmOkioKt.sink$default(JvmOkio.kt:170)
        at okio.Okio.sink$default(Unknown Source:1)
        at okio.Okio.sink(Unknown Source:3)
        at com.chuckerteam.chucker.internal.support.TeeSource.<init>(TeeSource.kt:27)
        at com.chuckerteam.chucker.api.ChuckerInterceptor.multiCastResponseBody(ChuckerInterceptor.kt:184)
        at com.chuckerteam.chucker.api.ChuckerInterceptor.intercept(ChuckerInterceptor.kt:93)

Repeating the same request doesn't solve this problem, but performing a different request does.

💣 Steps to reproduce

It happens after giving the control off app to another third-party library. I cannot tell you more concrete info because I really don't know what happens inside this library. Maybe it clears all caches of app which then results in Chucker error.

🔧 Expected behavior

Anyway it seems that dropping the request with internal error is not the best option. A warning should be enough even though the request wouldn't be logged.

Tech info - different devices, different OS versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions