After upgrading to NextCloud 29.0.16.1 I get an Internal Server error.
Logfile says:
{“reqId”:“aGYdu7SGzSj@Z1F3Kjr8GAAAAAM”,“level”:3,“time”:“2025-07-03T06:05:48+00:00”,“remoteAddr”:“92.64.238.53”,“user”:“–”,“app”:“index”,“method”:“GET”,“url”:“/index.php/204”,“message”:“Class "OCA\Files\Controller\AjaxController" does not exist”,“userAgent”:“Mozilla/5.0 (Android) Nextcloud-android/3.31.4”,“version”:“29.0.16.1”,“exception”:{“Exception”:“ReflectionException”,“Message”:“Class "OCA\Files\Controller\AjaxController" does not exist”,“Code”:-1,“Trace”:[{“file”:“/var/www/clients/client28039/web36109/bestanden/lib/private/Route/Router.php”,“line”:480,“function”:“__construct”,“class”:“ReflectionClass”,“type”:“->”,“args”:[“OCA\Files\Controller\AjaxController”]},{“file”:“/var/www/clients/client28039/web36109/bestanden/lib/private/Route/Router.php”,“line”:440,“function”:“getAttributeRoutes”,“class”:“OC\Route\Router”,“type”:“->”,“args”:[“files”]},{“file”:“/var/www/clients/client28039/web36109/bestanden/lib/private/Route/Router.php”,“line”:149,“function”:“loadAttributeRoutes”,“class”:“OC\Route\Router”,“type”:“->”,“args”:[“files”]},{“file”:“/var/www/clients/client28039/web36109/bestanden/lib/private/Route/Router.php”,“line”:290,“function”:“loadRoutes”,“class”:“OC\Route\Router”,“type”:“->”,“args”:},{“file”:“/var/www/clients/client28039/web36109/bestanden/lib/private/Route/Router.php”,“line”:324,“function”:“findMatchingRoute”,“class”:“OC\Route\Router”,“type”:“->”,“args”:[“/204”]},{“file”:“/var/www/clients/client28039/web36109/bestanden/lib/base.php”,“line”:1069,“function”:“match”,“class”:“OC\Route\Router”,“type”:“->”,“args”:[“/204”]},{“file”:“/var/www/clients/client28039/web36109/bestanden/index.php”,“line”:49,“function”:“handleRequest”,“class”:“OC”,“type”:“::”,“args”:}],“File”:“/var/www/clients/client28039/web36109/bestanden/lib/private/Route/Router.php”,“Line”:480,“message”:“Class "OCA\Files\Controller\AjaxController" does not exist”,“exception”:{},“CustomMessage”:“Class "OCA\Files\Controller\AjaxController" does not exist”}}
This situation was posted earlier (may 2024).
The solution does not seem to apply since the router.php looks quite different:
public function loadRoutes($app = null) {
if (is_string($app)) {
$app = \OC_App::cleanAppId($app);
}
$requestedApp = $app;
if ($this->loaded) {
return;
}
$this->eventLogger->start('route:load:' . $requestedApp, 'Loading Routes for ' . $requestedApp);
if (is_null($app)) {
$this->loaded = true;
$routingFiles = $this->getRoutingFiles();
foreach (\OC_App::getEnabledApps() as $enabledApp) {
$this->loadAttributeRoutes($enabledApp);
}
} else {
if (isset($this->loadedApps[$app])) {
return;
}
$appPath = \OC_App::getAppPath($app);
$file = $appPath . '/appinfo/routes.php';
if ($appPath !== false && file_exists($file)) {
$routingFiles = [$app => $file];
} else {
$routingFiles = [];
}
if (in_array($app, \OC_App::getEnabledApps())) {
$this->loadAttributeRoutes($app);
}
}
foreach ($routingFiles as $app => $file) {
if (!isset($this->loadedApps[$app])) {
if (!\OC_App::isAppLoaded($app)) {
// app MUST be loaded before app routes
// try again next time loadRoutes() is called
$this->loaded = false;
continue;
}
$this->loadedApps[$app] = true;
$this->useCollection($app);
$this->requireRouteFile($file, $app);
$collection = $this->getCollection($app);
$this->root->addCollection($collection);
// Also add the OCS collection
$collection = $this->getCollection($app.'.ocs');
$collection->addPrefix('/ocsapp');
$this->root->addCollection($collection);
}
}
if (!isset($this->loadedApps['core'])) {
$this->loadedApps['core'] = true;
$this->useCollection('root');
$this->setupRoutes($this->getAttributeRoutes('core'), 'core');
require __DIR__ . '/../../../core/routes.php';
// Also add the OCS collection
$collection = $this->getCollection('root.ocs');
$collection->addPrefix('/ocsapp');
$this->root->addCollection($collection);
}
if ($this->loaded) {
$collection = $this->getCollection('ocs');
$collection->addPrefix('/ocs');
$this->root->addCollection($collection);
}
$this->eventLogger->end('route:load:' . $requestedApp);
}
Looks like a different version, which I do not dare to modyfy.
Is it safe to upgrade to NC30 and will it solve the issue?
Anything else I can do to fix this?