Internal Server Error after updating from NC20 to NC21

Nextcloud version: 21 ( but it never started, until this afternoon everything went well with several updates, including major ones)
Operating system and version: DietPi 7.4.2
Apache version: 2.4.38
PHP version: 7.3.29

The issue you are facing: After updating from NC20 to NC21 I can no longer do anything (Internal Server Error both from web and client)

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

Steps to replicate it: Simply try to login

The output of the last request ID in nextcloud.log:

{"reqId":"IlSywCSoNXeNoczhQokK","level":3,"time":"2021-08-15T21:35:26+00:00","remoteAddr":"x.x.x.x","user":"Didi","app":"index","method":"GET","url":"/nextcloud/apps/dashboard/","message":{"Exception":"Error","Message":"Undefined class constant 'MAJOR_VERSION'","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/functions.php","line":71,"function":"defaultUserAgent","class":"GuzzleHttp\\Utils","type":"::","args":[]},{"file":"/var/www/nextcloud/apps/files_external_dropbox/vendor/guzzlehttp/guzzle/src/Client.php","line":194,"function":"GuzzleHttp\\default_user_agent","args":[]},{"file":"/var/www/nextcloud/apps/files_external_dropbox/vendor/guzzlehttp/guzzle/src/Client.php","line":75,"function":"configureDefaults","class":"GuzzleHttp\\Client","type":"->","args":[{"handler":{"__class__":"GuzzleHttp\\HandlerStack"}}]},{"file":"/var/www/nextcloud/lib/private/Http/Client/ClientService.php","line":62,"function":"__construct","class":"GuzzleHttp\\Client","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/OCS/DiscoveryService.php","line":55,"function":"newClient","class":"OC\\Http\\Client\\ClientService","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/Server.php","line":1264,"function":"__construct","class":"OC\\OCS\\DiscoveryService","type":"->","args":[{"__class__":"OC\\Memcache\\Factory"},{"__class__":"OC\\Http\\Client\\ClientService"}]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":155,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php","line":118,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":122,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OCP\\OCS\\IDiscoveryService"]},{"file":"/var/www/nextcloud/lib/private/ServerContainer.php","line":137,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCP\\OCS\\IDiscoveryService",false]},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":434,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OCP\\OCS\\IDiscoveryService",true]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":87,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCP\\OCS\\IDiscoveryService",true]},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":101,"function":"array_map","args":[{"__class__":"Closure"},[{"name":"addressHandler","__class__":"ReflectionParameter"},{"name":"httpClientService","__class__":"ReflectionParameter"},"*** sensitive parameter replaced ***",{"name":"jobList","__class__":"ReflectionParameter"},{"name":"federationProviderManager","__class__":"ReflectionParameter"},"And 2 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":109,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[{"name":"OCA\\FederatedFileSharing\\Notifications","__class__":"ReflectionClass"}]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":126,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\FederatedFileSharing\\Notifications"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":459,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\FederatedFileSharing\\Notifications"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":431,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\FederatedFileSharing\\Notifications"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":87,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\FederatedFileSharing\\Notifications",true]},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":101,"function":"array_map","args":[{"__class__":"Closure"},[{"name":"connection","__class__":"ReflectionParameter"},{"name":"addressHandler","__class__":"ReflectionParameter"},"*** sensitive parameter replaced ***",{"name":"tokenHandler","__class__":"ReflectionParameter"},{"name":"l10n","__class__":"ReflectionParameter"},"And 7 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":109,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[{"name":"OCA\\FederatedFileSharing\\FederatedShareProvider","__class__":"ReflectionClass"}]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":126,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\FederatedFileSharing\\FederatedShareProvider"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":459,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\FederatedFileSharing\\FederatedShareProvider"]},{"file":"/var/www/nextcloud/lib/private/ServerContainer.php","line":146,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\FederatedFileSharing\\FederatedShareProvider"]},{"file":"/var/www/nextcloud/apps/provisioning_api/lib/Capabilities.php","line":50,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OCA\\FederatedFileSharing\\FederatedShareProvider"]},{"file":"/var/www/nextcloud/lib/private/CapabilitiesManager.php","line":72,"function":"getCapabilities","class":"OCA\\Provisioning_API\\Capabilities","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/Template/JSConfigHelper.php","line":183,"function":"getCapabilities","class":"OC\\CapabilitiesManager","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":211,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":183,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["user","dashboard"]},{"file":"/var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php","line":210,"function":"fetchPage","class":"OC_Template","type":"->","args":[[]]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":172,"function":"render","class":"OCP\\AppFramework\\Http\\TemplateResponse","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Dashboard\\Controller\\DashboardController"},"index"]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Dashboard\\Controller\\DashboardController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"dashboard.dashboard.index"}]},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/dashboard/"]},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Utils.php","Line":118,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36","version":"21.0.4.1"}

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

<?php
$CONFIG = array (
  'passwordsalt' => 'xxxxx',
  'secret' => 'xxxxxx',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '*',
  ),
  'datadirectory' => '/mnt/dietpi_userdata/nextcloud_data',
  'dbtype' => 'mysql',
  'version' => '21.0.4.1',
  'hashingThreads' => 4,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/run/redis/redis-server.sock',
    'port' => 0,
  ),
  'overwrite.cli.url' => 'http://localhost/nextcloud',
  'htaccess.RewriteBase' => '/nextcloud',
  'dbname' => 'xxxxx',
  'dbhost' => 'xxxxx',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_admin',
  'dbpassword' => 'xxxxx',
  'installed' => true,
  'instanceid' => 'xxxxx',
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'xxxxx',
  'mail_domain' => 'xxxxx',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'xxxxx',
  'mail_smtpport' => 'xxx',
  'mail_smtpname' => 'xxxxx',
  'mail_smtppassword' => 'xxxxx',
  'app_install_overwrite' =>
  array (
  !  0 => 'files_external_dropbox',
  ),
  'theme' => '',
  'loglevel' => 2,
  'updater.secret' => 'xxxxx',
);

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

[Sun Aug 15 23:29:10.427870 2021] [php7:error] [pid 1323] [client x.x.x.x:59791] PHP Parse error:  syntax error, unexpected ')' in /var/www/nextcloud/config/config.php on line 48
[Sun Aug 15 23:29:10.427870 2021] [php7:error] [pid 1093] [client x.x.x.x:59790] PHP Parse error:  syntax error, unexpected ')' in /var/www/nextcloud/config/config.php on line 48
[Sun Aug 15 23:29:10.427870 2021] [php7:error] [pid 1539] [client x.x.x.x:59793] PHP Parse error:  syntax error, unexpected ')' in /var/www/nextcloud/config/config.php on line 48
[Sun Aug 15 23:29:10.427870 2021] [php7:error] [pid 1092] [client x.x.x.x:59792] PHP Parse error:  syntax error, unexpected ')' in /var/www/nextcloud/config/config.php on line 48
[Sun Aug 15 23:29:10.452244 2021] [php7:error] [pid 1092] [client x.x.x.x:59795] PHP Parse error:  syntax error, unexpected ')' in /var/www/nextcloud/config/config.php on line 48
[Sun Aug 15 23:29:10.452244 2021] [php7:error] [pid 1539] [client x.x.x.x:59794] PHP Parse error:  syntax error, unexpected ')' in /var/www/nextcloud/config/config.php on line 48
[Sun Aug 15 23:29:10.452245 2021] [php7:error] [pid 1323] [client x.x.x.x:59796] PHP Parse error:  syntax error, unexpected ')' in /var/www/nextcloud/config/config.php on line 48
[Sun Aug 15 23:29:12.922301 2021] [php7:error] [pid 1093] [client x.x.x.x:56509] PHP Parse error:  syntax error, unexpected ')' in /var/www/nextcloud/config/config.php on line 48
[Sun Aug 15 23:29:12.942071 2021] [php7:error] [pid 1323] [client x.x.x.x:56510] PHP Fatal error:  Uncaught Error: Call to a member function getRequest() on null in /var/www/nextcloud/remote.php:53\nStack trace:\n#0 /var/www/nextcloud/remote.php(171): handleException(Object(ParseError))\n#1 {main}\n  thrown in /var/www/nextcloud/remote.php on line 53

The webserver error states that you have an issue in line 48 of your config.php:

  array (
  !  0 => 'files_external_dropbox',
  ),

The exclamation mark doesn’t belong there, Try removing it and test again.

If it still doesn’t work, then the problem likely is within your files_external_dropbox app. Please contact the author: GitHub - DJaeger/files_external_dropbox: External Storage backend for Dropbox

/S

1 Like

Hi all, I solved renaming the folder /apps/files_external_dropbox to something else. Nextcloud no longer load the extension.