Skip to content

[Bug]: previews paths in oc_filecache still exist after occ preview:cleanup #55709

Description

@ornanovitch

⚠️ This issue respects the following points: ⚠️

Bug description

After successfully cleanup the appdata/preview with occ preview:cleanup command (because I wanted to setup Imaginary with webp and a new resolution), previews are not generating anymore (with or without Imaginary setup)

Steps to reproduce

  1. cleanup preview data with occ preview:cleanup
  2. go to a folder containing already existing pictures

result: thumbnails are not visible and GenericFileException errors are triggered for every images (see Nextcloud Logs below)

Expected behavior

thumbnails are generating

Nextcloud Server version

31

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.4

Web server

Other

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{

    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "31.0.9.1",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "default_language": "fr",
        "default_locale": "fr_FR",
        "default_phone_region": "FR",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "forwarded_for_headers": [
            "HTTP_X_FORWARDED",
            "HTTP_FORWARDED_FOR",
            "HTTP_X_FORWARDED_FOR"
        ],
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "user": "default",
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance_window_start": 1,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": true,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "enabledPreviewProviders": [
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\Krita",
            "OC\\Preview\\Imaginary",
            "OC\\Preview\\Movie"
        ],
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_format": "webp",
        "preview_max_x": 1980,
        "preview_max_y": 1980,
        "versions_retention_obligation": "auto, 30",
        "trashbin_retention_obligation": "auto, 30",
        "forbidden_filenames": [
            ".DS_Store"
        ],
        "theme": "",
        "loglevel": 2,
        "log_type": "file",
        "updater.release.channel": "stable",
        "activity_use_cached_mountpoints": true,
        "maintenance": false,
        "app_install_overwrite": []
    }
}

List of activated Apps

- activity: 4.0.0
  - announcementcenter: 7.2.2
  - bookmarks: 15.2.0
  - calendar: 5.5.6
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - collectives: 3.2.0
  - comments: 1.21.0
  - contacts: 7.3.3
  - dav: 1.33.0
  - deck: 1.15.3
  - event_update_notification: 2.7.0
  - federatedfilesharing: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_lock: 31.0.2
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - groupfolders: 19.1.7
  - intros: 1.1.2
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - music: 2.4.0
  - news: 27.0.0
  - nextcloud_announcements: 3.0.0
  - notes: 4.12.3
  - notifications: 4.0.0
  - notify_push: 1.2.0
  - oauth2: 1.19.1
  - passman: 2.4.12
  - photos: 4.0.0
  - polls: 8.5.0
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - related_resources: 2.0.0
  - richdocuments: 8.7.5
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - tables: 0.9.5
  - tasks: 0.16.1
  - text: 5.0.0
  - theming: 2.6.1
  - theming_customcss: 1.19.0
  - twofactor_backupcodes: 1.20.0
  - updatenotification: 1.21.0
  - user_oidc: 8.0.0
  - viewer: 4.0.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{
  "reqId": "UT1AycMwaSBeB2E0jIln",
  "level": 3,
  "time": "2025-10-12T13:13:38+00:00",
  "remoteAddr": "2a02:8428:4aa0:2901:22a7:8dd7:e630:4fb8",
  "user": "ornanovitch",
  "app": "index",
  "method": "GET",
  "url": "/core/preview?fileId=3802041&x=32&y=32&mimeFallback=true&v=aaa2f8&a=0",
  "message": "Exception thrown: OCP\\Files\\GenericFileException",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0",
  "version": "31.0.9.1",
  "exception": {
    "Exception": "OCP\\Files\\GenericFileException",
    "Message": "",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/private/Files/SimpleFS/SimpleFile.php",
        "line": 55,
        "function": "getContent",
        "class": "OC\\Files\\Node\\File",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/public/AppFramework/Http/FileDisplayResponse.php",
        "line": 51,
        "function": "getContent",
        "class": "OC\\Files\\SimpleFS\\SimpleFile",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 218,
        "function": "callback",
        "class": "OCP\\AppFramework\\Http\\FileDisplayResponse",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1063,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 24,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/nextcloud/lib/private/Files/Node/File.php",
    "Line": 35,
    "message": "",
    "exception": [],
    "CustomMessage": "Exception thrown: OCP\\Files\\GenericFileException"
  },
  "id": "68eba98741dee"
}

Additional info

Already tried:

  • occ files:scan-app-data -vvv (no error)
  • occ files:scan --all -vvv (no error)
  • install and generate previews with previewgenerator (logs 2025-10-12T13:06:58+00:00 Generating previews for ...jpg but no preview file is created in appdata)
  • previews for new files work fine

Metadata

Metadata

Assignees

Type

Projects

Status
Triaged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions