The Notes App Hangs Repeatedly

Nextcloud version (eg, 20.0.5): 28.0.3
Operating system and version (eg, Ubuntu 20.04): Debian 12
Apache or nginx version (eg, Apache 2.4.25): Caddy v2
PHP version (eg, 7.4): 8.2.16

The issue you are facing:

The Notes app hangs repeatedly.
In the front end, the webpage hangs when certain actions are performed (i.e. create a note, delete a note, rename etc) and at times an error message pops up reporting that the connection has dropped.
In the back end, both 4XX and 5XX errors fill the webserver and nextcloud logs.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Browse to the Notes App
  2. Delete a new note

The output of your Nextcloud log in Admin > Logging:

{"reqId":"nKUnCmgGh6mbTycJeOzJ","level":3,"time":"2024-03-10T22:51:22+00:00","remoteAddr":"10.89.0.4","user":"<my)user>","app":"index","method":"POST","url":"/index.php/apps/text/session/547/sync","message":"No proper share data","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"28.0.3.2","exception":{"Exception":"InvalidArgumentException","Message":"No proper share data","Code":0,"Trace":[{"file":"/var/www/html/apps/text/lib/Service/ApiService.php","line":227,"function":"getFileForSession","class":"OCA\\Text\\Service\\DocumentService","type":"->","args":["*** sensitive parameters replaced ***",null]},{"file":"/var/www/html/apps/text/lib/Controller/SessionController.php","line":88,"function":"sync","class":"OCA\\Text\\Service\\ApiService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"sync","class":"OCA\\Text\\Controller\\SessionController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Text\\Controller\\SessionController"],"sync"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Text\\Controller\\SessionController"],"sync"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Text\\Controller\\SessionController","sync",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["547","text.Session.sync"]]},{"file":"/var/www/html/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/text/session/547/sync"]},{"file":"/var/www/html/index.php","line":39,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/apps/text/lib/Service/DocumentService.php","Line":449,"message":"No proper share data","exception":[],"CustomMessage":"No proper share data"},"id":"65ee3d8be0423"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '127.0.0.1',
    'password' => '<password>',
    'port' => 6379,
  ),
  'upgrade.disable-web' => true,
  'passwordsalt' => '<salt>',
  'secret' => '<secret>',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '<my_domain>',
    2 => '<my_ipv4>',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'pgsql',
  'version' => '28.0.3.2',
  'overwrite.cli.url' => '<my_domain>',
  'dbname' => '<db_name>',
  'dbhost' => '127.0.0.1',
  'dbport' => '',
  'dbtableprefix' => '<prefix>',
  'dbuser' => '<db_user>',
  'dbpassword' => '<db_password>',
  'installed' => true,
  'instanceid' => '<id>',
  'trusted_proxies' => 
  array (
    0 => '<my_ipv4>',
    1 => 'localhost',
    2 => '<my_domain>',
    3 => '::1',
  ),
  'maintenance_window_start' => 1,
  'default_phone_region' => '<my_region>',
  'overwritehost' => '<my_domain>',
  'overwriteprotocol' => 'https',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_smtphost' => '<smtp_server>',
  'mail_smtpport' => '<port>',
  'mail_from_address' => '<user_email>',
  'mail_domain' => '<domain>',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '<email>',
  'mail_smtppassword' => '<password>',
  'maintenance' => false,
);

The output of your Apache/nginx/system log in /var/log/____:

{"level":"error","ts":1710111082.1773474,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_ip":"<my_ip>","remote_port":"57226","proto":"HTTP/2.0","method":"POST","host":"<my_domain>","uri":"/index.php/apps/text/session/547/sync","headers":{"Accept":["application/json, text/plain, */*"],"Accept-Language":["en-US,en;q=0.5"],"Content-Length":["155"],"Origin":["<url>"],"Te":["trailers"],"Requesttoken":["HIPePvPXy1a3oaT549HZzsk9Ria5P03i0dzk6vFpgpk=:N7Kpbpy/ryTFydXO2pKU/ZkJfnbccgSaiv6Ajb3Z0dQ="],"Dnt":["1"],"Sec-Fetch-Dest":["empty"],"Sec-Fetch-Site":["same-origin"],"User-Agent":["Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0"],"Accept-Encoding":["gzip, deflate, br"],"Content-Type":["application/json"],"X-Requested-With":["XMLHttpRequest"],"Cookie":[],"Sec-Fetch-Mode":["cors"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"<domain>}},"user_id":"","duration":0.064324497,"size":2373,"status":500,"resp_headers":{"X-Robots-Tag":["noindex, nofollow"],"Content-Security-Policy":["default-src 'self'; script-src 'self' 'nonce-cFlOMnFvYVBObWdrRnhGOElPSlFKZFZFN4Ezcm0yT3dGUXBVcm5IY21hVT06anJJQit1bm5VaHJXZjJCTgdhRWRGb1Z3MXYyTdFpckNUR2d3eVQzc3l1Zz0='; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';"],"Strict-Transport-Security":["max-age=15552000"],"Date":["Sun, 10 Mar 2024 22:51:22 GMT"],"Cache-Control":["no-store, no-cache, must-revalidate"],"Content-Type":["text/html; charset=UTF-8"],"X-Frame-Options":["SAMEORIGIN"],"Pragma":["no-cache"],"X-Xss-Protection":["1; mode=block"],"Server":["Caddy","Caddy"],"Alt-Svc":["h3=\":443\"; ma=2592000"],"Expires":["Thu, 19 Nov 1981 08:52:00 GMT"],"Status":["500 Internal Server Error"],"X-Content-Type-Options":["nosniff"],"X-Powered-By":["PHP/8.2.16"],"X-Permitted-Cross-Domain-Policies":["none"],"Referrer-Policy":["no-referrer"]}}

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

{"reqId":"nKUnCmgGh6mbTycJeOzJ","level":3,"time":"2024-03-10T22:51:22+00:00","remoteAddr":"10.89.0.4","user":"<my_user>","app":"index","method":"POST","url":"/index.php/apps/text/session/547/sync","message":"No proper share data","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"28.0.3.2","exception":{"Exception":"InvalidArgumentException","Message":"No proper share data","Code":0,"Trace":[{"file":"/var/www/html/apps/text/lib/Service/ApiService.php","line":227,"function":"getFileForSession","class":"OCA\\Text\\Service\\DocumentService","type":"->","args":["*** sensitive parameters replaced ***",null]},{"file":"/var/www/html/apps/text/lib/Controller/SessionController.php","line":88,"function":"sync","class":"OCA\\Text\\Service\\ApiService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"sync","class":"OCA\\Text\\Controller\\SessionController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Text\\Controller\\SessionController"],"sync"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Text\\Controller\\SessionController"],"sync"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Text\\Controller\\SessionController","sync",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["547","text.Session.sync"]]},{"file":"/var/www/html/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/text/session/547/sync"]},{"file":"/var/www/html/index.php","line":39,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/apps/text/lib/Service/DocumentService.php","Line":449,"message":"No proper share data","exception":{},"CustomMessage":"No proper share data"}}

Many thanks! Really appreciate your help with this.