✍️ Describe the bug
The current code at: https://github.com/ChuckerTeam/chucker/blob/develop/library/src/main/java/com/chuckerteam/chucker/internal/support/AndroidCacheFileFactory.kt#L17 assumes that context.cacheDir returns non-null value. However, on Android older than 7.0 this method can return null: http://androidxref.com/6.0.0_r1/xref/frameworks/base/core/java/android/app/ContextImpl.java#425
💣 Steps to reproduce
- Cause cache dir to be not creatable eg. create regular file with the same name beforehand or fill entire disk space.
- Invoke
ChuckerInterceptor constructor.
🔧 Expected behavior
Not sure what is that cache used for. If it is mandatory, NPE could be wrapped by IOException.
📷 Screenshots
N/A
📱 Tech info
- OS: < 7.0
- Chucker version: at least one which is built from commit 392a63b or newer.
📄 Additional context
I haven't encountered this issue at runtime. Just realized that it may happen during #413 investigation.
✍️ Describe the bug
The current code at: https://github.com/ChuckerTeam/chucker/blob/develop/library/src/main/java/com/chuckerteam/chucker/internal/support/AndroidCacheFileFactory.kt#L17 assumes that
context.cacheDirreturns non-null value. However, on Android older than 7.0 this method can returnnull: http://androidxref.com/6.0.0_r1/xref/frameworks/base/core/java/android/app/ContextImpl.java#425💣 Steps to reproduce
ChuckerInterceptorconstructor.🔧 Expected behavior
Not sure what is that cache used for. If it is mandatory, NPE could be wrapped by IOException.
📷 Screenshots
N/A
📱 Tech info
📄 Additional context
I haven't encountered this issue at runtime. Just realized that it may happen during #413 investigation.