amplitude / Amplitude-Kotlin

Amplitude Kotlin SDK
MIT License
27 stars 10 forks source link

FileNotFoundException at com.amplitude.core.utilities.EventsFileManager.writeToFile #187

Closed shawn-lin-013 closed 3 months ago

shawn-lin-013 commented 4 months ago

Encountering numerous crashes in version 1.6.0.

Fatal Exception: java.io.FileNotFoundException: /data/user/0/package_name/app_amplitude-disk-queue/<redacted>-71975.tmp (Permission denied)
       at java.io.FileOutputStream.open0(FileOutputStream.java)
       at java.io.FileOutputStream.open(FileOutputStream.java:287)
       at java.io.FileOutputStream.<init>(FileOutputStream.java:223)
       at com.amplitude.core.utilities.EventsFileManager.writeToFile(EventsFileManager.kt:168)
       at com.amplitude.core.utilities.EventsFileManager.finish(EventsFileManager.kt:145)
       at com.amplitude.core.utilities.EventsFileManager.rollover(EventsFileManager.kt:104)
       at com.amplitude.android.utilities.AndroidStorage.rollover(AndroidStorage.kt:54)
       at com.amplitude.core.platform.EventPipeline$upload$1$1$1.invokeSuspend(EventPipeline.kt:102)
       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:1162)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at java.lang.Thread.run(Thread.java:764)
izaaz commented 3 months ago

Thanks for reporting this @shawn-lin-013. Is this happening to a certain type of devices? Are you able to repro this issue locally?

qingzhuozhen commented 3 months ago

Hi @shawn-lin-013, we recently pushed some fixes around storage to resolve some crashes. Would you mind upgrading to the latest and see if that helps?

shawn-lin-013 commented 3 months ago

Hi @shawn-lin-013, we recently pushed some fixes around storage to resolve some crashes. Would you mind upgrading to the latest and see if that helps?

Hi @qingzhuozhen, we wonder which version is suggested to upgrade?

qingzhuozhen commented 3 months ago

Hi @shawn-lin-013 We recently released v1.16.7, maybe try to upgrade to that version and see if that helps. Feel free to let us know if the issue is still not solved and we can dive further,

izaaz commented 3 months ago

@shawn-lin-013 closing this issue but please feel free to reopen the issue if you still see problems with the latest version.