question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
CodeBreak524commented, Aug 25, 2020

Thanks, guys. Now it seems to be working without requests failing.

Special thanks to @koral-- for providing cases and scenarios to reproduce the problem

0reactions
koral--commented, Aug 14, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found