Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After deleting image, the preview files remain forever, also in filecache table. #26014

Closed
arpadmuller opened this issue Mar 8, 2021 · 3 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: previews and thumbnails needs info

Comments

@arpadmuller
Copy link

arpadmuller commented Mar 8, 2021

As I can see this issue is still an issue. #11574

Steps to reproduce

  1. Upload images
  2. Let previews be generated (e.g. using the preview generator app and a cron job)
  3. Delete those images
  4. Purge trashbin
    (5. Wait for trashbin_retention_obligation is exceeded)

Expected behaviour

  1. The expected behaviour is to delete the preview files for these deleted images.
  2. And I expecting (maybe I am wrong) to delete these images from filecache table as well.

Actual behaviour

  1. The cached previews are NOT deleted.
  2. The table filecache if full of old, deleted files and previewfiles records. (1M+ for me)

Server configuration

Operating system:
Ubuntu 20.04
Web server:
Nginx

Database:
MairaDB-server 10.3.25

PHP version:
PHP-FPM 7.3.26

Nextcloud version: (see Nextcloud admin page)
Nextcloud 21.0.0

Updated from an older Nextcloud/ownCloud or fresh install:
Updated, and tested on fresh install as well. Same.

Where did you install Nextcloud from:
nextcloud.com

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
  - accessibility: 1.7.0
  - activity: 2.14.3
  - cloud_federation_api: 1.4.0
  - comments: 1.11.0
  - contactsinteraction: 1.2.0
  - dashboard: 7.1.0
  - dav: 1.17.1
  - federatedfilesharing: 1.11.0
  - federation: 1.11.0
  - files: 1.16.0
  - files_pdfviewer: 2.1.0
  - files_rightclick: 1.0.0
  - files_sharing: 1.13.1
  - files_trashbin: 1.11.0
  - files_versions: 1.14.0
  - files_videoplayer: 1.10.0
  - firstrunwizard: 2.10.0
  - logreader: 2.6.0
  - lookup_server_connector: 1.9.0
  - nextcloud_announcements: 1.10.0
  - notifications: 2.9.0
  - oauth2: 1.9.0
  - password_policy: 1.11.0
  - photos: 1.3.0
  - privacy: 1.5.0
  - provisioning_api: 1.11.0
  - recommendations: 1.0.0
  - serverinfo: 1.11.0
  - settings: 1.3.0
  - sharebymail: 1.11.0
  - support: 1.4.0
  - survey_client: 1.9.0
  - systemtags: 1.11.0
  - text: 3.2.0
  - theming: 1.12.0
  - twofactor_backupcodes: 1.10.0
  - updatenotification: 1.11.0
  - user_status: 1.1.1
  - viewer: 1.5.0
  - weather_status: 1.1.0
  - workflowengine: 2.3.0

Nextcloud configuration:

