[SOLVED] Nextcloud files homepage gives 404 error - Other pages work

Support intro

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: 17 and 18 (problem persisted after the update)
Operating system and version: DietPi v6.28.0 - based on Raspbian GNU/Linux 9
nginx version: nginx 1.10.3
PHP version: PHP 7.3.13-1+0~20191218.50+debian9~1.gbp23c2da

The issue you are facing:
Ever since I have updated a number of extensions from my Nextcloud 17 installation two days ago, I haven’t been able to access the domain.eu/nextcloud/apps/files/ screen any more - a standard nginx “404 Not Found” message would be displayed instead.
What is most peculiar about this, is that domain.eu/nextcloud/login is working fine, domain.eu/nextcloud/settings/admin/overview as well, likewise all the other settings and extension pages (e.g. domain.eu/nextcloud/apps/photos/ and domain.eu/nextcloud/apps/activity/)

Additionally, I can still access all of my files from the Nextcloud app, as well as those shared from their corresponding link; notes, news, CaldDAV and CardDAV are working alright - the only thing that is seemingly not accessible is the files page from the browser.

I subsequently switched to beta and upgraded Nextcloud to version 18, to see if anything would be fixed, but nothing changed (except for these additional errors in the overview page, which I assume came with the upgrade):

Your web server is not properly set up to resolve "/nextcloud/ocm-provider/". This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in ".htaccess" for Apache or the provided one in the documentation for Nginx at it's documentation page. On Nginx those are typically the lines starting with "location ~" that need an update.

The "X-Frame-Options" HTTP header is not set to "SAMEORIGIN". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.


Your web server is not properly set up to deliver .woff2 files. This is typically an issue with the Nginx configuration. For Nextcloud 15 it needs an adjustement to also deliver .woff2 files. Compare your Nginx configuration to the recommended configuration in our [documentation](https://docs.nextcloud.com/server/18/go.php?to=admin-nginx).

I will be extremely grateful to anyone who will be able to help me set things straight!!

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

The output of your Nextcloud log in Admin > Logging:

Error	PHP	Undefined variable: server at /var/www/nextcloud/apps/metadata/lib/AppInfo/Application.php#31


[index] Error: Exception: Call to a member function getContentSecurityPolicyManager() on null at <<closure>>

0. /var/www/nextcloud/lib/private/AppFramework/App.php line 125
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files\Controller\ViewController {}, "index")
1. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
   OC\AppFramework\App::main("OCA\\Files\\Controller\\ViewController", "index", OC\AppFramework\ ... {}, {_route: "files.view.index"})
2. <<closure>>
   OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "files.view.index"})
3. /var/www/nextcloud/lib/private/Route/Router.php line 299
   call_user_func(OC\AppFramework\ ... {}, {_route: "files.view.index"})
4. /var/www/nextcloud/lib/base.php line 1008
5. /var/www/nextcloud/index.php line 38

GET /nextcloud/apps/files/
from by user at 2020-01-23T17:16:58+00:00

are the two errors that recur every time I reload the homepage.

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

$CONFIG = array (
  'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxx,
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '*',
  'datadirectory' => '/mnt/path/dietpi_userdata/nextcloud_data',
  'dbtype' => 'mysql',
  'version' => '',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
  'overwrite.cli.url' => 'http://localhost/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_user',
  'dbpassword' => 'xxxxxxxxxxxxxxxxxxxxxxxxx',
  'installed' => true,
  'instanceid' => 'xxxxxxxxx',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'app_install_overwrite' => 
  array (
    0 => 'apporder',
    1 => 'ownpad',
    2 => 'files_downloadactivity',
    3 => 'event_update_notification',
    4 => 'jsloader',
    5 => 'unsplash',
    6 => 'sharerenamer',
  'updater.release.channel' => 'stable',

The output of your Apache/nginx/system log in /var/log/____: Logging is disabled.

The ISSUE has been SOLVED - All my woes seem to have been originated by the MAPS app → Trying to update it (and, for non-specified “server issue”, failing) would cause my homepage to turn to a 404 mess. Uninstalling Maps restored my homepage, and now everything is back to normal.