nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.9k stars 4.01k forks source link

NC22 Beta3: Class 'OCP\User' not found when DropIt was installed and activated. #27376

Closed lars-becker closed 3 years ago

lars-becker commented 3 years ago

Steps to reproduce

  1. Upgrading vom NC 21 to 22 beta 3 with installed and acitivated DropIt
  2. Opening the files module (app/files)
  3. Witness Server Error

Expected behaviour

Displaying files and folders in the files root.

Actual behaviour

Der Server konnte die Anfrage nicht fertig stellen.

Sollte dies erneut auftreten, sende bitte die nachfolgenden technischen Einzelheiten an Deinen Server-Administrator.

Weitere Details können im Server-Protokoll gefunden werden.
Technische Details

    Entfernte Adresse: *.*.*.*
    EAcjNRcOAZHPHJQxv5bj
    Exception
    0
    Class 'OCP\User' not found
    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php
    159

Trace

#0 /var/www/nextcloud/lib/private/AppFramework/App.php(157): OC\AppFramework\Http\Dispatcher->dispatch()
#1 /var/www/nextcloud/lib/private/Route/Router.php(304): OC\AppFramework\App::main()
#2 /var/www/nextcloud/lib/base.php(998): OC\Route\Router->match()
#3 /var/www/nextcloud/index.php(37): OC::handleRequest()
#4 {main}

Vorige

#0 /var/www/nextcloud/apps/files/lib/Controller/ViewController.php(135): include()
#1 /var/www/nextcloud/apps/files/lib/Controller/ViewController.php(274): OCA\Files\Controller\ViewController->renderScript()
#2 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(218): OCA\Files\Controller\ViewController->index()
#3 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(127): OC\AppFramework\Http\Dispatcher->executeController()
#4 /var/www/nextcloud/lib/private/AppFramework/App.php(157): OC\AppFramework\Http\Dispatcher->dispatch()
#5 /var/www/nextcloud/lib/private/Route/Router.php(304): OC\AppFramework\App::main()
#6 /var/www/nextcloud/lib/base.php(998): OC\Route\Router->match()
#7 /var/www/nextcloud/index.php(37): OC::handleRequest()
#8 {main}

### Server configuration
**Operating system:**
Ubuntu 18.04.5 LTS (Bionic Beaver)

**Web server:**
2.4.46-4+deb.sury.org+1+ubuntu18.04.1+deb.sury.org+5 

**Database:**
5.7.34-0ubuntu0.18.04.1

**PHP version
2:8.0+82+ubuntu18.04.1+deb.sury.org+1:**

**Nextcloud version:** (see Nextcloud admin page)
22.0.0.6 (beta 3)

**Updated from an older Nextcloud/ownCloud or fresh install:**
Updated since ownCloud 5 or 6.

**List of activated apps:**
<details>
<summary>App list</summary>

Nextcloud configuration:

Config report ``` { "system": { "maintenance": false, "config_is_read_only": false, "installed": true, "version": "22.0.0.6", "share_folder": "\/Shared\/", "sharing.maxAutocompleteResults": 50, "sharing.minSearchStringLength": 2, "sharing.enable_share_accept": true, "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 6379 }, "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "dbname": "***REMOVED SENSITIVE VALUE***", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "forcessl": true, "blacklisted_files": [ ".htaccess" ], "theme": "", "default_language": "de", "3rdpartyroot": "", "3rdpartyurl": "", "defaultapp": "apporder", "knowledgebaseenabled": false, "knowledgebaseurl": "https:\/\/api.owncloud.com\/v1", "appstoreenabled": true, "appstoreurl": "https:\/\/apps.nextcloud.com\/api\/v1", "activity_expire_days": 186, "mail_smtpdebug": false, "mail_smtpmode": "sendmail", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "mail_smtptimeout": 10, "mail_smtpauthtype": "LOGIN", "trashbin_retention_obligation": "180, auto", "allow_user_to_change_display_name": true, "appcodechecker": true, "updatechecker": true, "log_type": "syslog", "logfile": "\/tmp\/nextcloud.log", "logfilemode": 416, "loglevel": 2, "syslog_tag": "Nextcloud", "remember_login_cookie_lifetime": 1209600, "session_lifetime": 86400, "xframe_restriction": true, "apps_paths": [ { "path": "\/var\/www\/nextcloud\/apps\/", "url": "\/apps", "writable": true } ], "customclient_desktop": "", "customclient_android": "", "customclient_ios": "", "instanceid": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "***" ], "appstore.experimental.enabled": true, "debug": true, "log_rotate_size": 1048576, "singleuser": false, "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mysql.utf8mb4": true, "updater.release.channel": "beta", "preview_libreoffice_path": "\/usr\/bin\/libreoffice", "enable_previews": true, "preview_max_x": 800, "preview_max_y": 800, "enabledPreviewProviders": [ "OC\\Preview\\PNG", "OC\\Preview\\JPEG", "OC\\Preview\\GIF", "OC\\Preview\\HEIC", "OC\\Preview\\BMP", "OC\\Preview\\XBitmap", "OC\\Preview\\MP3", "OC\\Preview\\TXT", "OC\\Preview\\MarkDown", "OC\\Preview\\OpenDocument", "OC\\Preview\\Krita", "OC\\Preview\\MSOffice2003", "OC\\Preview\\MSOffice2007", "OC\\Preview\\MSOfficeDoc", "OC\\Preview\\PDF", "OC\\Preview\\Postscript", "OC\\Preview\\StarOffice", "OC\\Preview\\SVG", "OC\\Preview\\Font" ], "twofactor_enforced": "false", "twofactor_enforced_groups": [], "twofactor_enforced_excluded_groups": [], "skeletondirectory": "", "app_install_overwrite": [ "apporder", "deck", "calendar", "news", "dashboard", "qownnotesapi", "theming_customcss", "files_retention", "files_readmemd", "dropit", "workflow_pdf_converter", "caniupdate", "contacts", "maps", "ojsxc", "spreed", "files_linkeditor", "unsplash", "files_trackdownloads", "social", "files_frommail", "phonetrack", "circles", "files_lock", "impersonate", "bbb", "twofactor_admin", "twofactor_u2f", "twofactor_totp", "richdocuments", "groupfolders", "forms" ], "overwrite.cli.url": "***", "data-fingerprint": "7921b76ed34d1840b29754d584250194", "logtimezone": "Europe\/Berlin", "activity_use_cached_mountpoints": true, "has_rebuilt_cache": true, "simpleSignUpLink.shown": true, "default_phone_region": "DE", "updater.secret": "***REMOVED SENSITIVE VALUE***" } } ```

Logs

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` Jun 04 12:46:48 jarvis Nextcloud[6733]: {"reqId":"EAcjNRcOAZHPHJQxv5bj","level":3,"time":"2021-06-04T12:46:48+02:00","remoteAddr":"***","user":"lars","app":"index","method":"GET","url":"/index.php/apps/files/","message":"{\"Exception\":\"Exception\",\"Message\":\"Class 'OCP\\\\User' not found\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/App.php\",\"line\":157,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Route/Router.php\",\"line\":304,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\"},{\"file\":\"/var/www/nextcloud/lib/base.php\",\"line\":998,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/index.php\",\"line\":37,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\"}],\"File\":\"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"Line\":159,\"Previous\":{\"Exception\":\"Error\",\"Message\":\"Class 'OCP\\\\User' not found\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/nextcloud/apps/files/lib/Controller/ViewController.php\",\"line\":135,\"function\":\"include\"},{\"file\":\"/var/www/nextcloud/apps/files/lib/Controller/ViewController.php\",\"line\":274,\"function\":\"renderScript\",\"class\":\"OCA\\\\Files\\\\Controller\\\\ViewController\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":218,\"function\":\"index\",\"class\":\"OCA\\\\Files\\\\Controller\\\\ViewController\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":127,\"function\":\"executeController\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/App.php\",\"line\":157,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Route/Router.php\",\"line\":304,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\"},{\"file\":\"/var/www/nextcloud/lib/base.php\",\"line\":998,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/index.php\",\"line\":37,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\"}],\"File\":\"/var/www/nextcloud/apps/dropit/list.php\",\"Line\":4},\"CustomMessage\":\"--\"}","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0","version":"22.0.0.6"} ```
szaimen commented 3 years ago

Hi, thanks for your report! Does your instance work again if you disable the dropit app?

lars-becker commented 3 years ago

Hi, thanks for your report! Does your instance work again if you disable the dropit app?

That fixes the problem.

szaimen commented 3 years ago

Thanks! So then this needs to get fixed in the dropit app. https://github.com/rullzer/dropit Please create an issue there! Thank you :)