Config report
{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost:8080"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "21.0.0.18",
        "overwrite.cli.url": "http:\/\/localhost:8080",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "trashbin_retention_obligation": "auto, 0"
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
no

Are you using encryption: yes/no
no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser:
google-chrome-stable-88.0.4324.150

Operating system:
Fedora 33

Logs

Nextcloud log (data/nextcloud.log)

Nextcloud log
{"reqId":"7QHeq6q0vZivdRWpCLpQ","level":2,"time":"2021-03-08T17:30:49+00:00","remoteAddr":"172.19.0.1","user":"--","app":"no app in context","method":"GET","url":"/","message":"Host localhost was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","version":""}
{"reqId":"7QHeq6q0vZivdRWpCLpQ","level":2,"time":"2021-03-08T17:30:49+00:00","remoteAddr":"172.19.0.1","user":"--","app":"no app in context","method":"GET","url":"/","message":"Host localhost was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","version":""}
{"reqId":"tRiiBXIEsgbfLTiC04xy","level":2,"time":"2021-03-08T17:30:55+00:00","remoteAddr":"172.19.0.1","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Host localhost was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","version":""}
{"reqId":"tRiiBXIEsgbfLTiC04xy","level":2,"time":"2021-03-08T17:30:55+00:00","remoteAddr":"172.19.0.1","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Host localhost was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","version":""}
{"reqId":"tRiiBXIEsgbfLTiC04xy","level":3,"time":"2021-03-08T17:31:08+00:00","remoteAddr":"172.19.0.1","user":"admin","app":"no app in context","method":"POST","url":"/index.php","message":{"Exception":"OCP\\AppFramework\\QueryException","Message":"Could not resolve trashManager! Class trashManager does not exist","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":126,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["trashManager"]},{"file":"/var/www/html/lib/private/ServerContainer.php","line":162,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["trashManager",true]},{"file":"/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":434,"function":"query","class":"OC\\ServerContainer","type":"->","args":["trashManager",true]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":56,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["trashManager"]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/FunctionInjector.php","line":58,"function":"get","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["trashManager"]},{"function":"OC\\AppFramework\\Bootstrap\\{closure}","class":"OC\\AppFramework\\Bootstrap\\FunctionInjector","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/FunctionInjector.php","line":68,"function":"array_map","args":[{"__class__":"Closure"},[{"name":"serverContainer","__class__":"ReflectionParameter"},{"name":"logger","__class__":"ReflectionParameter"},{"name":"appManager","__class__":"ReflectionParameter"},"*** sensitive parameter replaced ***"]]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/BootContext.php","line":52,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\FunctionInjector","type":"->","args":[[{"__class__":"OCA\\Files_Trashbin\\AppInfo\\Application"},"registerTrashBackends"]]},{"file":"/var/www/html/apps/files_trashbin/lib/AppInfo/Application.php","line":57,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\BootContext","type":"->","args":[[{"__class__":"OCA\\Files_Trashbin\\AppInfo\\Application"},"registerTrashBackends"]]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":176,"function":"boot","class":"OCA\\Files_Trashbin\\AppInfo\\Application","type":"->","args":[{"__class__":"OC\\AppFramework\\Bootstrap\\BootContext"}]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":197,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":["files_trashbin"]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":137,"function":"loadApp","class":"OC_App","type":"::","args":["files_trashbin"]},{"file":"/var/www/html/apps/dav/lib/AppInfo/Application.php","line":124,"function":"loadApps","class":"OC_App","type":"::","args":[["dav"]]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":176,"function":"boot","class":"OCA\\DAV\\AppInfo\\Application","type":"->","args":[{"__class__":"OC\\AppFramework\\Bootstrap\\BootContext"}]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":197,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":["dav"]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":137,"function":"loadApp","class":"OC_App","type":"::","args":["dav"]},{"file":"/var/www/html/lib/private/legacy/OC_Util.php","line":203,"function":"loadApps","class":"OC_App","type":"::","args":[["filesystem"]]},{"file":"/var/www/html/lib/private/User/Session.php","line":554,"function":"setupFS","class":"OC_Util","type":"::","args":["*** sensitive parameter replaced ***"]},{"file":"/var/www/html/lib/private/User/Session.php","line":415,"function":"prepareUserLogin","class":"OC\\User\\Session","type":"->","args":[true,"*** sensitive parameter replaced ***"]},{"file":"/var/www/html/lib/private/User/Session.php","line":624,"function":"completeLogin","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/User/Session.php","line":367,"function":"loginWithPassword","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Setup.php","line":440,"function":"login","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/core/Controller/SetupController.php","line":75,"function":"install","class":"OC\\Setup","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/base.php","line":932,"function":"run","class":"OC\\Core\\Controller\\SetupController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","Line":115,"CustomMessage":"Could not boot files_trashbinCould not resolve trashManager! Class trashManager does not exist"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","version":"21.0.0.18"}
{"reqId":"tRiiBXIEsgbfLTiC04xy","level":3,"time":"2021-03-08T17:31:08+00:00","remoteAddr":"172.19.0.1","user":"admin","app":"no app in context","method":"POST","url":"/index.php","message":{"Exception":"OCP\\AppFramework\\QueryException","Message":"Could not resolve OCA\\Files_Versions\\Versions\\IVersionManager! Class can not be instantiated","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":126,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Files_Versions\\Versions\\IVersionManager"]},{"file":"/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":459,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Files_Versions\\Versions\\IVersionManager"]},{"file":"/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":431,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Files_Versions\\Versions\\IVersionManager"]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":56,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Files_Versions\\Versions\\IVersionManager"]},{"file":"/var/www/html/apps/files_versions/lib/AppInfo/Application.php","line":119,"function":"get","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Files_Versions\\Versions\\IVersionManager"]},{"file":"/var/www/html/apps/files_versions/lib/AppInfo/Application.php","line":106,"function":"loadBackend","class":"OCA\\Files_Versions\\AppInfo\\Application","type":"->","args":[{"@attributes":{"for":"OCP\\Files\\Storage\\IStorage"},"@value":"OCA\\Files_Versions\\Versions\\LegacyVersionsBackend"},{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"__class__":"OC\\AppFramework\\Logger"}]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/FunctionInjector.php","line":68,"function":"registerVersionBackends","class":"OCA\\Files_Versions\\AppInfo\\Application","type":"->","args":[{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"__class__":"OC\\App\\AppManager"},{"__class__":"OC\\AppFramework\\Logger"}]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/BootContext.php","line":52,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\FunctionInjector","type":"->","args":[{"__class__":"Closure"}]},{"file":"/var/www/html/apps/files_versions/lib/AppInfo/Application.php","line":91,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\BootContext","type":"->","args":[{"__class__":"Closure"}]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":176,"function":"boot","class":"OCA\\Files_Versions\\AppInfo\\Application","type":"->","args":[{"__class__":"OC\\AppFramework\\Bootstrap\\BootContext"}]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":197,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":["files_versions"]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":137,"function":"loadApp","class":"OC_App","type":"::","args":["files_versions"]},{"file":"/var/www/html/apps/dav/lib/AppInfo/Application.php","line":124,"function":"loadApps","class":"OC_App","type":"::","args":[["dav"]]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":176,"function":"boot","class":"OCA\\DAV\\AppInfo\\Application","type":"->","args":[{"__class__":"OC\\AppFramework\\Bootstrap\\BootContext"}]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":197,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":["dav"]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":137,"function":"loadApp","class":"OC_App","type":"::","args":["dav"]},{"file":"/var/www/html/lib/private/legacy/OC_Util.php","line":203,"function":"loadApps","class":"OC_App","type":"::","args":[["filesystem"]]},{"file":"/var/www/html/lib/private/User/Session.php","line":554,"function":"setupFS","class":"OC_Util","type":"::","args":["*** sensitive parameter replaced ***"]},{"file":"/var/www/html/lib/private/User/Session.php","line":415,"function":"prepareUserLogin","class":"OC\\User\\Session","type":"->","args":[true,"*** sensitive parameter replaced ***"]},{"file":"/var/www/html/lib/private/User/Session.php","line":624,"function":"completeLogin","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/User/Session.php","line":367,"function":"loginWithPassword","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Setup.php","line":440,"function":"login","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/core/Controller/SetupController.php","line":75,"function":"install","class":"OC\\Setup","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/base.php","line":932,"function":"run","class":"OC\\Core\\Controller\\SetupController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","Line":111,"CustomMessage":"Could not boot files_versionsCould not resolve OCA\\Files_Versions\\Versions\\IVersionManager! Class can not be instantiated"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","version":"21.0.0.18"}
{"reqId":"Up9rwGt9RGP6jcNroYqD","level":2,"time":"2021-03-08T18:03:28+00:00","remoteAddr":"172.19.0.1","user":"admin","app":"no app in context","method":"GET","url":"/apps/files/","message":"Invalid data provided to provideInitialState by files","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","version":"21.0.0.18"}
{"reqId":"zVaL8SWBEnDKsos9s6iB","level":2,"time":"2021-03-08T18:03:31+00:00","remoteAddr":"172.19.0.1","user":"admin","app":"no app in context","method":"GET","url":"/apps/files/?dir=/","message":"Invalid data provided to provideInitialState by files","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","version":"21.0.0.18"}
{"reqId":"hAIB1kT68juurWfkH3Ht","level":2,"time":"2021-03-08T18:06:57+00:00","remoteAddr":"172.19.0.1","user":"admin","app":"no app in context","method":"GET","url":"/apps/files/?dir=/&view=trashbin","message":"Invalid data provided to provideInitialState by files","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","version":"21.0.0.18"}
{"reqId":"G96o55P85k5Lo06AvJip","level":2,"time":"2021-03-08T18:18:02+00:00","remoteAddr":"172.19.0.1","user":"admin","app":"no app in context","method":"GET","url":"/apps/files/","message":"Invalid data provided to provideInitialState by files","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36","version":"21.0.0.18"}

@arpadmuller arpadmuller added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Mar 8, 2021
@szaimen
Copy link
Contributor

szaimen commented Jun 18, 2021

Related #20344

@szaimen szaimen added 1. to develop Accepted and waiting to be taken care of feature: previews and thumbnails and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jun 18, 2021
@nettybun
Copy link

I've noticed that the Nextcloud Photos app will show these deleted photos, which is sometimes concerning if they're not supposed to exist. It seems overkill to wipe all previews but I don't know a better way than that.

@szaimen
Copy link
Contributor

szaimen commented Jan 23, 2023

Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

@szaimen szaimen added needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 1. to develop Accepted and waiting to be taken care of labels Jan 23, 2023
@szaimen szaimen closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: previews and thumbnails needs info
Projects
None yet
Development

No branches or pull requests

3 participants