Offline cache - high number of failed tracks on large re-sync

App version

Production

Issue description

I’m seeing a consistent issue where a significant number (5-10%) of cached tracks won’t play offline, despite appearing correctly cached in “Manage Offline Files.”
For context, I use symfonium as an offline-first media player on my phone. Essentially I’m using it as an easy way to keep my music library in sync with my computer (using Navidrome) - so my ‘server’ (PC) isn’t online except when I’m at home in the evening. So my whole navidrome library is set to cache offline automatically.

When I do a full cache clear and resync, roughly 5-10% of tracks end up broken.
There are no errors reported during the sync.
The broken tracks show as cached and appear normal in Manage Offline Files.
If I manually remove a broken track from cache and re-download it individually, it works fine every time.

Setup details:
Navidrome via Docker on Windows
Caching to internal phone storage (40% free)
Simultaneous downloads set to 1 (previously tried set to 2)
Force HTTP/1.1 enabled (previously tried turned off).
Library is ~7300 tracks
“Transcode to Mp3” is turned on.
“Automatic media offline cache” is on for all libraries.

I’ve ruled out storage space, parallel download conflicts, HTTP/2 issues, and source file corruption. The files themselves play fine in Navidrome’s web UI. The only thing that fixes a broken cached track is removing and individually re-downloading it. This is pretty painful, as I’m listening to music on my phone while out and about. The failed offline tracks will cause an album to stop playing entirely sometimes, or a long period of silence before Symfonium skips the failed track. I then have to remember to re-cache when I get home.

Is there something in the batch sync process that could cause this?

Device type

Phone

Media provider

Navidrome

Steps to reproduce

I’m not exactly sure what is causing the issue, so it may be hard to reproduce.

However, the best I could guess is - “try sync a large library, with offline cache set to the whole library, from Navidrome”

I searched existing issues first

on

I understand that logs are mandatory

on

Log upload name / description

cheddar0391

I need logs during the download phase producing one of those files.

There’s an issue during download that is not detected. Since there’s no content length in that case, if the connection is properly closed without error by Navidrome or the proxy, the file is accepted for the cache.

Thanks for the speedy reply Torliq.

I have uploaded a new log file with the name cheddar0391-1.

I couldn’t remember which track I tried to play for the original log file, so this log files is a bit longer. It shows:

  • Attempting to play a song offline that is showing as cached
  • Removing the album
  • Putting phone online
  • Syncing and letting the auto-download redownload the album
  • Turning my phone offline
  • Playing the problematic song again (this time it plays fine)

I’m not sure I’d be able to reliably recreate a log with a failed download, as I think the issue only occurs when doing bit batch downloads. But if you need the logs for that, I could remove a few thousand songs and let it resync + redownload in debug mode.

As said I need a log containing the download case generating incomplete files being cached. That’s the cause I need to find to fix.

Thanks again. I’ve uploaded a new log file *cheddar0391-2
*
The log will be huge, so some notes on what I did:

I removed all cached music while disconnected from internet > started debug mode > reconnected to internet and let it cache overnight.

I then played through some songs to find a broken file. The first one I found was:
“The Lemon of Pink” by The Books on the album “The Lemon of Pink.”
A quick note, there are two songs on this album called “The Lemon of Pink.” The failed track is 4:40 long. The other song with the same name is 1:34 (it downloaded fine).

Just bumping this up! Issue is still happening pretty regularly.

As you may have noticed I was in holidays :wink:

Try again with version 15.0.1 but there’s a server / proxy issue somewhere that cut downloads that can’t be easily detected. For that version uncheck the force HTTP/1.1 first.

Ah I didn’t see that, hope you had a nice holiday!

I’ll test again when the update appears in the playstore. Looks like a signficant and thoughtful update as always!

I added myself to the beta stream to access v15.0.0, not knowing how long it’ll take for playstore to approve the new update.

Unfortunately even with HTTP/1.1 turned off, the same issue occurs.

Is it helpful if I create a new log and attempt to re-cache some stuff?

Test with the proper version please.