Avatar upload fails

Nextcloud version: 21.0.2
Operating system and version: OpenMediaVault 5
Nginx version: 1.18.0
PHP version: 7.4.19

Avatarr uploading stucks always, both with PNG or JPG file.
No error appears on the screen.

The output of Nextcloud log in Admin > Logging:

Error	core	Exception: Unknown filetype		2021-06-01T08:48:22+0200
Error	PHP	Error: imagedestroy() expects parameter 1 to be resource, bool given at /config/www/nextcloud/lib/private/legacy/OC_Image.php#1039		2021-06-01T08:48:22+0200
Error	core	OC_Image::cropNew(): Error creating true color image		2021-06-01T08:48:22+0200
Error	PHP	Error: imagecreatetruecolor(): Invalid image dimensions at /config/www/nextcloud/lib/private/legacy/OC_Image.php#1036		2021-06-01T08:48:22+0200

The output of myconfig.php file is:

<?php
$CONFIG = array (
  'default_phone_region' => 'IT',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'redis',
    'port' => 6379,
  ),
  'datadirectory' => '/data',
  'trusted_proxies' => 
  array (
    0 => 'swag',
  ),
  'overwrite.cli.url' => 'https://nextcloud.mydns.org/',
  'overwritehost' => 'nextcloud.mydns.org',
  'overwriteprotocol' => 'https',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.mydns.org',
  ),
  'instanceid' => 'blablabla',
  'passwordsalt' => 'blablablablablablablabla',
  'secret' => 'blablablablablablablablablablablablablablablabla',
  'dbtype' => 'mysql',
  'version' => '21.0.2.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'mariadb',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_myname',
  'dbpassword' => 'blablablablablablablablablabla',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'mymail',
  'mail_domain' => 'mail.org',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.mail.org',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'mymail@mail.org',
  'mail_smtppassword' => 'blablablablabla',
  'maintenance' => false,
);

Same problem here…

I’m experiencing the same problem.
Did you by chance find a solution?

I’ve just realized that the problem occurs while trying to upload the avatar from a chrome based browser but when using firefox it works fine.
I’ll try to update to the last version tonight

1 Like

Thanks, with firefox it’s working, but not with opera or chrome