Repository navigation
[Bug]: Server Error on Files app and User Settings 24.0.0 #32304
Description
⚠️ 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
- Update from 23.0.4 to 24.0.0, update Talk (spreed) to 14.0.1
- Sign in via browser client and access yournextcloud/apps/files or yournextcloud/settings/user to experience Internal Several Error
- Disable Talk in yournextcloud//settings/apps and successfully access yournextcloud/apps/files
- 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.0Nextcloud 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
[-][Bug]: Server Error on Files app and User Settings[/-][+][Bug]: Server Error on Files app and User Settings 24.0.0[/+]mem89de commentedon May 9, 2022
I am struggeling with the same issue.
come-nc commentedon May 9, 2022
Does disabling
recommendationsapplication help?nektdev commentedon May 9, 2022
@come-nc it does not.
come-nc commentedon May 9, 2022
From what I gather it seems
getUserFolderis returning aFileinstead of aFolder.Can you try editing
lib/private/Files/Node/Root.phpand replaceby
It will not fix the error, but the new trace should be clearer as to where the problem lies.
nektdev commentedon May 9, 2022
@come-nc the log record appears to be the same after the change you suggested.
nektdev commentedon May 9, 2022
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#395solracsf commentedon May 9, 2022
About this last error:
#32178 (comment)
mrmvn commentedon May 10, 2022
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.
alxzhdanov commentedon May 12, 2022
Same problem. After update 24.0.0.12 . Can't access files. But settings of user open succesfully.
PVince81 commentedon May 12, 2022
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.
alxzhdanov commentedon May 13, 2022
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 is result of your query:
9 remaining items
CarlSchwan commentedon Jul 10, 2022
@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.diffif something goes wrong, you can revert with
patch -R -p1 < 32961.diffchriscroome commentedon Jul 10, 2022
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.
mem89de commentedon Jul 10, 2022
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)
mem89de commentedon Jul 10, 2022
This should be
patch -R -p1 < 32961.diff, shouldn't it?chriscroome commentedon Jul 11, 2022
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.
CarlSchwan commentedon Jul 11, 2022
it is, I edited my previous comment
CarlSchwan commentedon Jul 11, 2022
Could you try with Redis? Generally, I would recommend these memcache configs:
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
mem89de commentedon Jul 16, 2022
Nope sorry. This is not possible as I am running my nextcloud instance on a simple web host by lima-city.de
chriscroome commentedon Jul 24, 2022
Thanks @CarlSchwan
I believe have switched all the Nextcloud servers we host from Memcache to Redis.
@nektdev has this reolsolved this issue?
Does the documentation need updating?
mem89de commentedon Jul 29, 2022
This issue seems to be fixed for me since i updated to 24.0.3.
nektdev commentedon Aug 9, 2022
Many thanks to everyone involved!
@chriscroome the issue is not there anymore, successfully updated to 24.0.1, now on 24.0.3 🚀
PVince81 commentedon Aug 9, 2022
thanks for confirming!
Make it easier to debug issue #32304
Merge pull request #32961 from nextcloud/more-debug-lazyuserfolder