nextcloud / nextcloud/previewgenerator

Error on preview generator of metadata/cache OS files.

Open
#667 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
520
Forks
55
PR merge metrics
No merged PRs in 30d

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

I ask for apologies if this is already sorted in some how and I didn't find my answer after a period of searching about it. Also sorry if I have redacted more as needed. Please advise if further data is required.

Steps to reproduce
  1. php occ preview:generate-all
  2. Go to admin > Registers (Logs)
  3. Reports of errors is shown: "Movie preview generation process failed, file=/[user_redacted]/files/Photos/[path_redacted]/._M00300.m4v"
Expected behaviour

Skip metadata files (or even hidden dot files)

Actual behaviour

previewgenerator tries to make a preview of a file just based on extensión and without possibility to skip some possible patterns related with metadata files as Apple Double "._XXXXX.m4v" files. This is filling my nexcloud server logs.

Short-term solution will be talk with owners, as it is a small home nextcloud server, to proceed to its removal.

Server configuration

Web server: Apache/Nginx

Database: PostgreSQL

PHP version: 8.4

**Nextcloud version:**34.0.0

List of activated apps ``` Enabled: - activity: 7.0.0 - app_api: 34.0.0 - appstore: 1.0.0 - bruteforcesettings: 7.0.0 - circles: 34.0.0 - cloud_federation_api: 1.18.0 - comments: 1.24.0 - contactsinteraction: 1.15.0 - dashboard: 7.14.0 - dav: 1.39.0 - drawio: 4.2.5 - federatedfilesharing: 1.24.0 - federation: 1.24.0 - files: 2.6.0 - files_downloadlimit: 5.2.0-dev.0 - files_lock: 34.0.0 - files_pdfviewer: 7.0.0-dev.0 - files_reminders: 1.7.0 - files_sharing: 1.26.0 - files_trashbin: 1.24.0 - files_versions: 1.27.0 - firstrunwizard: 7.0.0-dev.0 - guests: 4.8.0 - logreader: 7.0.0 - lookup_server_connector: 1.22.0 - maps: 1.7.1 - memories: 8.1.0 - nextcloud_announcements: 6.0.0 - notifications: 7.0.0-dev.1 - oauth2: 1.22.0 - office: 1.0.0 - password_policy: 6.0.0-dev.0 - photos: 7.0.0 - previewgenerator: 5.14.0 - privacy: 6.0.0-dev.1 - profile: 1.3.0 - provisioning_api: 1.24.0 - recommendations: 7.0.0-dev.0 - related_resources: 5.0.0-dev.0 - serverinfo: 6.0.0 - settings: 1.17.0 - sharebymail: 1.24.0 - support: 6.0.0 - survey_client: 6.0.0-dev.0 - systemtags: 1.24.0 - text: 8.0.0 - theming: 2.9.0 - twofactor_backupcodes: 1.23.0 - twofactor_totp: 16.0.0 - twofactor_webauthn: 2.7.0 - updatenotification: 1.24.0 - user_status: 1.14.0 - viewer: 7.0.0-dev.0 - weather_status: 1.14.0 - webhook_listeners: 1.6.0 - workflowengine: 2.16.0 Disabled: - admin_audit: 1.24.0 - encryption: 2.22.0 - files_external: 1.26.0 - suspicious_login: 12.0.0-dev.0 - twofactor_nextcloud_notification: 8.0.0 - user_ldap: 1.25.0 - user_migration: 10.4.0 (installed 10.4.0) ```
Nextcloud configuration
{
    "system": {
[redacted_for_privacy_and_security]
        "installed": true,
        "maintenance": false,
        "forbidden_filename_basenames": [
            "con",
            "prn",
            "aux",
            "nul",
            "com0",
            "com1",
            "com2",
            "com3",
            "com4",
            "com5",
            "com6",
            "com7",
            "com8",
            "com9",
            "com\u00b9",
            "com\u00b2",
            "com\u00b3",
            "lpt0",
            "lpt1",
            "lpt2",
            "lpt3",
            "lpt4",
            "lpt5",
            "lpt6",
            "lpt7",
            "lpt8",
            "lpt9",
            "lpt\u00b9",
            "lpt\u00b2",
            "lpt\u00b3"
        ],
        "forbidden_filename_characters": [
            "<",
            ">",
            ":",
            "\"",
            "|",
            "?",
            "*",
            "\\",
            "\/"
        ],
        "forbidden_filename_extensions": [
            " ",
            ".",
            ".filepart",
            ".part"
        ],
        "config_preset": 2,
        "memories.db.triggers.fcu": true,
        "memories.exiftool": "\/mnt\/storage0\/srv\/nextcloud\/www-data\/nextcloud-v34.0.0.12\/apps\/memories\/bin-ext\/exiftool-aarch64-glibc",
        "memories.vod.path": "\/mnt\/storage0\/srv\/nextcloud\/www-data\/nextcloud-v34.0.0.12\/apps\/memories\/bin-ext\/go-vod-aarch64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "enabledPreviewProviders": [
            "OC\\Preview\\Image",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\Movie"
        ],
        "preview_max_x": 1024,
        "preview_max_y": 1024,
        "memories.gis_type": 2,
        "app_install_overwrite": [],
        "maintenance_window_start": 2
    }
}
Browser

Browser name: Not a browser issue,core

Browser version: 124/125/…

Operating system: Related with Mac

Browser log Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the previewgenerator app entry point used by php occ preview:generate-all, focusing on how movie filenames are selected for preview generation. Reproduce the failure with an Apple Double ._...m4v file and identify the existing preview-generation tests, if present. Done means metadata files are skipped and the command no longer fills the server logs with failed preview errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.