镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[Bug]: Server Error on Files app and User Settings 24.0.0 #32304

Closed

Description

@nektdev

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

The other day I successfully updated from 23.0.3 to 23.0.4 and then, also without any difficulties, to 24.0.0. While in 23.0.4 everything behaved as expected. Since updating to 24.0.0 I am locked out of either Talk or Files apps and cannot access user settings.

Once in 24.0.0 I noticed Internal Server Errors when trying to access Files app or Settings. Below are the respective exceptions.

1. /apps/files:

"Exception","Message":"Call to undefined method OC\\Files\\Node\\File::getFreeSpace() in file '/home/hub/sites/nextcloud/apps/spreed/lib/TInitialState.php'

2. /settings/user:
"Exception","Message":"call_user_func_array() expects parameter 1 to be a valid callback, class 'OC\\Files\\Node\\File' does not have a method 'getRecent' in file '/home/hub/sites/nextcloud/lib/private/Files/Node/LazyFolder.php' line 72","Code":0,"Trace":[{"file":"/home/hub/sites/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"

(both log entries in full in 'Nextcloud Logs' section)

When I disabled Talk (spreed) app I was again able to access 1. Files app and use as expected. This does not change behaviour of 2. Settings, which still crashes the server with the exception referenced above.

Steps to reproduce

  1. Update from 23.0.4 to 24.0.0, update Talk (spreed) to 14.0.1
  2. Sign in via browser client and access yournextcloud/apps/files or yournextcloud/settings/user to experience Internal Several Error
  3. Disable Talk in yournextcloud//settings/apps and successfully access yournextcloud/apps/files
  4. Accessing yournextcloud/settings/user still crashes the server.

Expected behavior

Files app and user settings would load as usual.

Installation method

Manual installation

Operating system

Debian/Ubuntu

PHP engine version

PHP 7.4

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Updated to a major version (ex. 22.2.3 to 23.0.1)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "www.hub.animorph.coop",
            "hub.animorph.coop"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "24.0.0.12",
        "overwrite.cli.url": "https:\/\/hub.animorph.coop",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_smtpsecure": "",
        "mail_smtpauth": "False",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": 2,
        "memcache.local": "\\OC\\Memcache\\Memcached",
        "app_install_overwrite": [
            "drawio",
            "keeweb",
            "apporder"
        ],
        "updater.release.channel": "beta",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": "6379"
        },
        "default_phone_region": "GB",
        "theme": ""
    }
}

List of activated Apps

Enabled:
  - accessibility: 1.10.0
  - activity: 2.16.0
  - apporder: 0.15.0
  - audioplayer: 3.3.0
  - calendar: 3.3.0
  - circles: 24.0.0
  - cloud_federation_api: 1.7.0
  - collectives: 1.1.0
  - comments: 1.14.0
  - contacts: 4.1.0
  - contactsinteraction: 1.5.0
  - cospend: 1.4.7
  - dashboard: 7.4.0
  - dav: 1.22.0
  - deck: 1.7.0
  - event_update_notification: 1.5.0
  - federatedfilesharing: 1.14.0
  - federation: 1.14.0
  - files: 1.19.0
  - files_pdfviewer: 2.5.0
  - files_rightclick: 1.3.0
  - files_sharing: 1.16.2
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - firstrunwizard: 2.13.0
  - forms: 2.5.0
  - integration_discourse: 1.0.2
  - integration_gitlab: 1.0.3
  - integration_twitter: 1.0.2
  - keeweb: 0.6.8
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - mail: 1.12.0
  - nextcloud_announcements: 1.13.0
  - notifications: 2.12.0
  - notify_push: 0.4.0
  - oauth2: 1.12.0
  - onlyoffice: 7.3.4
  - password_policy: 1.14.0
  - photos: 1.6.0
  - polls: 3.7.0-beta2
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - recommendations: 1.3.0
  - serverinfo: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - socialsharing_email: 2.5.0
  - support: 1.7.0
  - survey_client: 1.12.0
  - systemtags: 1.14.0
  - tasks: 0.14.4
  - text: 3.5.1
  - theming: 1.15.0
  - twofactor_backupcodes: 1.13.0
  - updatenotification: 1.14.0
  - user_status: 1.4.0
  - viewer: 1.8.0
  - weather_status: 1.4.0
  - workflowengine: 2.6.0
