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)