Cannot access files via the web interface after upgrade from 20 to 21: Error 500 on GET /app/files

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): migration from 20 to 21
Operating system and version (eg, Ubuntu 20.04): Ubuntu 18.04
Apache or nginx version (eg, Apache 2.4.25): nextcloud docker image
PHP version (eg, 7.4): nextcloud docker image

The issue you are facing:

After upgrading from 20 to 21 I cannot access the web interface (beyond login), the error in the logs is

172.19.0.25 - - [12/Apr/2021:20:38:02 +0000] "GET /apps/files/ HTTP/1.1" 500 4317 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36"

Notes:

  • I found earlier issues similar to this one suggesting to upgrade the metadata app. I do not use it and I manually updates all apps.
  • the synchronization between the server and the Windows client works

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

Steps to replicate it:

  1. Upgrade from 20 to 21
  2. Try to login

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

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => 'ocflnf1ody3y',
  'passwordsalt' => 'REDACTED',
  'secret' => 'REDACTED',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.REDACTED.eu',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'pgsql',
  'version' => '21.0.1.1',
  'overwrite.cli.url' => 'https://nextcloud.REDACTED.eu',
  'overwriteprotocol' => 'https',
  'auth.bruteforce.protection.enabled' => false,
  'installed' => true,
  'has_rebuilt_cache' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'swtk.info',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.REDACTED.fr',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'REDACTED',
  'mail_smtppassword' => 'REDACTED',
  'has_internet_connection' => true,
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' => 
  array (
    0 => 'MFA',
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
  'filelocking.enabled' => true,
  'trusted_proxies' => 
  array (
    0 => '172.19.0.31',
  ),
  'forwarded_for_headers' => 
  array (
    0 => 'HTTP_X_FORWARDED_FOR',
  ),
  'app_install_overwrite' => 
  array (
    0 => 'mindmap_app',
    1 => 'twofactor_yubikey',
  ),
  'dbname' => 'nextcloud',
  'dbhost' => 'postgres',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'REDACTED',
);

The faulty app is twofactor_yubikey. Disabling it restored access to the files.