text icon indicating copy to clipboard operation
text copied to clipboard

HTTP 500 on almost every editor save, some TypeError in logs

Open lorenzo-w opened this issue 3 years ago • 0 comments

Describe the bug After creating a new markdown file I can get maybe 3 to 4 automatic saves while editing the file, after which the editor starts receiving HTTP 500 upon trying to save new content and suggests to reload. After reloading, the local state conflicts with the saved state, so you get a split window. Picking the saved version only solves the issue for another 3 to 4 saves.

To Reproduce Steps to reproduce the behavior:

  1. Create a new markdown file somewhere
  2. Start editing the file and keep editing for a couple of minutes

Expected behavior You can keep editing without error messages.

Screenshots image image

Client details:

  • OS: Windows 10
  • Browser: Firefox 103.0.1 (64-bit)
  • Version: 24.0.2
  • Device: desktop
Server details

Text app version: 3.5.1

Operating system: Linux 5.4.0-110-generic x86_64

Web server: Apache

Database: mariadb Ver 15.1 Distrib 10.6.8-MariaDB

PHP version: 8.0.20

Nextcloud version: 24.0.2

Logs

Nextcloud log (data/nextcloud.log)

{"reqId":"YZUj7aIqVzXV8vgOUekc","level":3,"time":"2022-08-09T18:57:52+00:00","remoteAddr":"10.0.1.120","user":"lorenzo-w","app":"index","method":"POST","url":"/apps/text/session/sync","message":"OC\\EventDispatcher\\ServiceEventListener::__invoke(): Argument #1 ($event) must be of type OCP\\EventDispatcher\\Event, OC\\EventDispatcher\\GenericEventWrapper given, called in /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php on line 264 in file '/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php' line 65","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0","version":"24.0.2.1","exception":{"Exception":"Exception","Message":"OC\\EventDispatcher\\ServiceEventListener::__invoke(): Argument #1 ($event) must be of type OCP\\EventDispatcher\\Event, OC\\EventDispatcher\\GenericEventWrapper given, called in /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php on line 264 in file '/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php' line 65","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Text\\Controller\\SessionController"},"sync"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Text\\Controller\\SessionController","sync",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},["text.Session.sync"]]},{"file":"/var/www/html/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/text/session/sync"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":165,"Previous":{"Exception":"TypeError","Message":"OC\\EventDispatcher\\ServiceEventListener::__invoke(): Argument #1 ($event) must be of type OCP\\EventDispatcher\\Event, OC\\EventDispatcher\\GenericEventWrapper given, called in /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php on line 264","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":264,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[{"__class__":"OC\\EventDispatcher\\GenericEventWrapper"},"\\OCP\\Files::postDelete",{"__class__":"Symfony\\Component\\EventDispatcher\\EventDispatcher"}]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":239,"function":"doDispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[{"__class__":"Closure"}],"\\OCP\\Files::postDelete",{"__class__":"OC\\EventDispatcher\\GenericEventWrapper"}]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[{"__class__":"Closure"}],"\\OCP\\Files::postDelete",{"__class__":"OC\\EventDispatcher\\GenericEventWrapper"}]},{"file":"/var/www/html/lib/private/EventDispatcher/SymfonyAdapter.php","line":122,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[{"__class__":"OC\\EventDispatcher\\GenericEventWrapper"},"\\OCP\\Files::postDelete"]},{"file":"/var/www/html/lib/private/Files/Node/Node.php","line":118,"function":"dispatch","class":"OC\\EventDispatcher\\SymfonyAdapter","type":"->","args":["\\OCP\\Files::postDelete",{"__class__":"Symfony\\Component\\EventDispatcher\\GenericEvent"}]},{"file":"/var/www/html/lib/private/Files/Node/Folder.php","line":390,"function":"sendHooks","class":"OC\\Files\\Node\\Node","type":"->","args":[["postDelete"],[{"__class__":"OC\\Files\\Node\\NonExistingFolder"}]]},{"file":"/var/www/html/lib/private/Files/SimpleFS/SimpleFolder.php","line":67,"function":"delete","class":"OC\\Files\\Node\\Folder","type":"->","args":[]},{"file":"/var/www/html/lib/private/Preview/Watcher.php","line":65,"function":"delete","class":"OC\\Files\\SimpleFS\\SimpleFolder","type":"->","args":[]},{"file":"/var/www/html/lib/private/Preview/Watcher.php","line":54,"function":"deleteNode","class":"OC\\Preview\\Watcher","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Preview/WatcherConnector.php","line":63,"function":"postWrite","class":"OC\\Preview\\Watcher","type":"->","args":["*** sensitive parameters replaced ***"]},{"function":"OC\\Preview\\{closure}","class":"OC\\Preview\\WatcherConnector","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Hooks/EmitterTrait.php","line":106,"function":"call_user_func_array","args":[{"__class__":"Closure"},["*** sensitive parameters replaced ***"]]},{"file":"/var/www/html/lib/private/Hooks/PublicEmitter.php","line":40,"function":"emit","class":"OC\\Hooks\\BasicEmitter","type":"->","args":["\\OC\\Files","postWrite",["*** sensitive parameters replaced ***"]]},{"file":"/var/www/html/lib/private/Files/Node/Root.php","line":143,"function":"emit","class":"OC\\Hooks\\PublicEmitter","type":"->","args":["\\OC\\Files","postWrite",["*** sensitive parameters replaced ***"]]},{"function":"emit","class":"OC\\Files\\Node\\Root","type":"->","args":["\\OC\\Files","postWrite",["*** sensitive parameters replaced ***"]]},{"file":"/var/www/html/lib/private/Files/Node/LazyFolder.php","line":72,"function":"call_user_func_array","args":[[{"__class__":"OC\\Files\\Node\\Root"},"emit"],["\\OC\\Files","postWrite",["*** sensitive parameters replaced ***"]]]},{"file":"/var/www/html/lib/private/Files/Node/LazyFolder.php","line":100,"function":"__call","class":"OC\\Files\\Node\\LazyFolder","type":"->","args":["emit",["\\OC\\Files","postWrite",["*** sensitive parameters replaced ***"]]]},{"file":"/var/www/html/lib/private/Files/Node/HookConnector.php","line":114,"function":"emit","class":"OC\\Files\\Node\\LazyFolder","type":"->","args":["\\OC\\Files","postWrite",["*** sensitive parameters replaced ***"]]},{"file":"/var/www/html/lib/private/legacy/OC_Hook.php","line":106,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->","args":[[true,"/Test.md"]]},{"file":"/var/www/html/lib/private/Files/View.php","line":1290,"function":"emit","class":"OC_Hook","type":"::","args":["OC_Filesystem","post_write",[true,"/Test.md"]]},{"file":"/var/www/html/lib/private/Files/View.php","line":1218,"function":"runHooks","class":"OC\\Files\\View","type":"->","args":[["update","write"],"/Test.md",true]},{"file":"/var/www/html/lib/private/Files/View.php","line":711,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["file_put_contents","/lorenzo-w/files/Test.md",["update","write"],"# Test\n\nJust trying to edit a file...\n\n[Test Link](https://google.com)\n\nTest\n\nLorem ipsum...\n\ndolor sit.... I dunno."]},{"file":"/var/www/html/lib/private/Files/Node/File.php","line":71,"function":"file_put_contents","class":"OC\\Files\\View","type":"->","args":["/lorenzo-w/files/Test.md","# Test\n\nJust trying to edit a file...\n\n[Test Link](https://google.com)\n\nTest\n\nLorem ipsum...\n\ndolor sit.... I dunno."]},{"file":"/var/www/html/apps/text/lib/Service/DocumentService.php","line":319,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->","args":["# Test\n\nJust trying to edit a file...\n\n[Test Link](https://google.com)\n\nTest\n\nLorem ipsum...\n\ndolor sit.... I dunno."]},{"file":"/var/www/html/lib/private/Files/Lock/LockManager.php","line":29,"function":"OCA\\Text\\Service\\{closure}","class":"OCA\\Text\\Service\\DocumentService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/text/lib/Service/DocumentService.php","line":320,"function":"runInScope","class":"OC\\Files\\Lock\\LockManager","type":"->","args":[{"__class__":"OCP\\Files\\Lock\\LockContext"},{"__class__":"Closure"}]},{"file":"/var/www/html/apps/text/lib/Service/ApiService.php","line":213,"function":"autosave","class":"OCA\\Text\\Service\\DocumentService","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},2965,34,"# Test\n\nJust trying to edit a file...\n\n[Test Link](https://google.com)\n\nTest\n\nLorem ipsum...\n\ndolor sit.... I dunno.",false,false,null,"/Test.md"]},{"file":"/var/www/html/apps/text/lib/Controller/SessionController.php","line":82,"function":"sync","class":"OCA\\Text\\Service\\ApiService","type":"->","args":[2965,125,"3KVfb8rsMc1hYvBxa3b12791pwxK25YQT10ZHDG8/Ox02Y4JI3+49Pxm+q6ugc9E",34,"# Test\n\nJust trying to edit a file...\n\n[Test Link](https://google.com)\n\nTest\n\nLorem ipsum...\n\ndolor sit.... I dunno.",false,false]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"sync","class":"OCA\\Text\\Controller\\SessionController","type":"->","args":[2965,125,"3KVfb8rsMc1hYvBxa3b12791pwxK25YQT10ZHDG8/Ox02Y4JI3+49Pxm+q6ugc9E",34,"# Test\n\nJust trying to edit a file...\n\n[Test Link](https://google.com)\n\nTest\n\nLorem ipsum...\n\ndolor sit.... I dunno.",false,false]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Text\\Controller\\SessionController"},"sync"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Text\\Controller\\SessionController"},"sync"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Text\\Controller\\SessionController","sync",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},["text.Session.sync"]]},{"file":"/var/www/html/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/text/session/sync"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php","Line":65},"CustomMessage":"--"},"id":"62f2ae7211d94"}

Browser log

Failed to fetch steps due to other reason Error: Request failed with status code 500
    exports createError.js:16
    exports settle.js:17
    k xhr.js:66
    exports xhr.js:78
    exports xhr.js:15
    exports dispatchRequest.js:58
    request Axios.js:112
    e Axios.js:147
    exports bind.js:9
    value PollingBackend.js:121
    setInterval handler*value PollingBackend.js:268
    value PollingBackend.js:170
    promise callback*value PollingBackend.js:131
    value PollingBackend.js:103
    value PollingBackend.js:230
    promise callback*value PollingBackend.js:227
    value SyncService.js:184
    onSendable EditorWrapper.vue:408
    t Collaboration.js:28
    y Collaboration.js:16
    setTimeout handler*1234/onCreate/this.getSendableSteps< Collaboration.js:15
    onCreate Collaboration.js:40
    emit tiptap-core.esm.js:3121
    emit tiptap-core.esm.js:3121
    dispatchTransaction tiptap-core.esm.js:3460
    dispatch index.es.js:5285
    26798/get commands/</< tiptap-core.esm.js:1971
    o tiptap-core.esm.js:548
    o tiptap-core.esm.js:544
    focus tiptap-core.esm.js:572
    l tiptap-core.esm.js:2003
    setLinkUrl MenuBubble.vue:155
    click MenuBubble.vue:1
    VueJS 24
PollingBackend.js:203:11
    value PollingBackend.js:203
    value PollingBackend.js:131
    value PollingBackend.js:268
    value PollingBackend.js:170
    value PollingBackend.js:131
    value PollingBackend.js:103
    value PollingBackend.js:230
    (Async: promise callback)
    value PollingBackend.js:227
    value SyncService.js:184
    onSendable EditorWrapper.vue:408
    t Collaboration.js:28
    y Collaboration.js:16
    (Async: setTimeout handler)
    getSendableSteps Collaboration.js:15
    onCreate Collaboration.js:40
    emit tiptap-core.esm.js:3121
    emit tiptap-core.esm.js:3121
    dispatchTransaction tiptap-core.esm.js:3460
    dispatch index.es.js:5285
    26798/get commands/</< tiptap-core.esm.js:1971
    o tiptap-core.esm.js:548
    (Async: FrameRequestCallback)
    o tiptap-core.esm.js:544
    focus tiptap-core.esm.js:572
    l tiptap-core.esm.js:2003
    setLinkUrl MenuBubble.vue:1

Installed apps:

accessibility
activity
appointments
apporder
approval
bookmarks
breezedark
calendar
circles
comments
contacts
drawio
duplicatefinder
extract
federation
files_accesscontrol
files_automatedtagging
files_external
files_linkeditor
files_lock
files_pdfviewer
files_rightclick
files_sharing
files_trashbin
files_versions
files_videoplayer
forms
groupfolders
impersonate
logreader
mail
metadata
notifications
oidc_login
onlyoffice
passwords
photos
polls
privacy
recognize
recommendations
sharebymail
systemtags
tasks
text
theming
user_ldap
user_status
webhooks

Other details about my setup:

  • Nextcloud on Kubernetes
  • Official Nextcloud Helm Chart, Version 3.0.3
  • MariaDB deployed via SubChart
  • S3 as primary storage provider
  • LDAP as user backend
  • Login via Nextcloud OIDC app with ldap proxying mode
  • Redis for caching

lorenzo-w avatar Aug 09 '22 19:08 lorenzo-w