Nextcloud Webinterface - svg icons break

Nextcloud version (eg, 12.0.2): 17.0.1
Operating system and version (eg, Ubuntu 17.04): Manjaro (Kernel 5.3.11-1)
Apache or nginx version (eg, Apache 2.4.25): nginx/1.16.1
PHP version (eg, 7.1): 7.3.11

The issue you are facing:
Several of the web interface icons are not loading, showing the default broken image icon. I’ve confirmed this on Firefox/Gecko and Chrome/Chromium engines.

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

Steps to replicate it:

  1. Install nextcloud using the instructions on the arch wiki, using nginx and mariaDB: https://wiki.archlinux.org/index.php/Nextcloud

The output of your Nextcloud log in Admin > Logging:

nextcloud.log is empty.

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

<?php
$CONFIG = array (
  'instanceid' => '[REDACTED]',
  'passwordsalt' => [REDACTED]',
  'secret' => '[REDACTED]',
  'trusted_domains' =>
  array (
    0 => '[REDACTED]',
  ),
  'datadirectory' => '/var/nextcloud',
  'dbtype' => 'mysql',
  'version' => '17.0.1.1',
  'overwrite.cli.url' => '[REDACTED]',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '[REDACTED]',
  'installed' => true,
  'maintenance' => false,
);

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

2019/11/16 17:21:50 [notice] 1843#1843: using the "epoll" event method
2019/11/16 17:21:50 [notice] 1843#1843: using the "epoll" event method
2019/11/16 17:21:50 [notice] 1843#1843: nginx/1.16.1
2019/11/16 17:21:50 [notice] 1843#1843: nginx/1.16.1
2019/11/16 17:21:50 [notice] 1843#1843: OS: Linux 5.3.11-1-MANJARO
2019/11/16 17:21:50 [notice] 1843#1843: OS: Linux 5.3.11-1-MANJARO
2019/11/16 17:21:50 [notice] 1843#1843: getrlimit(RLIMIT_NOFILE): 1024:524288
2019/11/16 17:21:50 [notice] 1843#1843: getrlimit(RLIMIT_NOFILE): 1024:524288
2019/11/16 17:21:50 [notice] 1844#1844: start worker processes
2019/11/16 17:21:50 [notice] 1844#1844: start worker processes
2019/11/16 17:21:50 [notice] 1844#1844: start worker process 1845
2019/11/16 17:21:50 [notice] 1844#1844: start worker process 1845
2019/11/16 17:21:53 [info] 1845#1845: *7 client canceled stream 17 while sending request to upstream, client: 10.0.10.1, server: cloud.[REDACTED].com, request: "GET /css/core/f317-2a9b-server.css?v=db81cddf52fdb3c8ca1e4c859e214124-e0006164-0 HTTP/2.0", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "cloud.[REDACTED].com"
2019/11/16 17:21:54 [info] 1845#1845: *7 client canceled stream 199 while sending request to upstream, client: 10.0.10.1, server: cloud.[REDACTED].com, request: "GET /apps/theming/icon/settings?v=0 HTTP/2.0", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "cloud.[REDACTED].com"
2019/11/16 17:21:54 [info] 1845#1845: *7 client canceled stream 201 while sending request to upstream, client: 10.0.10.1, server: cloud.[REDACTED].com, request: "GET /apps/theming/favicon/settings?v=0 HTTP/2.0", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "cloud.[REDACTED].com"
2019/11/16 17:21:56 [info] 1845#1845: *7 client canceled stream 207 while sending request to upstream, client: 10.0.10.1, server: cloud.[REDACTED].com, request: "GET /css/core/f317-2a9b-server.css?v=db81cddf52fdb3c8ca1e4c859e214124-e0006164-0 HTTP/2.0", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "cloud.[REDACTED].com"
2019/11/16 17:21:56 [info] 1845#1845: *7 client canceled stream 209 while sending request to upstream, client: 10.0.10.1, server: cloud.[REDACTED].com, request: "GET /css/files/4039-2a9b-merged.css?v=db81cddf52fdb3c8ca1e4c859e214124-40393716-0 HTTP/2.0", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "cloud.[REDACTED].com"
2019/11/16 17:21:56 [info] 1845#1845: *7 client canceled stream 211 while sending request to upstream, client: 10.0.10.1, server: cloud.[REDACTED].com, request: "GET /css/activity/e2ca-2a9b-style.css?v=db81cddf52fdb3c8ca1e4c859e214124-e2ca6b2b-0 HTTP/2.0", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "cloud.[REDACTED].com"
2019/11/16 17:21:56 [info] 1845#1845: *7 client canceled stream 217 while sending request to upstream, client: 10.0.10.1, server: cloud.[REDACTED].com, request: "GET /css/text/872c-2a9b-icons.css?v=db81cddf52fdb3c8ca1e4c859e214124-872ccd9c-0 HTTP/2.0", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "
2019/11/16 17:14:31 [notice] 1676#1676: using the "epoll" event method
2019/11/16 17:14:31 [notice] 1676#1676: using the "epoll" event method
2019/11/16 17:14:31 [notice] 1676#1676: nginx/1.16.1
2019/11/16 17:14:31 [notice] 1676#1676: nginx/1.16.1
2019/11/16 17:14:31 [notice] 1676#1676: OS: Linux 5.3.11-1-MANJARO
2019/11/16 17:14:31 [notice] 1676#1676: OS: Linux 5.3.11-1-MANJARO
2019/11/16 17:14:31 [notice] 1676#1676: getrlimit(RLIMIT_NOFILE): 1024:524288
2019/11/16 17:14:31 [notice] 1676#1676: getrlimit(RLIMIT_NOFILE): 1024:524288
2019/11/16 17:14:31 [notice] 1678#1678: start worker processes
2019/11/16 17:14:31 [notice] 1678#1678: start worker processes
2019/11/16 17:14:31 [notice] 1678#1678: start worker process 1679
2019/11/16 17:14:31 [notice] 1678#1678: start worker process 1679
...
2019/11/16 17:14:40 [info] 1679#1679: *1 client canceled stream 23 while sending request to upstream, client: 10.0.10.1, server: cloud.[REDACTED].com, request: "GET /css/core/f317-2a9b-server.css?v=db81cddf52fdb3c8ca1e4c859e214124-e0006164-0 HTTP/2.0", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "[REDACTED]"
...
"

Update: I tried a complete re-installation, but still see the problem. I’ve also gone through and made sure my folder and file perms are 750/644. At this point, I’m thinking its something related to the nginx config, which is functionally identical to the first example listed in the documentation here:

https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html

Your server sends the Content-Type application/octet-stream header for svg files, while it should be image/svg+xml .
Make sure you have a line with image/svg+xml svg; in your mime.types file and that you include the mime.types file.

To verify this you can use the browser developer tools:

1 Like

Sure enough. It makes sense, too, as I had somehow screwed up my mime.types file earlier and pulled one from the nginx example.

Thank you so much for your help!

1 Like