Index for media files & documents not updating

REPRODUCIBILITY: sporadically
BUILD ID = OS VERSION: 3.4.0.24
HARDWARE: Xperia X
UI LANGUAGE: DE
REGRESSION: unknown

DESCRIPTION:

Tracker does not update the index for media files and documents anymore.
I.e. despite having taken photos, dowloaded files during the whole week, the latest files available im Gallery and Documents are from Tuesday. In between a reboot has happened, without changes.
The problem occurs independently from using the internal (unencrypted) storage and an encrypted SD card.
Reindexing from the Sailfish Helper Tools does fix the problem but only for so long.

PRECONDITIONS:

Any media files and/or documents stored on the phone. (Possibly an encrypted sdcard plays into the issue as well.)

STEPS TO REPRODUCE:

  1. Take a photo, download or copy any image/document file from an external source
  2. Open gallery
  3. Open documents
  4. Check if new media is displayed

EXPECTED RESULT:

New photos, image files and documents show up in the gallery and documents app respectively.

ACTUAL RESULT:

Only files already present up to a certain point in time are displayed.

You’re not alone :frowning: .

I experience the same problem on a XA2 for some time now (at least since 3.4.0.24). New media (e.g. music files and cover art copied to the SD card, photos shot using the camera) won’t show up in the respective apps any more after it has been added. Re-indexing via “Settings”/“Utilities”/“Clear Tracker database” only helps for so long.

However, I noticed that the “Media” app starts “re-calculating” the number of files/albums/artists etc. whenever I add a new album. Unfortunately, once it’s done, the new files aren’t accessible via the app (as they don’t show up in search, lists etc.).

I did some more research using the “tracker info” command and indeed when a new file is added,
some metadata ends up in the data base but less than what’s reported for a file that’s “seen” by the “Media” app (e.g. all “nmm:”-metadada is missing).

BTW: the number of files (MP3s, JPEGs, documents) on my device that may be eligible for indexing is close to 17.000.

If anyone could advise how: I’d like to collect some logs fron tracker and see if I can provide more info for reproducing the issue.

Thanks for any hints!

For me, the problem persists in 4.0.1. After having forced a complete rescan of my music library, a number of albums are still missing. For some other files, the meta data is partially unavailable (e.g. artist and duration of some MP3s are absent - even when they were present before the last scan (!)).

After digging into some documentation about tracker, I wonder if the state of the tracker-store is supposed to be “Unavailable”:

[nemo@Sailfish ~]$ tracker daemon
Store:
28 Feb 2021, 20:01:11:  ✗     Store                - Unavailable

Miners:
28 Feb 2021, 20:01:11:    1%  File System          - Crawl finished for directory 'file:///home/nemo/Downloads/mail_attachments/6/2436-2' 
28 Feb 2021, 20:01:11:  ✗     Extractor            - Not running or is a disabled plug

If I start tracker-store manually, it will quit after a few seconds:
[nemo@Sailfish ~]$ /usr/libexec/tracker-store &

Forcing a rescan of a directory that is missing from the data base doesn’t appear to be working at all:
[nemo@Sailfish ~]$ tracker reset -f /run/media/nemo/495C-4E0B/Music/Some Artist/Some Album/
(data base at /home/nemo/.cache/tracker/meta.db will not be updated)

Any hints?

If that path is a real one you will need to escape or quote the spaces.

I sure did. (But unfortunately decided just before submitting my post to use a path as an example that I just made up instead of a real one). So in fact, the path I submitted looked like:
[nemo@Sailfish ~]$ tracker reset -f /run/media/nemo/495C-4E0B/Music/Some\ Artist/Some\ Album/

But thanks for pointing this out.

Anyway, my main concern is why the data base of my music collection is incomplete when using the “official” way to force a reload (via Sailfish’s “Utilities” tool), not the question how I can work around this problem.