Trash bin database inconsistent!

Nextcloud version : 19.0.0.12
Operating system and version: Ubuntu Server 18.04
Apache or nginx version : 2.4.38
PHP version : 7.4.6

The issue you are facing:

My trashbin says I have files in it but when I look in the data folder, it’s empty.
It looks like my trash database is corrupted.
Capture d’écran de 2020-06-27 10-26-09
Screenshot_2020-06-27 Fichiers supprimés - Aurny2cloud

Is this the first time you’ve seen this error? : Y

Steps to replicate it:

  1. Go to the trashbin
  2. Select all files
  3. Try to restore them but they don’t exist

The output of your Nextcloud log in Admin > Logging:

{"reqId":"jfavQopAlNiWmkwdTDjG","level":3,"time":"2020-06-27T08:01:16+00:00","remoteAddr":"172.20.0.3","user":"Aurnytoraink","app":"files_trashbin","method":"MOVE","url":"/remote.php/dav/trashbin/Aurnytoraink/trash/Cahier%20des%20charges%20Mobile%20RO.pdf.d1576188465","message":"trash bin database inconsistent! ($user: Aurnytoraink $filename: Cahier des charges Mobile RO.pdf, $timestamp: 1576188465)","userAgent":"Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0","version":"19.0.0.12","id":"5ef6fccd843b6"}

Same issue after upgrading to Nextcloud 21.0.1 from Nextcloud 20 i opned a issue on github

I also found the same issue back in 2016 with owncloud