Skip to main content

When calling track() of the amplitude SDK, the app crashes with a FileNotFoundException error.
It's a very occasional error, but I don't know the cause.

 

The stacktrace is as follows.

 

E/AndroidRuntime: FATAL EXCEPTION: pool-18-thread-1
    Process: com.co.swing, PID: 1199
    java.io.FileNotFoundException: /data/user/0/com.co.swing/app_amplitude-disk-queue/ed4a269b64000448d47c3288b1fb9d37-2: open failed: ENOENT (No such file or directory)
        at libcore.io.IoBridge.open(IoBridge.java:492)
        at java.io.FileInputStream.<init>(FileInputStream.java:160)
        at com.amplitude.android.utilities.AndroidStorage.getEventsString(AndroidStorage.kt:65)
        at com.amplitude.core.platform.EventPipeline$upload$1.invokeSuspend(EventPipeline.kt:106)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:923)
     Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
        at libcore.io.Linux.open(Native Method)
        at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
        at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
        at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
        at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:8494)
        at libcore.io.IoBridge.open(IoBridge.java:478)
        at java.io.FileInputStream.<init>(FileInputStream.java:160) 
        at com.amplitude.android.utilities.AndroidStorage.getEventsString(AndroidStorage.kt:65) 
        at com.amplitude.core.platform.EventPipeline$upload$1.invokeSuspend(EventPipeline.kt:106) 
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:923) 

Hello @ngJeon hope you are doing well :) 

This is an issue we have been seeing intermittently on our end as well. Thank you for bringing it to our attention in the community.

The engineering team is aware of this issue and has released a fix for it. I recommend upgrading to the newest version of the SDK that was recently released, v1.1.0, here.


Hi! I am seeing a very similar error using v1.7.0, also intermittently, could it be related?

 

libcore.io.Linux.open
Linux.java, line -2
android.system.ErrnoException: open failed: ENOENT (No such file or directory)

libcore.io.Linux.open Linux.java
libcore.io.ForwardingOs.open ForwardingOs.java:166
libcore.io.BlockGuardOs.open BlockGuardOs.java:254
libcore.io.ForwardingOs.open ForwardingOs.java:166
android.app.ActivityThread$AndroidOs.open ActivityThread.java:7701
libcore.io.IoBridge.open IoBridge.java:478
java.io.FileInputStream.<init> FileInputStream.java:160
com.amplitude.core.utilities.EventsFileManager.getEventString EventsFileManager.kt:134
com.amplitude.android.utilities.AndroidStorage.getEventsString AndroidStorage.kt:67
com.amplitude.core.platform.intercept.IdentifyInterceptFileStorageHandler.getTransferIdentifyEvent IdentifyInterceptFileStorageHandler.kt:36
com.amplitude.core.platform.intercept.IdentifyInterceptor.getTransferIdentifyEvent IdentifyInterceptor.kt:100
com.amplitude.core.platform.intercept.IdentifyInterceptor.transferInterceptedIdentify IdentifyInterceptor.kt:93
com.amplitude.core.platform.plugins.AmplitudeDestination$flush$1.invokeSuspend AmplitudeDestination.kt:39
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith ContinuationImpl.kt:33
kotlinx.coroutines.DispatchedTask.run DispatchedTask.kt:106
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java:1167
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java:641
java.lang.Thread.run Thread.java:923


Reply