Skip to content

Crash with RuntimeException: StrictMode ThreadPolicy violation #413

@noloman

Description

@noloman

✍️ Describe the bug

I'm using Chucker in an app with Dagger 2 and Android's StrictMode with the option StrictMode.ThreadPolicy.Builder().detectDiskWrites(), and I get the following crash: java.lang.RuntimeException: StrictMode ThreadPolicy violation pointing to my this code in my NetworkModule:

@Provides
@Singleton
fun provideChuckerInterceptor(context: Context): ChuckerInterceptor = ChuckerInterceptor(context)

Nevertheless removing the detectDiskWrites() removes the crash, but I still want to have this option enabled for my app.

Thanks for the great library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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