Profile picture cannot be set nor favicon

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 25.0.1
Operating system and version (eg, Ubuntu 20.04): container of image linuxserver/nextcloud:latest
$ uname -r
4.4.180+
Apache or nginx version (eg, Apache 2.4.25): nginx/1.20.2
PHP version (eg, 7.4): 8.0.25
Host OS: DSM 7.1.1-42962 Update 1
Hardware platform: Synology DS918+ (CPU: Intel Celeron J3455)

The issue you are facing:

I have just reset NC a couple days ago. I have trouble setting the profile picture. It went well and the file was uploaded correctly and an edit widget was shown as below:

However, it failed after I have hit the button “Set as profile picture”. An error popped up as below:
Screen Shot 2022-11-12 at 2.17.59 pm

Similar error appeared for setting favicon, except no edit widget needed. The error is show as below:
Screen Shot 2022-11-12 at 2.18.31 pm

Everything else is fine so far so good. I didn’t have this problem on NC v.24.0.5.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. open the profile page on NC
  2. click upload button on profile picture
  3. select a jpeg file and upload
  4. click on the button “Set as profile picture”

The output of your Nextcloud log in Admin > Logging:

{"reqId":"mVbVgy5qEip5iTnBQ05y","level":2,"time":"2022-11-12T14:39:17+00:00","remoteAddr":"192.168.64.5","user":"<omitted for security>","app":"core","method":"POST","url":"/avatar","message":"The file was only partially uploaded","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36","version":"25.0.1.1","data":{"app":"core"},"id":"636fb01bc238b"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => '<omitted for security>',
  'passwordsalt' => '<omitted for security>',
  'secret' => '<omitted for security>',
  'trusted_domains' => 
  array (
    0 => '<omitted for security>',
  ),
  'dbtype' => 'mysql',
  'version' => '25.0.1.1',
  'trusted_proxies' => 
  array (
    0 => 'swag',
  ),
  'overwrite.cli.url' => 'https://<omitted for security>',
  'dbname' => 'nextcloud',
  'dbhost' => 'mariadb:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncuser',
  'dbpassword' => '<omitted for security>',
  'installed' => true,
  'default_phone_region' => 'GB',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
    array (
      'host' => 'redis',
      'port' => 6379,
      'timeout' => 1.5,
    ),
  // image preview related
  'preview_max_x' => null,
  'preview_max_y' => null,
  'jpeg_quality' => '60',
  'preview_max_scale_factor' => 1.5,
  'app_install_overwrite' => 
  array (
    0 => 'files_excludedirs',
  ),
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => '<omitted for security>',
  'mail_domain' => '<omitted for security>',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '<omitted for security>',
  'mail_smtpport' => '587',
  'mail_smtpname' => '<omitted for security>',
  'mail_smtppassword' => '<omitted for security>',
);

The output of your Apache/nginx/system log in /var/log/____:
access.log

192.168.64.5 - - [12/Nov/2022:14:39:16 +0000] "POST /avatar HTTP/1.1" 400 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
192.168.64.5 - - [12/Nov/2022:14:39:17 +0000] "GET /avatar/<omitted for security>/64/dark?v=1668263956899 HTTP/1.1" 200 139 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
192.168.64.5 - - [12/Nov/2022:14:39:17 +0000] "GET /avatar/<omitted for security>/512/dark?v=1668263956899 HTTP/1.1" 200 536 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

 {"reqId":"mVbVgy5qEip5iTnBQ05y","level":2,"time":"2022-11-12T14:39:17+00:00","remoteAddr":"192.168.64.5","user":"janus","app":"core","method":"POST","url":"/avatar","message":"The file was only partially uploaded","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36","version":"25.0.1.1","data":{"app":"core"}}

Sorry for wasting the resource here.

I have identified the error. I have change the following variable on the file [nextcloud dir]/nginx/conf.d/default.conf to 0 by mistake.

`client_body_buffer_size 512k;`

Reverting it to default fixed the problem.