Disabled:
  - admin_audit
  - analytics: 4.2.1
  - drawio: 1.0.2
  - encryption
  - end_to_end_encryption: 1.9.1
  - files_external
  - flow_notifications: 1.2.0
  - integration_whiteboard: 0.0.15
  - podcast: 0.0.1
  - side_menu: 2.3.5
  - spreed: 14.0.1
  - user_ldap
  - workflow_ocr: 1.24.0
  - workflow_pdf_converter: 1.8.0
  - workflow_script: 1.8.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"IQdj0JglAK7Azmz81D8s","level":3,"time":"2022-05-08T14:37:47+00:00","remoteAddr":"82.132.214.142","user":"sz","app":"index","method":"GET","url":"/apps/files/","message":"Call to undefined method OC\\Files\\Node\\File::getFreeSpace() in file '/home/hub/sites/nextcloud/apps/spreed/lib/TInitialState.php' line 130","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0","version":"24.0.0.12","exception":{"Exception":"Exception","Message":"Call to undefined method OC\\Files\\Node\\File::getFreeSpace() in file '/home/hub/sites/nextcloud/apps/spreed/lib/TInitialState.php' line 130","Code":0,"Trace":[{"file":"/home/hub/sites/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/hub/sites/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/hub/sites/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/hub/sites/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/hub/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":165,"Previous":{"Exception":"Error","Message":"Call to undefined method OC\\Files\\Node\\File::getFreeSpace()","Code":0,"Trace":[{"file":"/home/hub/sites/nextcloud/apps/spreed/lib/Files/TemplateLoader.php","line":96,"function":"publishInitialStateForUser","class":"OCA\\Talk\\Files\\TemplateLoader","type":"->"},{"file":"/home/hub/sites/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OCA\\Talk\\Files\\TemplateLoader","type":"->"},{"file":"/home/hub/sites/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/home/hub/sites/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/home/hub/sites/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/home/hub/sites/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/home/hub/sites/nextcloud/apps/files_sharing/list.php","line":47,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/home/hub/sites/nextcloud/apps/files/lib/Controller/ViewController.php","line":136,"args":["/home/hub/sites/nextcloud/apps/files_sharing/list.php"],"function":"include"},{"file":"/home/hub/sites/nextcloud/apps/files/lib/Controller/ViewController.php","line":276,"function":"renderScript","class":"OCA\\Files\\Controller\\ViewController","type":"->"},{"file":"/home/hub/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"index","class":"OCA\\Files\\Controller\\ViewController","type":"->"},{"file":"/home/hub/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/hub/sites/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/hub/sites/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/hub/sites/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/hub/sites/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/hub/sites/nextcloud/apps/spreed/lib/TInitialState.php","Line":130},"CustomMessage":"--"}}

{"reqId":"quEfkdIgviZnwRpPu7rL","level":3,"time":"2022-05-08T15:03:28+00:00","remoteAddr":"82.132.214.142","user":"sz","app":"index","method":"GET","url":"/apps/recommendations/api/recommendations","message":"call_user_func_array() expects parameter 1 to be a valid callback, class 'OC\\Files\\Node\\File' does not have a method 'getRecent' in file '/home/hub/sites/nextcloud/lib/private/Files/Node/LazyFolder.php' line 72","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0","version":"24.0.0.12","exception":{"Exception":"Exception","Message":"call_user_func_array() expects parameter 1 to be a valid callback, class 'OC\\Files\\Node\\File' does not have a method 'getRecent' in file '/home/hub/sites/nextcloud/lib/private/Files/Node/LazyFolder.php' line 72","Code":0,"Trace":[{"file":"/home/hub/sites/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/hub/sites/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/hub/sites/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/hub/sites/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/hub/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":165,"Previous":{"Exception":"TypeError","Message":"call_user_func_array() expects parameter 1 to be a valid callback, class 'OC\\Files\\Node\\File' does not have a method 'getRecent'","Code":0,"Trace":[{"file":"/home/hub/sites/nextcloud/lib/private/Files/Node/LazyFolder.php","line":72,"function":"call_user_func_array"},{"file":"/home/hub/sites/nextcloud/lib/private/Files/Node/LazyFolder.php","line":510,"function":"__call","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/home/hub/sites/nextcloud/apps/recommendations/lib/Service/RecentlyEditedFilesSource.php","line":69,"function":"getRecent","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/home/hub/sites/nextcloud/apps/recommendations/lib/Service/RecommendationService.php","line":90,"function":"getMostRecentRecommendation","class":"OCA\\Recommendations\\Service\\RecentlyEditedFilesSource","type":"->"},{"function":"OCA\\Recommendations\\Service\\{closure}","class":"OCA\\Recommendations\\Service\\RecommendationService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/hub/sites/nextcloud/apps/recommendations/lib/Service/RecommendationService.php","line":91,"function":"array_reduce"},{"file":"/home/hub/sites/nextcloud/apps/recommendations/lib/Controller/RecommendationController.php","line":70,"function":"getRecommendations","class":"OCA\\Recommendations\\Service\\RecommendationService","type":"->"},{"file":"/home/hub/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"index","class":"OCA\\Recommendations\\Controller\\RecommendationController","type":"->"},{"file":"/home/hub/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/hub/sites/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/hub/sites/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/hub/sites/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/hub/sites/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/hub/sites/nextcloud/lib/private/Files/Node/LazyFolder.php","Line":72},"CustomMessage":"--"}}

Additional info

No response

Activity

  1. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on May 8, 2022
  2. changed the title [-][Bug]: Server Error on Files app and User Settings[/-] [+][Bug]: Server Error on Files app and User Settings 24.0.0[/+] on May 8, 2022
  3. mem89de commented on May 9, 2022

    @mem89de

    I am struggeling with the same issue.

  4. come-nc commented on May 9, 2022

    @come-nc
    Contributor

    Does disabling recommendations application help?

  5. nektdev commented on May 9, 2022

    @nektdev
    Author

    @come-nc it does not.

  6. come-nc commented on May 9, 2022

    @come-nc
    Contributor

    From what I gather it seems getUserFolder is returning a File instead of a Folder.

    Can you try editing lib/private/Files/Node/Root.php and replace

    	public function getUserFolder($userId) {
    

    by

    	public function getUserFolder($userId): \OCP\Files\Folder {
    

    It will not fix the error, but the new trace should be clearer as to where the problem lies.

  7. nektdev commented on May 9, 2022

    @nektdev
    Author

    @come-nc the log record appears to be the same after the change you suggested.

  8. nektdev commented on May 9, 2022

    @nektdev
    Author

    Also just noticed, that, even with Talk disabled, some areas of Files are not accessible due to the following exception:
    "Error","Message":"disk_free_space(): No such file or directory at /home/hub/sites/nextcloud/lib/private/Files/Storage/Local.php#395

  9. solracsf commented on May 9, 2022

    @solracsf
    Member

    About this last error:
    #32178 (comment)

  10. mrmvn commented on May 10, 2022

    @mrmvn

    Having the same issue here following update from 23.0.4 to 24.0.0, running Debian 11 and default user-backend.
    Disabling talk does enable access to files app but even then files are still inaccessible.

  11. alxzhdanov commented on May 12, 2022

    @alxzhdanov

    Same problem. After update 24.0.0.12 . Can't access files. But settings of user open succesfully.

  12. PVince81 commented on May 12, 2022

    @PVince81
    Member

    please first test with this fix: #32335

    if the problem persists, run this query:

    • select * from oc_filecache fc join oc_storages s on s.numeric_id=fc.storage left join oc_mimetypes m on m.id=fc.mimetype where name='' and s.id like '%youruserid%';

    I suspect that perhaps the mime type of your storage root entry is wrong for some reason.

  13. alxzhdanov commented on May 13, 2022

    @alxzhdanov

    I make changes in OC_Helper.php from fix 32335, but no effect. When i try open files app in browser i get page without files. And in right top corner shows error msg:

    This directory is unavailable, please check the logs or contact the administrator

    This is result of your query:

    select * from oc_filecache fc join oc_storages s on s.numeric_id=fc.storage left join oc_mimetypes m on m.id=fc.mimetype where name='' and s.id like '%az%';
    
    5	2		d41d8cd98f00b204e9800998ecf8427e	-1		2	1	10581341212	1651822456	1595401826	0	0	6274cf7903e04	23		2	home::az	1	NULL	2	httpd/unix-directory	
    
    
  14. 9 remaining items

  15. CarlSchwan commented on Jul 10, 2022

    @CarlSchwan
    Member

    @chriscroome Best way is to download https://github.com/proxy/patch-diff.githubusercontent.com/raw/nextcloud/server/pull/32961.diff and then use patch -p1 < 32961.diff

    if something goes wrong, you can revert with patch -R -p1 < 32961.diff

  16. chriscroome commented on Jul 10, 2022

    @chriscroome

    Thanks @CarlSchwan however I can't now replicate the issue -- I have a Nextcloud 24.0.2 development server but it appears to be working without the bugs and the client sites that did have this problem have been rolled back to 23.0.6. The next time a client upgrades a Nextcloud server and we have this problem again I will apply your patch to see if it provides some useful debugging information.

  17. mem89de commented on Jul 10, 2022

    @mem89de

    @chriscroome Best way is to download https://github.com/proxy/patch-diff.githubusercontent.com/raw/nextcloud/server/pull/32961.diff and then use patch -p1 < 32961.diff

    if something goes wrong, you can revert with patch -r -p1 < 32961.diff

    I tried this. The problem still exists, but I don't see any additional logs (yes, i changed the log level in the viewer).

    As I am not a PHP developer I'd ask, if this might be related to memcache? (My idea is, it still has cached the old code, so no log lines are produced)

  18. mem89de commented on Jul 10, 2022

    @mem89de

    if something goes wrong, you can revert with patch -r -p1 < 32961.diff

    This should be patch -R -p1 < 32961.diff, shouldn't it?

  19. chriscroome commented on Jul 11, 2022

    @chriscroome

    this might be related to memcache?

    I've been removing memcached from servers and switching to apcu and I believe that we have had servers that have been running memcached and ones that haven't that have had this same problem.

  20. CarlSchwan commented on Jul 11, 2022

    @CarlSchwan
    Member

    if something goes wrong, you can revert with patch -r -p1 < 32961.diff

    This should be patch -R -p1 < 32961.diff, shouldn't it?

    it is, I edited my previous comment

  21. CarlSchwan commented on Jul 11, 2022

    @CarlSchwan
    Member

    this might be related to memcache?

    I've been removing memcached from servers and switching to apcu and I believe that we have had servers that have been running memcached and ones that haven't that have had this same problem.

    Could you try with Redis? Generally, I would recommend these memcache configs:

    'memcache.local' => '\OC\Memcache\APCu',
    'memcache.distributed' => '\OC\Memcache\Redis',
    'memcache.locking' => '\OC\Memcache\Redis',
    

    Memcached is unfortunately not very good and should only be used when the other are not available.

    See https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html#organizations-with-single-server-and-clustered-setups

  22. mem89de commented on Jul 16, 2022

    @mem89de

    Could you try with Redis? Generally, I would recommend these memcache configs:

    Nope sorry. This is not possible as I am running my nextcloud instance on a simple web host by lima-city.de

  23. chriscroome commented on Jul 24, 2022

    @chriscroome

    Thanks @CarlSchwan

    Could you try with Redis?

    I believe have switched all the Nextcloud servers we host from Memcache to Redis.

    @nektdev has this reolsolved this issue?

    Memcached is unfortunately not very good

    Does the documentation need updating?

    Memcached is a reliable oldtimer...

  24. mem89de commented on Jul 29, 2022

    @mem89de

    This issue seems to be fixed for me since i updated to 24.0.3.

  25. nektdev commented on Aug 9, 2022

    @nektdev
    Author

    Many thanks to everyone involved!

    @chriscroome the issue is not there anymore, successfully updated to 24.0.1, now on 24.0.3 🚀

  26. PVince81 commented on Aug 9, 2022

    @PVince81
    Member

    thanks for confirming!

  27. added a commit that references this issue on May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions