NC24.0.1 Files and WebDAV doesn't work after update

Nextcloud version (eg, 20.0.5): 24.0.1
Operating system and version (eg, Ubuntu 20.04): Debian 10
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.38
PHP version (eg, 7.4): PHP 8.0.19

The issue you are facing:
Yesterday, my NC showed an available update at the server settings and I tried to install it. First of all, I updated from 23.0.4 to 23.0.5 without errors, and then showed another update to 24.0.1 version, installed withour errors but with some incompatible apps.

Once all was updated, I checked the security controls of the dashboard and it showed that opcache is needed and a “x-download-options” header is missing. I tried to add it without any shown errors and the checks work fine.

When I tried to access to the website with the main domain, it doesn’t works and show a message of an internal error and inviting to check the logs. Then I tried to access with another domain configured in my server and it works without the error message, but when I tried to access my files, they are not working. Using the website, I can list the folders at the first level of my user files folder, but when I click one the page refreshes without showing the content and showing again the same. Also, trying with WebDAV, Windows or Android client doesn’t work too because they can’t connect to my NC server.

I also tried to remove the “x-download-options” header, repair tree, repair installation, scan folders… with the OCC commands but I could not repair the problem.

Can you help me to solve this problem? Any information you need, do not hesitate to ask for them.
Thank you

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

Steps to replicate it:

(what I have did)

  1. Update from 23.0.4 to 23.0.5, and then to 24.0.1
  2. Add the “x-download-options” to the apache configuration like the Nginx recommended at the config guide (with the noopen)
  3. Add php-opcache package to the system

The output of your Nextcloud log in Admin > Logging:
Error trying to access the main domain:

[index] Error: Exception: call_user_func_array(): Argument #1 ($callback) must be a valid callback, class OC\Files\Node\File does not have a method "newFolder" in file '/home/termincloud/public_html/lib/private/Files/Node/LazyFolder.php' line 72 at <<closure>>

0. /home/termincloud/public_html/lib/private/AppFramework/App.php line 172
   OC\AppFramework\Http\Dispatcher->dispatch()
1. /home/termincloud/public_html/lib/private/Route/Router.php line 298
   OC\AppFramework\App::main()
2. /home/termincloud/public_html/lib/base.php line 1023
   OC\Route\Router->match()
3. /home/termincloud/public_html/index.php line 36
   OC::handleRequest()

GET /index.php/apps/dashboard/
from 79.150.221.242 by Termindiego25 at 2022-05-25T09:45:19+00:00

Error trying to access files:

[no app in context] Información: Deprecated event type for OCA\Files::loadAdditionalScripts: Symfony\Component\EventDispatcher\GenericEvent is used

GET /index.php/apps/files/
from 79.150.221.242 by TerminCloud at 2022-05-25T09:48:24+00:00

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

The output of your Apache/nginx/system log in /var/log/____:
Link to Apache access log
Link to Apache error log

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.
Link to the downloaded log file

EDIT:
I have found that the error with the main domain is affecting to all domains, but just users who are not administrators. If you remove cookies and log in with and admin account the internal error not appears and you can access to the website (but files error is still there)

I have opened an issue on GitHub. You can take a look in order to get more information: