"files" app not working after updating to 29

Nextcloud version: 29.0.1 RC1 (commit 7eb718c)
Operating system and version: fedora 39
Apache or nginx version: httpd-2.4.59-2.fc39.x86_64
PHP version: php-8.2.18-1.fc39.x86_64

The issue you are facing:
The files app is no longer working after upgrading to 29 (from 28)

Is this the first time you’ve seen this error?: Y

Steps to replicate it:

  1. I updated from git by checking-out the branch stable29 (from stable28)
  2. I then ran occ upgrade
  3. Since then, the files app is no longer working (but some admins screens do).

The output of your Nextcloud logs:

{"reqId":"ID1","level":3,"time":"2024-05-20T19:54:30+02:00","remoteAddr":"IP","user":"user","app":"index","method":"GET","url":"/index.php/apps/files/","message":"Class \"OCA\\Files\\Controller\\AjaxController\" does not exist","userAgent":"user_agent","version":"29.0.1.0","exception":{"Exception":"ReflectionException","Message":"Class \"OCA\\Files\\Controller\\AjaxController\" does not exist","Code":-1,"Trace":[{"file":"/home/webapps/nextcloud/lib/private/Route/Router.php","line":469,"function":"__construct","class":"ReflectionClass","type":"->"},{"file":"/home/webapps/nextcloud/lib/private/Route/Router.php","line":161,"function":"getAttributeRoutes","class":"OC\\Route\\Router","type":"->"},{"file":"/home/webapps/nextcloud/lib/private/Route/Router.php","line":279,"function":"loadRoutes","class":"OC\\Route\\Router","type":"->"},{"file":"/home/webapps/nextcloud/lib/private/Route/Router.php","line":330,"function":"findMatchingRoute","class":"OC\\Route\\Router","type":"->"},{"file":"/home/webapps/nextcloud/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/webapps/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/webapps/nextcloud/lib/private/Route/Router.php","Line":469,"message":"Class \"OCA\\Files\\Controller\\AjaxController\" does not exist","exception":{},"CustomMessage":"Class \"OCA\\Files\\Controller\\AjaxController\" does not exist"}}                                                   
{"reqId":"ID2","level":3,"time":"2024-05-20T19:54:31+02:00","remoteAddr":"IP","user":"user","app":"index","method":"GET","url":"/index.php/apps/files/preview-service-worker.js","message":"Class \"OCA\\Files\\Controller\\AjaxController\" does not exist","userAgent":"user_agent","version":"29.0.1.0","exception":{"Exception":"ReflectionException","Message":"Class \"OCA\\Files\\Controller\\AjaxController\" does not exist","Code":-1,"Trace":[{"file":"/home/webapps/nextcloud/lib/private/Route/Router.php","line":469,"function":"__construct","class":"ReflectionClass","type":"->"},{"file":"/home/webapps/nextcloud/lib/private/Route/Router.php","line":161,"function":"getAttributeRoutes","class":"OC\\Route\\Router","type":"->"},{"file":"/home/webapps/nextcloud/lib/private/Route/Router.php","line":279,"function":"loadRoutes","class":"OC\\Route\\Router","type":"->"},{"file":"/home/webapps/nextcloud/lib/private/Route/Router.php","line":330,"function":"findMatchingRoute","class":"OC\\Route\\Router","type":"->"},{"file":"/home/webapps/nextcloud/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/webapps/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/webapps/nextcloud/lib/private/Route/Router.php","Line":469,"message":"Class \"OCA\\Files\\Controller\\AjaxController\" does not exist","exception":{},"CustomMessage":"Class \"OCA\\Files\\Controller\\AjaxController\" does not exist"}}

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

<?php
$CONFIG = array (
REDACTED
);

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

"GET /index.php/apps/files/ HTTP/2.0" 500 289 "-" "user_agent"
"GET /favicon.ico HTTP/2.0" 404 12530 "-" "user_agent"
"GET /index.php/apps/files/preview-service-worker.js HTTP/2.0" 500 2403 "-" "user_agent"

So you run directly from git? Not sure that’s a really good idea, tbh.

Did you also update the submodules (git submodule update --init)?

See also Development environment — Nextcloud latest Developer Manual latest documentation

Hey, thanks for helping-out :slight_smile:

Indeed, and I’ve been running this way since back in the OC days

I did!

Could I be missing some of the shipped apps? I’ll double check that. Besides that, this is pretty much in line with what I got!

It’s totally possible, just wanted to point out it might not be the recommended way ;-).

Not totally sure what is causing the error you’re seeing. The AjaxController of the files app seems to be removed in Nextcloud 26 (server/apps/files/lib/Controller/AjaxController.php at stable25 · nextcloud/server · GitHub for the 25 version). It seems some app ist still referencing this.

Well, that was it! Somehow git left me with this (and many other) files hanging loose

git ls-files . --exclude-standard --others revealed them, and after a cleanup I’m back on my feet. Thanks for the help, this one can be considered close :slight_smile:

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.