notes icon indicating copy to clipboard operation
notes copied to clipboard

4.9.1/NC27.1.4 - Call to undefined method OCA\\Notes\\Service\\NoteUtil::getPathForUser()

Open sgofferj opened this issue 2 years ago • 1 comments

Please make a clear and concise description of what the bug is.

Nextcloud notes shows getting started screen in browser. Error message "Error from Nextcloud server: Reading notes from filesystem has failed. (Error)"

Steps to reproduce

  1. Open Notes?

Expected behaviour

Notes should display existing notes

Actual behaviour

Notes show the getting started screen

Screenshots

If applicable, add screenshots to help explain your problem.

Server

Please complete the following information.

  • Notes app version: 4.9.1
  • Nextcloud version: 27.1.4
  • OS: Docker
  • Web server: Nginx
  • PHP version: 8.2.13
  • Database: MySQL

Nextcloud configuration:

``` { "system": { "datadirectory": "***REMOVED SENSITIVE VALUE***", "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "cloud.gofferje.net" ], "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "forwarded_for_headers": [ "HTTP_X_FORWARDED_FOR" ], "overwrite.cli.url": "https:\/\/cloud.gofferje.net", "overwritehost": "cloud.gofferje.net", "overwriteprotocol": "https", "htaccess.RewriteBase": "\/", "dbtype": "mysql", "version": "27.1.4.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "simpleSignUpLink.shown": false, "theme": "", "maintenance": false, "default_phone_region": "FI", "asset-pipeline.enabled": false, "loglevel": 0, "trashbin_retention_obligation": "30, 35", "defaultapp": "dashboard", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpmode": "smtp", "mail_domain": "***REMOVED SENSITIVE VALUE***", "ldapIgnoreNamingRules": false, "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory", "mail_smtpsecure": "tls", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "587", "mysql.utf8mb4": true, "updater.release.channel": "stable", "enable_previews": true, "enabledPreviewProviders": [ "OC\\Preview\\PNG", "OC\\Preview\\JPEG", "OC\\Preview\\GIF", "OC\\Preview\\MP3", "OC\\Preview\\TXT", "OC\\Preview\\MarkDown", "OC\\Preview\\PDF" ], "rewrite_url": false, "app_install_overwrite": [ "files_downloadactivity", "files_external_gdrive", "mindmap_app", "dicomviewer", "ownbackup", "files_frommail", "ransomware_detection", "drawio", "carnet", "files_retention", "files_mindmap", "twofactor_totp", "riotchat", "workflow_script", "files_texteditor", "apporder", "impersonate", "files_markdown", "files_readmemd", "socialsharing_email", "cms_pico", "webhooks" ], "twofactor_enforced": "false", "twofactor_enforced_groups": [ "admin" ], "twofactor_enforced_excluded_groups": [], "has_rebuilt_cache": true, "mail_sendmailmode": "smtp", "memcache.local": "\\OC\\Memcache\\APCu", "apps_paths": [ { "path": "\/var\/www\/html\/apps", "url": "\/apps", "writable": false }, { "path": "\/var\/www\/html\/custom_apps", "url": "\/custom_apps", "writable": true } ], "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 6379, "timeout": 0, "dbindex": 0 } } } ```

Client

Please complete the following information.

  • Browser (incl. version): Firefox 121.0
  • OS: Ubuntu 22.04

Log files

{"reqId":"fqawI5wTfXWyELdnFn0b","level":3,"time":"2023-12-21T09:18:57+00:00","remoteAddr":"192.168.10.1","user":"sgofferj","app":"notes","method":"GET","url":"/apps/notes/notes","message":"Controller failed with Error","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0","version":"27.1.4.1","exception":{"Exception":"Error","Message":"Call to undefined method OCA\\Notes\\Service\\NoteUtil::getPathForUser()","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":62,"function":"getData","class":"OCA\\Notes\\Service\\Note","type":"->","args":[["etag","content"]]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":114,"function":"getNoteData","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":[["OCA\\Notes\\Service\\Note"],["etag","content"],["OCA\\Notes\\Db\\Meta",153]]},{"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":113,"function":"array_map","args":[["Closure"],["*** sensitive parameters replaced ***",["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",148]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",154]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",152]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",151]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",155]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",149]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",150]]]]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/NotesController.php","line":71,"function":"getNotesAndCategories","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":[0,["etag","content"]]},{"file":"/var/www/html/custom_apps/notes/lib/Service/Util.php","line":26,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":140,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::","args":[["Closure"]]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/NotesController.php","line":57,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":[["Closure"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"index","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":[0]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notes\\Controller\\NotesController"],"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notes\\Controller\\NotesController"],"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notes\\Controller\\NotesController","index",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["notes.notes.index"]]},{"file":"/var/www/html/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/notes/notes"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/notes/lib/Service/Note.php","Line":108,"message":"Controller failed with Error","exception":{},"CustomMessage":"Controller failed with Error"}}
{"reqId":"wmyCXPC9VohS8CYvGgua","level":3,"time":"2023-12-21T09:19:22+00:00","remoteAddr":"192.168.10.1","user":"sgofferj","app":"notes","method":"GET","url":"/apps/notes/notes","message":"Controller failed with Error","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0","version":"27.1.4.1","exception":{"Exception":"Error","Message":"Call to undefined method OCA\\Notes\\Service\\NoteUtil::getPathForUser()","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":62,"function":"getData","class":"OCA\\Notes\\Service\\Note","type":"->","args":[["etag","content"]]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":114,"function":"getNoteData","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":[["OCA\\Notes\\Service\\Note"],["etag","content"],["OCA\\Notes\\Db\\Meta",153]]},{"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":113,"function":"array_map","args":[["Closure"],["*** sensitive parameters replaced ***",["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",148]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",154]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",152]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",151]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",155]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",149]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",150]]]]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/NotesController.php","line":71,"function":"getNotesAndCategories","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":[0,["etag","content"]]},{"file":"/var/www/html/custom_apps/notes/lib/Service/Util.php","line":26,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":140,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::","args":[["Closure"]]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/NotesController.php","line":57,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":[["Closure"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"index","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":[0]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notes\\Controller\\NotesController"],"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notes\\Controller\\NotesController"],"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notes\\Controller\\NotesController","index",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["notes.notes.index"]]},{"file":"/var/www/html/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/notes/notes"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/notes/lib/Service/Note.php","Line":108,"message":"Controller failed with Error","exception":{},"CustomMessage":"Controller failed with Error"}}
{"reqId":"7Q7sMX1DuhK4LIQ1rV6r","level":3,"time":"2023-12-21T09:21:00+00:00","remoteAddr":"192.168.10.1","user":"sgofferj","app":"notes","method":"GET","url":"/apps/notes/notes","message":"Controller failed with Error","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0","version":"27.1.4.1","exception":{"Exception":"Error","Message":"Call to undefined method OCA\\Notes\\Service\\NoteUtil::getPathForUser()","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":62,"function":"getData","class":"OCA\\Notes\\Service\\Note","type":"->","args":[["etag","content"]]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":114,"function":"getNoteData","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":[["OCA\\Notes\\Service\\Note"],["etag","content"],["OCA\\Notes\\Db\\Meta",153]]},{"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":113,"function":"array_map","args":[["Closure"],["*** sensitive parameters replaced ***",["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",148]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",154]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",152]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",151]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",155]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",149]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",150]]]]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/NotesController.php","line":71,"function":"getNotesAndCategories","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":[0,["etag","content"]]},{"file":"/var/www/html/custom_apps/notes/lib/Service/Util.php","line":26,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":140,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::","args":[["Closure"]]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/NotesController.php","line":57,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":[["Closure"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"index","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":[0]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notes\\Controller\\NotesController"],"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notes\\Controller\\NotesController"],"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notes\\Controller\\NotesController","index",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["notes.notes.index"]]},{"file":"/var/www/html/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/notes/notes"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/notes/lib/Service/Note.php","Line":108,"message":"Controller failed with Error","exception":{},"CustomMessage":"Controller failed with Error"}}
{"reqId":"ayjdjqB3lJaLYLxQYQgJ","level":3,"time":"2023-12-21T09:24:44+00:00","remoteAddr":"192.168.10.1","user":"sgofferj","app":"notes","method":"GET","url":"/apps/notes/notes","message":"Controller failed with Error","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0","version":"27.1.4.1","exception":{"Exception":"Error","Message":"Call to undefined method OCA\\Notes\\Service\\NoteUtil::getPathForUser()","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":62,"function":"getData","class":"OCA\\Notes\\Service\\Note","type":"->","args":[["etag","content"]]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":114,"function":"getNoteData","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":[["OCA\\Notes\\Service\\Note"],["etag","content"],["OCA\\Notes\\Db\\Meta",153]]},{"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":113,"function":"array_map","args":[["Closure"],["*** sensitive parameters replaced ***",["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",148]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",154]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",152]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",151]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",155]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",149]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",150]]]]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/NotesController.php","line":71,"function":"getNotesAndCategories","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":[0,["etag","content"]]},{"file":"/var/www/html/custom_apps/notes/lib/Service/Util.php","line":26,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":140,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::","args":[["Closure"]]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/NotesController.php","line":57,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":[["Closure"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"index","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":[0]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notes\\Controller\\NotesController"],"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notes\\Controller\\NotesController"],"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notes\\Controller\\NotesController","index",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["notes.notes.index"]]},{"file":"/var/www/html/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/notes/notes"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/notes/lib/Service/Note.php","Line":108,"message":"Controller failed with Error","exception":{},"CustomMessage":"Controller failed with Error"}}

sgofferj avatar Dec 21 '23 09:12 sgofferj

Is this related to #1184?

GHBLoos avatar Dec 22 '23 04:12 GHBLoos

Hi @sgofferj - Are you still experiencing this? That method definitely was in v4.9.1. If this occurred after what was then a recent update it's possible it was a PHP caching issue.

joshtrichards avatar Apr 08 '24 01:04 joshtrichards

Apologies for the delay. I upgraded to NC28 now and the issue is gone.

sgofferj avatar Apr 09 '24 04:04 sgofferj