Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Unable to Read Notes From Server After Update to 4.9 #1177

Closed
kn0wmad opened this issue Dec 9, 2023 · 8 comments · Fixed by #1182
Closed

App Unable to Read Notes From Server After Update to 4.9 #1177

kn0wmad opened this issue Dec 9, 2023 · 8 comments · Fixed by #1182
Labels
bug Something isn't working need to reproduce Issue that has not been reproduced

Comments

@kn0wmad
Copy link

kn0wmad commented Dec 9, 2023

"Error from Nextcloud server: Reading notes from filesystem has failed. (Error)"

Attempted to remove and re-add folder path, attempted to uninstall and re-install app, neither fixed issue

Steps to reproduce

  1. Update to latest Notes
  2. Visit Notes web app in NC
  3. See error

Expected behaviour

Notes should be read from FS

Actual behaviour

Notes unable to read existing path

Server

Please complete the following information.

  • Notes app version: 4.9
  • Nextcloud version: 25.0.5
  • OS: Alpine
  • Web server: nginx
  • PHP version: 8.1
  • Database: Postgres

Nextcloud configuration:

``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder ```

Client

Please complete the following information.

  • Browser (incl. version): FF 120
  • OS: Linux 6.1

Log files

Add relevant parts of your nextcloud.log and/or your browser's JavaScript console here.

@kn0wmad kn0wmad added bug Something isn't working need to reproduce Issue that has not been reproduced labels Dec 9, 2023
@juliusknorr
Copy link
Member

Add relevant parts of your nextcloud.log and/or your browser's JavaScript console here.

Can you check the logs?

@GuestJim
Copy link

GuestJim commented Dec 9, 2023

I'm getting the same error message when I try using Notes, and here's what it shows in the logs for each attempt:


[notes] Error: Error: Undefined constant OCP\Share\IShare::TYPE_SCIENCEMESH at <>

  1. /var/www/html/custom_apps/notes/lib/Service/Note.php line 109
    OCA\Notes\Service\NoteUtil->getShareTypes(OC\Files\Node\File {})
  2. /var/www/html/custom_apps/notes/lib/Controller/Helper.php line 62
    OCA\Notes\Service\Note->getData(["etag","content"])
  3. /var/www/html/custom_apps/notes/lib/Controller/Helper.php line 114
    OCA\Notes\Controller\Helper->getNoteData(OCA\Notes\Service\Note {}, ["etag","content"], OCA\Notes\Db\Meta {id: 25089})
  4. <>
    OCA\Notes\Controller\Helper->OCA\Notes\Controller{closure}("*** sensitive parameters replaced ***")
  5. /var/www/html/custom_apps/notes/lib/Controller/Helper.php line 113
    array_map(Closure {}, ["*** sensitive ... "])
  6. /var/www/html/custom_apps/notes/lib/Controller/NotesController.php line 71
    OCA\Notes\Controller\Helper->getNotesAndCategories(0, ["etag","content"])
  7. /var/www/html/custom_apps/notes/lib/Service/Util.php line 26
    OCA\Notes\Controller\NotesController->OCA\Notes\Controller{closure}("*** sensitive parameters replaced ***")
  8. /var/www/html/custom_apps/notes/lib/Controller/Helper.php line 140
    OCA\Notes\Service\Util::retryIfLocked(Closure {})
  9. /var/www/html/custom_apps/notes/lib/Controller/NotesController.php line 97
    OCA\Notes\Controller\Helper->handleErrorResponse(Closure {})
  10. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 225
    OCA\Notes\Controller\NotesController->index(0)
  11. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 133
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Notes\Controller\NotesController {}, "index")
  12. /var/www/html/lib/private/AppFramework/App.php line 172
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Notes\Controller\NotesController {}, "index")
  13. /var/www/html/lib/private/Route/Router.php line 298
    OC\AppFramework\App::main("OCA\Notes\Controller\NotesController", "index", OC\AppFramework\ ... {}, ["notes.notes.index"])
  14. /var/www/html/lib/base.php line 1047
    OC\Route\Router->match("/apps/notes/notes")
  15. /var/www/html/index.php line 36
    OC::handleRequest()

GET /apps/notes/notes
from ... by jim at 2023-12-09T15:37:54+00:00

@kn0wmad
Copy link
Author

kn0wmad commented Dec 10, 2023

Add relevant parts of your nextcloud.log and/or your browser's JavaScript console here.

Can you check the logs?

Apologies, I didn't catch anything relevant first time around:

"app":"notes","method":"GET","url":"/apps/notes/notes","message":"Controller failed with 
Error","userAgent":"Mozilla/5.0 (Windows NT 10.0; rv:120.0) Gecko/20100101 
Firefox/120.0","version":"25.0.5.1","exception":{"Exception":"Error","Message":"Undefined constant OCP\\Share
\\IShare::TYPE_SCIENCEMESH","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/notes/lib/Service
/Note.php","line":109,"function":"getShareTypes","class":"OCA\\Notes\\Service\\NoteUtil","type":"->","args":[["OC\\Files
\\Node\\File"]]},{"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",608]]},{"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",607]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes
\\Db\\Meta",606]],["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",605]],
["OCA\\Notes\\Service\\MetaNote",["OCA\\Notes\\Service\\Note"],["OCA\\Notes\\Db\\Meta",611]],"And 3 more entries, 
set log level to debug to see all entries"]]},{"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":97,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller
\\Helper","type":"->","args":[["Closure"]]},{"file":"/var/www/html/lib/private/AppFramework
/Http/Dispatcher.php","line":225,"function":"index","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":
[0]},{"file":"/var/www/html/lib/private/AppFramework
/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http
\\Dispatcher","type":"->","args":[["OCA\\Notes\\Controller\\NotesController"],"index"]},{"file":"/var/www/html/lib/private
/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http
\\Dispatcher","type":"->","args":[["OCA\\Notes\\Controller\\NotesController"],"index"]},{"file":"/var/www/html/lib/private
/Route/Router.php","line":298,"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":1047,"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/NoteUtil.php","Line":232,"message":"Controller failed with Error","exception":
{},"CustomMessage":"Controller failed with Error"}}

@MattDHill
Copy link

I have the same issue, see closed ticket above for logs

@neod123
Copy link

neod123 commented Dec 13, 2023

Same issue also on my side with 4.9

Error: Undefined constant OCP\Share\IShare::TYPE_SCIENCEMESH
/var/www/nextcloud/apps/notes/lib/Service/Note.php - line 109:

OCA\Notes\Service\NoteUtil->getShareTypes()

/var/www/nextcloud/apps/notes/lib/Controller/Helper.php - line 62:

OCA\Notes\Service\Note->getData()

/var/www/nextcloud/apps/notes/lib/Controller/Helper.php - line 114:

OCA\Notes\Controller\Helper->getNoteData()

<<closure>>

OCA\Notes\Controller\Helper->OCA\Notes\Controller\{closure}("*** sensiti ... *")

/var/www/nextcloud/apps/notes/lib/Controller/Helper.php - line 113:

array_map()

/var/www/nextcloud/apps/notes/lib/Controller/NotesController.php - line 71:

OCA\Notes\Controller\Helper->getNotesAndCategories()

/var/www/nextcloud/apps/notes/lib/Service/Util.php - line 26:

OCA\Notes\Controller\NotesController->OCA\Notes\Controller\{closure}("*** sensiti ... *")

/var/www/nextcloud/apps/notes/lib/Controller/Helper.php - line 140:

OCA\Notes\Service\Util::retryIfLocked()

/var/www/nextcloud/apps/notes/lib/Controller/NotesController.php - line 97:

OCA\Notes\Controller\Helper->handleErrorResponse()

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

OCA\Notes\Controller\NotesController->index()

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

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

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

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

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

OC\AppFramework\App::main()

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

OC\Route\Router->match()

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

OC::handleRequest()

@jschmuecking
Copy link

I do have the exact same problem and the logs look the same, too.

@GuestJim
Copy link

Just wanted to confirm 4.9.1 has resolved the issue for me. I hope it does for everyone else too.

@kn0wmad
Copy link
Author

kn0wmad commented Dec 16, 2023

Solved, thank you for the quick fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need to reproduce Issue that has not been reproduced
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants