IOException when app uses 3rd party SDK
See original GitHub issue✍️ Describe the bug
This issue arises from #394
After fixes for #394 the reporter provided update that another exception appeared:
java.io.IOException: No such file or directory at java.io.UnixFileSystem.createFileExclusively0(Native Method) at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:281) at java.io.File.createNewFile(File.java:1008) at com.chuckerteam.chucker.internal.support.AndroidCacheFileFactory.create(AndroidCacheFileFactory.kt:21) at com.chuckerteam.chucker.internal.support.AndroidCacheFileFactory.create(AndroidCacheFileFactory.kt:15) at com.chuckerteam.chucker.api.ChuckerInterceptor.multiCastResponseBody(ChuckerInterceptor.kt:184) at com.chuckerteam.chucker.api.ChuckerInterceptor.intercept(ChuckerInterceptor.kt:92)
It happens even after removing the application from device and reinstalling a new one.
🔧 Expected behavior
Chucker works normally and shows transactions.
📱 Tech info
- Chucker version: 3.3.0-SNAPSHOT (as of 11th of August 2020)
📄 Additional context
We should investigate the issue to either fix it or to get all the info we might need to deal with possible problems with other 3rd party SDKs.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
IOException SERVICE_NOT_AVAILABLE FirebaseMessaging
We use a particular setup. Apart from our default Firebase Project, we have a 3rd party restriction to connect to a secondary Firebase ......
Read more >Using third-party SDKs in your app - Play Console Help
To find out which SDK your app is using, we use the dependencies file included in your app. The dependencies file lists all...
Read more >Proper way to test 3rd party user authentication (haskell)
The only correct way to test third party APIs is an end-to-end test. Everything else is merely testing how you imagine the third...
Read more >Known issues with Android Studio and Android Gradle Plugin
To fix this issue, upgrade your Android 11 emulator to version 9 or higher by navigating to Tools > SDK Manager. In the...
Read more >Using 3rd Party Libs with Alfresco SDK 3.0
Meaning a library that is not available as part of the standard Alfresco installation. So you cannot just specify a provided dependency in...
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
Thanks, guys. Now it seems to be working without requests failing.
Special thanks to @koral-- for providing cases and scenarios to reproduce the problem
I’m not sure if that is not an overengineering.
IMHO the sufficient fix for this issue is to not save
context.getCacheDir()
result in a property but invoke it each time just before attempt to create the file. This should solve the vast majority of issues related to this ticket (getCacheDir()
tries to create a directory if it does not exist).Additionally we can add nullcheck and probably throw some
IOException
with appropriate message.If I understand correctly
IOException
here is now handled gracefully and does not cause request to be dropped.