Skip to content

Corrupted preview *-max.png blocks generation of other previews #7749

@streckus

Description

@streckus

Steps to reproduce

  1. Upload around 100 pictures in a folder
  2. Visit folder in files or gallery app
  3. If resources are limited preview generation for some files might crash, resulting in a corrupted *-max.png file.

Expected behaviour

When visiting the folder again and that broken preview is detected (e.g. Gallery app throws "Exception: Preview generation has failed"), the broken file should be regenerated to not block generation of other previews.

Actual behaviour

The software seems to assume the only cause for the broken preview can be a broken file in the first place, so the broken preview file blocks further preview generation. Manually removing the corrupted preview file and running occ files:scan-app-data to update the cache enables new preview generation at next folder visit.

Server configuration

Operating system: Arch Linux ARM (on Raspberry Pi 3)

Web server: Apache 2.4.29

Database: MariaDB 10.1.30

PHP version: 7.0.26

Nextcloud version: 12.0.4

Updated from an older Nextcloud/ownCloud or fresh install: fresh install

Where did you install Nextcloud from: Arch Repositories

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - activity: 2.5.2
  - comments: 1.2.0
  - dav: 1.3.0
  - federatedfilesharing: 1.2.0
  - federation: 1.2.0
  - files: 1.7.2
  - files_pdfviewer: 1.1.1
  - files_sharing: 1.4.0
  - files_texteditor: 2.4.1
  - files_trashbin: 1.2.0
  - files_versions: 1.5.0
  - files_videoplayer: 1.1.0
  - firstrunwizard: 2.1
  - gallery: 17.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - music: 0.5.5
  - nextcloud_announcements: 1.1
  - notifications: 2.0.0
  - oauth2: 1.0.5
  - password_policy: 1.2.2
  - provisioning_api: 1.2.0
  - serverinfo: 1.2.0
  - sharebymail: 1.2.0
  - survey_client: 1.0.0
  - systemtags: 1.2.0
  - theming: 1.3.0
  - twofactor_backupcodes: 1.1.1
  - updatenotification: 1.2.0
  - workflowengine: 1.2.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - user_external
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "ocmuug5kqo74",
        "apps_paths": [
            {
                "path": "\/usr\/share\/webapps\/nextcloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/mnt\/nextcloud_data\/nextcloud\/apps2",
                "url": "\/apps2",
                "writable": true
            }
        ],
        "datadirectory": "\/mnt\/nextcloud_data\/nextcloud\/data",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "streckemich.ddns.net"
        ],
        "overwrite.cli.url": "https:\/\/streckemich.ddns.net",
        "dbtype": "mysql",
        "version": "12.0.4.3",
        "dbname": "nextcloud",
        "dbhost": "localhost",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "securesmtp.t-online.de",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "mail_from_address": "nextcloud",
        "mail_domain": "streckemich.ddns.net",
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\Movie",
            "OC\\Preview\\PDF"
        ],
        "maintenance": false,
        "log_level": 0
    },
    "apps": {
        "activity": {
            "enabled": "yes",
            "installed_version": "2.5.2",
            "types": "filesystem"
        },
        "backgroundjob": {
            "lastjob": "823"
        },
        "bruteforcesettings": {
            "enabled": "no",
            "installed_version": "1.0.3",
            "types": ""
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": "logging"
        },
        "core": {
            "installed.bundles": "[\"CoreBundle\"]",
            "installedat": "1514663107.139",
            "lastcron": "1515452039",
            "lastupdateResult": "[]",
            "lastupdatedat": "1515451325",
            "oc.integritycheck.checker": "[]",
            "public_files": "files_sharing\/public.php",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "scss.variables": "1f5da376b00eb86a92030ba656c8f86c",
            "vendor": "nextcloud"
        },
        "dav": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": "filesystem"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": ""
        },
        "federation": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": "authentication"
        },
        "files": {
            "cronjob_scan_files": "500",
            "enabled": "yes",
            "installed_version": "1.7.2",
            "types": "filesystem"
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "1.1.1",
            "ocsid": "166049",
            "types": ""
        },
        "files_sharing": {
            "enabled": "yes",
            "installed_version": "1.4.0",
            "types": "filesystem"
        },
        "files_texteditor": {
            "enabled": "yes",
            "installed_version": "2.4.1",
            "ocsid": "166051",
            "types": ""
        },
        "files_trashbin": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": "filesystem"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.5.0",
            "types": "filesystem"
        },
        "files_videoplayer": {
            "enabled": "yes",
            "installed_version": "1.1.0",
            "types": ""
        },
        "firstrunwizard": {
            "enabled": "yes",
            "installed_version": "2.1",
            "types": "logging"
        },
        "folderplayer": {
            "enabled": "no",
            "installed_version": "10.0.0",
            "types": ""
        },
        "gallery": {
            "enabled": "yes",
            "installed_version": "17.0.0",
            "types": ""
        },
        "logreader": {
            "enabled": "yes",
            "installed_version": "2.0.0",
            "ocsid": "170871",
            "types": ""
        },
        "lookup_server_connector": {
            "enabled": "yes",
            "installed_version": "1.0.0",
            "types": "authentication"
        },
        "music": {
            "enabled": "yes",
            "installed_version": "0.5.5",
            "types": "filesystem"
        },
        "nextcloud_announcements": {
            "enabled": "yes",
            "installed_version": "1.1",
            "pub_date": "Sat, 10 Dec 2016 00:00:00 +0100",
            "types": "logging"
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "2.0.0",
            "types": "logging"
        },
        "oauth2": {
            "enabled": "yes",
            "installed_version": "1.0.5",
            "types": "authentication"
        },
        "password_policy": {
            "enabled": "yes",
            "installed_version": "1.2.2",
            "types": ""
        },
        "previewgenerator": {
            "enabled": "no",
            "heightSizes": "256",
            "installed_version": "1.0.9",
            "squareSizes": "32",
            "types": "filesystem",
            "widthSizes": "256"
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": "prevent_group_restriction"
        },
        "radio": {
            "enabled": "no",
            "installed_version": "0.6.0",
            "types": ""
        },
        "serverinfo": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": ""
        },
        "sharebymail": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": "filesystem"
        },
        "survey_client": {
            "enabled": "yes",
            "installed_version": "1.0.0",
            "types": ""
        },
        "systemtags": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": "logging"
        },
        "theming": {
            "cachebuster": "2",
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": "logging"
        },
        "twofactor_backupcodes": {
            "enabled": "yes",
            "installed_version": "1.1.1",
            "types": ""
        },
        "updatenotification": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": "",
            "update_check_errors": "0"
        },
        "workflowengine": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": "filesystem"
        }
    }
}

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: Opera (Also tested on Firefox)

Operating system: Arch Linux, Windows 10, Linux Mint 17.3

Logs

Nextcloud log (data/nextcloud.log)

Nextcloud log
{"reqId":"AxdzGrAhccjYzDD3OWH2","level":3,"time":"2018-01-08T20:41:18+00:00","remoteAddr":"192.168.2.114","user":"NextAdmin","app":"gallery","method":"GET","url":"\/index.php\/apps\/gallery\/thumbnails?ids=16859%3B16858%3B16860%3B16861%3B16864%3B16863&scale=1&square=0&requesttoken=CKVhdQsuNWUWsbnz9xfVO8THE3LxiAqz2uka3Bd%2BI3Y%3D%3AacJUBTlDclBH%2FPiip2W2DoyWJEbF%2BEaD7p8vjEJGYRk%3D","message":"Exception: Preview generation has failed","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.108 Safari\/537.36 OPR\/50.0.2762.45","version":"12.0.4.3"}
{"reqId":"kvT8wGniKAZx1EE62Mw8","level":3,"time":"2018-01-08T20:41:19+00:00","remoteAddr":"192.168.2.114","user":"NextAdmin","app":"gallery","method":"GET","url":"\/index.php\/apps\/gallery\/thumbnails?ids=16866%3B16867%3B16870%3B16872%3B16874%3B16875&scale=1&square=0&requesttoken=CKVhdQsuNWUWsbnz9xfVO8THE3LxiAqz2uka3Bd%2BI3Y%3D%3AacJUBTlDclBH%2FPiip2W2DoyWJEbF%2BEaD7p8vjEJGYRk%3D","message":"Exception: Preview generation has failed","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.108 Safari\/537.36 OPR\/50.0.2762.45","version":"12.0.4.3"}
{"reqId":"ettJH94uoCs3ffS2rRjh","level":3,"time":"2018-01-08T20:42:03+00:00","remoteAddr":"192.168.2.114","user":"NextAdmin","app":"gallery","method":"GET","url":"\/index.php\/apps\/gallery\/thumbnails?ids=16859%3B16858%3B16860%3B16861%3B16864%3B16863&scale=1&square=0&requesttoken=DBC0o0npm8JVwTl4mwq%2Fg0Fd76TAhqBveBQpVDDDAg8%3D%3AbXeB03uE3PcEjHgpy3jctgkM2JD09uxfTGIcBGX7QGA%3D","message":"Exception: Preview generation has failed","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.108 Safari\/537.36 OPR\/50.0.2762.45","version":"12.0.4.3"}
{"reqId":"o8SDlmDBrAcUxrw2r2tC","level":3,"time":"2018-01-08T20:42:03+00:00","remoteAddr":"192.168.2.114","user":"NextAdmin","app":"gallery","method":"GET","url":"\/index.php\/apps\/gallery\/thumbnails?ids=16866%3B16867%3B16870%3B16872%3B16874%3B16875&scale=1&square=0&requesttoken=DBC0o0npm8JVwTl4mwq%2Fg0Fd76TAhqBveBQpVDDDAg8%3D%3AbXeB03uE3PcEjHgpy3jctgkM2JD09uxfTGIcBGX7QGA%3D","message":"Exception: Preview generation has failed","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.108 Safari\/537.36 OPR\/50.0.2762.45","version":"12.0.4.3"}
{"reqId":"UY6IzkWYSC7BaRmDYzMZ","level":3,"time":"2018-01-08T20:43:38+00:00","remoteAddr":"192.168.2.114","user":"NextAdmin","app":"gallery","method":"GET","url":"\/index.php\/apps\/gallery\/thumbnails?ids=16859%3B16858%3B16860%3B16861%3B16864%3B16863&scale=1&square=0&requesttoken=gp9ott4iV%2B9As0c93ot9At0srOKMBylQpxlt0DOg4fo%3D%3A1vkN5LpzH71wyzZVvKAbb%2FZ%2Bh6DlVXAS401YklLV0rU%3D","message":"Exception: Preview generation has failed","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.108 Safari\/537.36 OPR\/50.0.2762.45","version":"12.0.4.3"}
{"reqId":"v7kSysF0ObdMgBTSrJ65","level":3,"time":"2018-01-08T20:43:38+00:00","remoteAddr":"192.168.2.114","user":"NextAdmin","app":"gallery","method":"GET","url":"\/index.php\/apps\/gallery\/thumbnails?ids=16866%3B16867%3B16870%3B16872%3B16874%3B16875&scale=1&square=0&requesttoken=gp9ott4iV%2B9As0c93ot9At0srOKMBylQpxlt0DOg4fo%3D%3A1vkN5LpzH71wyzZVvKAbb%2FZ%2Bh6DlVXAS401YklLV0rU%3D","message":"Exception: Preview generation has failed","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.108 Safari\/537.36 OPR\/50.0.2762.45","version":"12.0.4.3"}
{"reqId":"MbX1LSJRhOHYN3Nqned9","level":3,"time":"2018-01-08T20:47:08+00:00","remoteAddr":"192.168.2.114","user":"NextAdmin","app":"gallery","method":"GET","url":"\/index.php\/apps\/gallery\/thumbnails?ids=16859%3B16858%3B16860%3B16861%3B16864%3B16863&scale=1&square=0&requesttoken=xtjCcdmxL6cqRjV1w32KULF5P4IQYP245nNyohSZJHk%3D%3Akr6nI73gZ%2FUaPkQdoVbsPZorFMB5MqT6oidH4HXsFzY%3D","message":"Exception: Preview generation has failed","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.108 Safari\/537.36 OPR\/50.0.2762.45","version":"12.0.4.3"}
{"reqId":"JfxT1eWBIhcSgzmq7BQg","level":3,"time":"2018-01-08T20:47:08+00:00","remoteAddr":"192.168.2.114","user":"NextAdmin","app":"gallery","method":"GET","url":"\/index.php\/apps\/gallery\/thumbnails?ids=16866%3B16867%3B16870%3B16872%3B16874%3B16875&scale=1&square=0&requesttoken=xtjCcdmxL6cqRjV1w32KULF5P4IQYP245nNyohSZJHk%3D%3Akr6nI73gZ%2FUaPkQdoVbsPZorFMB5MqT6oidH4HXsFzY%3D","message":"Exception: Preview generation has failed","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.108 Safari\/537.36 OPR\/50.0.2762.45","version":"12.0.4.3"}
{"reqId":"UxhIIwxDN4Vsb6UWV9KI","level":3,"time":"2018-01-08T21:21:12+00:00","remoteAddr":"192.168.2.114","user":"NextAdmin","app":"gallery","method":"GET","url":"\/index.php\/apps\/gallery\/thumbnails?ids=16859%3B16858%3B16860%3B16861%3B16864%3B16863&scale=1&square=0&requesttoken=8t1lSzLcR9ZVSDfRuZA6uVwB4Sk%2F56CbqQv4u%2BKB3ms%3D%3AprsAGVaND4RlMEa527tc1HdTymtWtfnZ7V%2FN%2BYP07SQ%3D","message":"Exception: Preview generation has failed","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.108 Safari\/537.36 OPR\/50.0.2762.45","version":"12.0.4.3"}
{"reqId":"8PKZ97iqdYFnqHbhtFGK","level":3,"time":"2018-01-08T21:21:13+00:00","remoteAddr":"192.168.2.114","user":"NextAdmin","app":"gallery","method":"GET","url":"\/index.php\/apps\/gallery\/thumbnails?ids=16866%3B16867%3B16870%3B16872%3B16874%3B16875&scale=1&square=0&requesttoken=8t1lSzLcR9ZVSDfRuZA6uVwB4Sk%2F56CbqQv4u%2BKB3ms%3D%3AprsAGVaND4RlMEa527tc1HdTymtWtfnZ7V%2FN%2BYP07SQ%3D","message":"Exception: Preview generation has failed","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.108 Safari\/537.36 OPR\/50.0.2762.45","version":"12.0.4.3"}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions