Memories app can't index shared files

hi,
my nextcloud log is full of errors of the sort:
[memories] Error: Failed to index folder //files/: File by id 1901879 not found

Nextcloud version (eg, 29.0.5): 30.0.2.2
Operating system and version (eg, Ubuntu 24.04): Debian 11 (bullseye)
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.62
PHP version (eg, 8.3): 8.2.26

So basically it can’t index any folder, that gets shared to other users.

The original shared folders actually are on a NAS connected via samba and the external storage app.

I tried cleaning up a bit by:

  • occ memories:index
  • occ maintenance:repair --include-expensive
  • occ files:scan
  • occ files:repair-tree

Whats going on here?

best regards,
R’N’L

hi @RockNLol welcome to the communitiy :handshake:

as you already tried most of the low hanging fruits looks you have to follow the long way through the rabbit hole.

  1. connect to the DB and find which file and path the id belongs to (tables oc_filecache and oc_storages)
  2. review if this file exists (I assume stale records exists e.g. after changing external storages etc)
  3. check if you can access the file through Nextcloud web UI
  4. depending on the result continue troubleshooting the oc_filecache table or memories app

PS: found this

1 Like

hi! thanks for the reply!

I tried occ files:cleanup which resulted in:
0 orphaned file cache entries deleted
0 orphaned file cache extended entries deleted
3 orphaned mount entries deleted

we’ll see if that helps but I don’t think that was it.

After investigating the fileid in the database, as you suggested, the files mentioned in the log are not actually files, they are folder names of old shared folders that do not exist any more.
Can I just delete those entries from the DB?

mangling with DB is dangerous but might be the only method. We had many discussions here related too stale record in the oc_filecache table - use search and decide if you are ready to take the risk.

as always only execute action if you know what you are doing and “no backup - no merci

I backed the whole db up and started removing all stale entries that pop up in the logs. Thanks for your help wwe!

Alright, since deleting all the stale files in oc_filecache there haven’t been any errors. So I guess its solved :slight_smile:
thanks again wwe!

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.