Internal Server Error when trying to use "download metadata.xml"

Hi there,

The issue you are facing:

I was hoping someone might have encountered a smiliar issue, as the one displayed above, when trying to download metadata.xml for SAML SSO.

The only special about this nextcloud instance is, it is a fresh install but with migrated data from our old instance. So new VM + OS but same database + data directory.

The logs suggest that - as far as i think i understand it - is something like it can’t find the SSO SAML app as it might be searching for it in the directory it was on the old instance. So just a wrong path…
Using the Add-Ons I encountered some Problems and I had to deactivate and later on activate them again to get them to work.
But it seems I can’t get the SAML SSO one to properly work.
The Theming background picture also seems to be missing but that propably isn’t the same issue as the error i enounter when trying to download the metadata.xml.

Is this the first time you’ve seen this error? (Y/N) : First time since migrating the Cloud Instance

Steps to replicate it: Go to Admin Settings > SSO & SAML Authentification > Generate Metadata.xml

The output of your Nextcloud log in Admin > Logging :

[index] Error: OCP\App\AppPathNotFoundException: Could not find path for spreed at <<closure>>

0. /srv/www/htdocs/nextcloud/core/Controller/SvgController.php line 99
1. /srv/www/htdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 166
   getSvgFromApp("spreed", "app-dark", "000")
2. /srv/www/htdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
   executeController(OC\Core\Controller\SvgController {}, "getSvgFromApp")
3. /srv/www/htdocs/nextcloud/lib/private/AppFramework/App.php line 118
   dispatch(OC\Core\Controller\SvgController {}, "getSvgFromApp")
4. /srv/www/htdocs/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
   main("OC\\Core\\Controller\\SvgController", "getSvgFromApp", OC\AppFramework\ ... {}, {app: "spreed",f ... "})
5. <<closure>>
   __invoke({app: "spreed",f ... "})
6. /srv/www/htdocs/nextcloud/lib/private/Route/Router.php line 297
   call_user_func(OC\AppFramework\ ... {}, {app: "spreed",f ... "})
7. /srv/www/htdocs/nextcloud/lib/base.php line 987
8. /srv/www/htdocs/nextcloud/index.php line 42

GET /index.php/svg/spreed/app-dark?color=000&v=1
from at 2020-04-16T08:58:55+00:00

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

$CONFIG = array (
  'instanceid' => 'oc2jos7cwk92',
  'passwordsalt' => 'XXXXXXXXXXXXXXX',
  'trusted_domains' => 
  array (
    0 => 'XXXXXXXXXXX',
    1 => 'XXXXXXXXXXX',
    2 => 'XXXXXXXXXXX',
  'datadirectory' => '/srv/www/htdocs/nextcloud/data',
  'overwrite.cli.url' => 'XXXXXXXXXXX',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  '�dbport�' => '�3306�',
  'dbtype' => 'mysql',
  'version' => '',
  'installed' => true,
  '' => 'stable',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 'debug',
  'dbuser' => 'root',
  'dbpassword' => 'XXXXXX',
  'ldapIgnoreNamingRules' => false,
  'forcessl' => false,
  'mail_from_address' => 'cloud',
  'mail_smtpmode' => 'smtp',
  'mail_domain' => 'XXXXX',
  'updatechecker' => false,
  'has_internet_connection' => true,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'XXXXXXX',
  'mail_smtpport' => '25',
  'mysql.utf8mb4' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'session_keepalive' => false,
  'session_lifetime' => 600,
  'remember_login_cookie_lifetime' => 0,

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

Really no valuable information about this Problem in the Apache Logs

Cheers :slight_smile:

Hello @neezy and welcome to the forums.

You did not file the support template.
So much information is missing.

Please add it.

Hello @rakekniven,

where can I find the blank template please?
Im new to the Forums sorry :frowning:

Thanks in Advance


you selected category support for your topic.

The text area contained the following text:

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via 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:


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


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, 12.0.2):
Operating system and version (eg, Ubuntu 17.04):
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 7.1):

The issue you are facing:

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

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:


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


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


Please provide requested information.

In the meantime I was able to resolve this issue by myself.

The Logs were not really helping as they didn’t register any SAML activity.
Because nextcloud always gave me an internal server error when I tried to download the metadata.xml I thougt it had to be a misconfiguration or missing php-addon or similar.
It was just the SAML settings which were not yet fully configured.
(Completely new to SAML and I didn’t really know how it would work.)

What was really helpful for me is this tutorial about Nextcloud SAML configuration

(I hope its okay if I link to an external site)

Im just leaving this here so anybody who encounters a similar issue has the help they need.


1 Like