No Access to Files

Nextcloud version: 22.2.0.2
Operating system and version: Raspberry Pi OS (Debian 10)
Webserver: Apache2
PHP version: 7.4
Is this the first time you’ve seen this error?: Yup

Problem:
NC “Files” App results in an Internal Server Error

Description:
As it says, trying to access my files takes me straight to the “Internal Server Error” page.
ALL my other apps work just file, eg. Music, Notes, Calendar, etc.

The output of your Nextcloud log in Admin > Logging:

Error	index	Exception: Class 'OCP\User' not found

    /var/www/nextcloud/lib/private/AppFramework/App.php - line 156:

    OC\AppFramework\Http\Dispatcher->dispatch()

    /var/www/nextcloud/lib/private/Route/Router.php - line 301:

    OC\AppFramework\App::main()

    /var/www/nextcloud/lib/base.php - line 1000:

    OC\Route\Router->match()

    /var/www/nextcloud/index.php - line 36:

    OC::handleRequest()

Caused by Error: Class 'OCP\User' not found

    /var/www/nextcloud/apps/files/lib/Controller/ViewController.php - line 136:

    include()

    /var/www/nextcloud/apps/files/lib/Controller/ViewController.php - line 276:

    OCA\Files\Controller\ViewController->renderScript()

    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 217:

    OCA\Files\Controller\ViewController->index()

    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 126:

    OC\AppFramework\Http\Dispatcher->executeController()

    /var/www/nextcloud/lib/private/AppFramework/App.php - line 156:

    OC\AppFramework\Http\Dispatcher->dispatch()

    /var/www/nextcloud/lib/private/Route/Router.php - line 301:

    OC\AppFramework\App::main()

    /var/www/nextcloud/lib/base.php - line 1000:

    OC\Route\Router->match()

    /var/www/nextcloud/index.php - line 36: 

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

<?php
$CONFIG = array (
  'instanceid' => '###',
  'passwordsalt' => '###',
  'secret' => '###',
  'trusted_domains' => 
  array (
    0 => '###',
    1 => 'localhost',
    2 => '###',
    3 => '###',
  ),
  'datadirectory' => '/###/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '22.2.0.2',
  'overwrite.cli.url' => '###',
  'dbname' => 'nextclouddb',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextclouduser',
  'dbpassword' => '###',
  'installed' => true,
  'maintenance' => false,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 1.5,
  ),
  'htaccess.RewriteBase' => '/nextcloud',
  'theme' => '',
  'loglevel' => 0,
  'mail_smtpmode' => 'sendmail',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'app_install_overwrite' => 
  array (
    0 => 'files_retention',
    1 => 'dropit',
    2 => 'files_clipboard',
    3 => 'ocr',
    4 => 'twofactor_admin',
    5 => 'twofactor_totp',
    6 => 'files_trackdownloads',
    7 => 'flowupload',
    8 => 'previewgenerator',
  ),
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'has_internet_connection' => true,
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' => 
  array (
  ),
  'trashbin_retention_obligation' => 'auto',
  'default_phone_region' => '###',
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => '###',
);


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

Crickets, nothing in here

Perhaps unrelated, the output of the logfile in my nextcloud data directory is just a constant barrage & repetition of:

{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"apporder","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"camerarawpreviews","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"serverDI","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"The requested alias \"PreviewManager\" is deprecated. Please request \"OCP\\IPreview\" directly. This alias will be removed in a future Nextcloud version.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"dropit","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"extract","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"files_clipboard","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"files_sharing","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"geoblocker","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"maps","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"music","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"metadata","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"ocr","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"side_menu","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"socialsharing_email","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"socialsharing_twitter","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"3g23t4XnaKlGIn9szaUa","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":[IP ADDR],"user":"Admin","app":"twofactor_totp","method":"GET","url":"/nextcloud/apps/logreader/poll?lastReqId=AN9c9FM4Bctt4Dp4mMJt","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"22.2.0.2"}
{"reqId":"XVjdhgIM34zW5y07Kdz7","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":"","user":"--","app":"workflowengine","method":"","url":"--","message":"Flow activation: rules were requested for operation Automated tagging","userAgent":"--","version":"22.2.0.2"}
{"reqId":"XVjdhgIM34zW5y07Kdz7","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":"","user":"--","app":"workflowengine","method":"","url":"--","message":"No flow configurations is going to run Automated tagging","userAgent":"--","version":"22.2.0.2"}
{"reqId":"XVjdhgIM34zW5y07Kdz7","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":"","user":"--","app":"workflowengine","method":"","url":"--","message":"Flow activation: rules were requested for operation Automated tagging","userAgent":"--","version":"22.2.0.2"}
{"reqId":"XVjdhgIM34zW5y07Kdz7","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":"","user":"--","app":"workflowengine","method":"","url":"--","message":"No flow configurations is going to run Automated tagging","userAgent":"--","version":"22.2.0.2"}
{"reqId":"XVjdhgIM34zW5y07Kdz7","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":"","user":"--","app":"workflowengine","method":"","url":"--","message":"Flow activation: rules were requested for operation Automated tagging","userAgent":"--","version":"22.2.0.2"}
{"reqId":"XVjdhgIM34zW5y07Kdz7","level":0,"time":"2021-11-11T13:33:51+00:00","remoteAddr":"","user":"--","app":"workflowengine","method":"","url":"--","message":"No flow configurations is going to run Automated tagging","userAgent":"--","version":"22.2.0.2"}

That’s about all the info I have, Files is, least to say very important, so any help is appreciated.
Final note is I recently upgraded to NC 22 from 21. This is the first time I’m opening Files in months so while it was working in NC21, I can’t guarantee it was working just before updating.

Uninstall the app DropIt. Nice app but only supported till Nextcloud 18.

Exception: Class 'OCP\User' not found

2 Likes

Wow!
That worked flawlessly, thank you for the assistance good Sir :slight_smile:

I should’ve known better than to use an unsupported app, it worked find on NC 21, but alas, all good things come to an end.

1 Like

Instead of DropIt I defined a few folders with two links I manage in a text file.

Unbenannt

Unbenannt2

For upload/modify i use the first link (without authentication).
For download from other person i use the second link.
From time to time i change the links or i use multiple ones.

The links can be manage e.g. in a md.-file in nextcloud.

1 Like

Hmm, I see. I’ll take a look into it.

Dude thank you so much this random forum from 2 years ago saved me you’re great lol.

1 Like