Skip to content

Smart cache crashing with FileNotFoundException #82

@PiotrPrus

Description

@PiotrPrus

mux version: 1.5.0 (tried also 1.4.0, and 1.3.0)

Smart cache when enabled it is causing a crash. FileNotFoundException that occurs when Mux's smart cache tries to access missing or corrupted HLS video chunk files
Logs:

                                                                                                      androidx.media3.exoplayer.ExoPlaybackException: Source error
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:864)
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:840)
                                                                                                          at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                          at android.os.Looper.loopOnce(Looper.java:248)
                                                                                                          at android.os.Looper.loop(Looper.java:338)
                                                                                                          at android.os.HandlerThread.run(HandlerThread.java:85)
                                                                                                      Caused by: java.io.FileNotFoundException: /data/user/0/retrolabs.retroapp.android.debug/cache/mux/player/cache/L3YxL2NodW5rL1Z2aXNEUGVWaUNwVjAwNFB3WVJsaDJmQXFYbnBidFNmT2hKMWV6MTRCVUFVN0xXemxzMDBJTVNkbWxPQnI4MnRROUVVeTNFZG1lMDJrVktMWjAxR3FFdURqdEZub2JmN2N3OHQvMC50cw: open failed: ENOENT (No such file or directory)
                                                                                                          at libcore.io.IoBridge.open(IoBridge.java:574)
                                                                                                          at java.io.FileInputStream.<init>(FileInputStream.java:179)
                                                                                                          at com.mux.player.internal.cache.MuxPlayerCache$ReadHandle.<init>(MuxPlayerCache.kt:190)
                                                                                                          at com.mux.player.internal.cache.MuxPlayerCache$ReadHandle.<init>(Unknown Source:0)
                                                                                                          at com.mux.player.internal.cache.MuxPlayerCache$ReadHandle$Companion.create$library_release(MuxPlayerCache.kt:181)
                                                                                                          at com.mux.player.internal.cache.MuxPlayerCache.tryRead(MuxPlayerCache.kt:61)
                                                                                                          at com.mux.player.media.MuxDataSource.open(MuxDataSource.kt:79)
                                                                                                          at androidx.media3.datasource.DefaultDataSource.open(DefaultDataSource.java:275)
                                                                                                          at androidx.media3.datasource.StatsDataSource.open(StatsDataSource.java:88)
                                                                                                          at androidx.media3.exoplayer.hls.HlsMediaChunk.prepareExtraction(HlsMediaChunk.java:522)
                                                                                                          at androidx.media3.exoplayer.hls.HlsMediaChunk.feedDataToExtractor(HlsMediaChunk.java:495)
                                                                                                          at androidx.media3.exoplayer.hls.HlsMediaChunk.loadMedia(HlsMediaChunk.java:464)
                                                                                                          at androidx.media3.exoplayer.hls.HlsMediaChunk.load(HlsMediaChunk.java:421)
                                                                                                          at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:453)
                                                                                                          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
                                                                                                          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:651)
                                                                                                          at java.lang.Thread.run(Thread.java:1119)
                                                                                                      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:568)
                                                                                                          at libcore.io.BlockGuardOs.open(BlockGuardOs.java:274)
                                                                                                          at libcore.io.ForwardingOs.open(ForwardingOs.java:568)
                                                                                                          at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:8953)
                                                                                                          at libcore.io.IoBridge.open(IoBridge.java:560)

When used with enableSmartCache(false) there is no error.
I tried cleaning the files when crash occurs, cleaning the media items, retrying the player, but none of these helps. I will need to use muxPlayer without cache for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions