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

[Bug]: cron fails because of gd-webp #45531

Closed
5 of 8 tasks
ProductiveAsparagus56 opened this issue May 27, 2024 · 3 comments · Fixed by #38364
Closed
5 of 8 tasks

[Bug]: cron fails because of gd-webp #45531

ProductiveAsparagus56 opened this issue May 27, 2024 · 3 comments · Fixed by #38364

Comments

@ProductiveAsparagus56
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

Animated webp are not supported and will generate gd-webp cannot allocate temporary buffer at /var/www/html/lib/private/legacy/OC_Image.php#751 as described in #37263 but this will also prevent cron from running successfully.

I have also tried to disable image previews but that didn't seem to help, you can see the line "enable_previews": false, in the config.

Steps to reproduce

  1. Upload animated webp
  2. get gd-webp cannot allocate temporary buffer error log
  3. run cron script

Expected behavior

Let cron carry on like normal

Installation method

Community Docker image

Nextcloud Server version

29

Operating system

None

PHP engine version

None

Web server

None

Database engine version

MariaDB

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

Fresh Nextcloud Server install

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": {
        "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
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "upgrade.disable-web": true,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "29.0.0.19",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "enable_previews": false,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

No response

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"-","level":3,"time":"2024-05-27T14:10:02+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"gd-webp cannot allocate temporary buffer at /var/www/html/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php#117","userAgent":"--","version":"29.0.0.19","data":{"app":"PHP"}}

Additional info

No response

@ProductiveAsparagus56 ProductiveAsparagus56 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels May 27, 2024
@joshtrichards joshtrichards linked a pull request May 27, 2024 that will close this issue
4 tasks
@joshtrichards
Copy link
Member

sigh (not directed at you; just frustrated at these preview processing matters).

#38364 should address this too since I think you're only hitting that code path due to the fallback in place:

try {
// using preview image to generate the blurhash
$preview = $this->preview->getPreview($file, 256, 256);
$image = @imagecreatefromstring($preview->getContent());
} catch (NotFoundException $e) {
// https://github.com/nextcloud/server/blob/9d70fd3e64b60a316a03fb2b237891380c310c58/lib/private/legacy/OC_Image.php#L668
// The preview system can fail on huge picture, in that case we use our own image resizer.
if (str_starts_with($file->getMimetype(), 'image/')) {
$image = $this->resizedImageFromFile($file);
}

Thanks for reporting. I'll try to get that PR in. It's been on the back burner for awhile.

@ProductiveAsparagus56
Copy link
Author

No problem, i understand. Is there maybe a setting where we can disable all previews and prevent these errors for now?

@ProductiveAsparagus56
Copy link
Author

The cron issue seems to have fixed itself, but should we keep this issue open in case anything else happens?

@joshtrichards joshtrichards added 1. to develop Accepted and waiting to be taken care of 2. developing Work in progress and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap 1. to develop Accepted and waiting to be taken care of labels Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants