notes icon indicating copy to clipboard operation
notes copied to clipboard

Frequent occurences of: Saving note xxxx has failed. Note is locked.

Open davidsowerby opened this issue 2 years ago • 6 comments

With apparently increasing frequency I get instances of "Saving note xxxx has failed. Note is locked."

Steps to reproduce

  1. Create a note and keep editing and saving on a single device.
  2. It should not take long for this error to occur
  3. Deleting the note will also fail
  4. I can usually clear it eventually by copying and pasting to a new note and deleting the old one, although that usually takes multiple attempts to delete

Expected behaviour

The note saves, and editor switches to view mode

Actual behaviour

Save fails with error "Saving note xxxx has failed. Note is locked."

Screenshots

n/a

Server

IONOS Hosted

Client

  • Browser (incl. version): Brave [Version 1.49.120 Chromium: 111.0.5563.64 (Official Build) (64-bit)]
  • OS: Ubuntu 20.04.6 LTS

Log files

n/a

davidsowerby avatar Mar 18 '23 11:03 davidsowerby

Which Nextcloud version and app version are you using ? I can't reproduce it

theatischbein avatar Mar 22 '23 16:03 theatischbein

Edit: I previously said "Neither can I now! This seemed to last for around 72 hours, and has not been a problem for the last 24 hours."

But I have just had this happen again, specifically at approx 11:10 UTC.

The versions are selected by IONOS, but:

  • Notes is 4.5.1

  • I can't find the NextCloud version in the Dashboard, but the last update notification I had 3 months ago was to 24.0.7.2, so assuming they always send notification updates that would be it.

FWIW, I can only think that NextCloud or Notes does not cope very well with some sort of connectivity issue.

I will copy the content of the note and keep trying to re-save and update this issue. As of 11:22 UTC, I am still unable to save the note.

This could be pretty hard to diagnose - is there anything I can capture to assist?

davidsowerby avatar Mar 23 '23 10:03 davidsowerby

So yesterday I was unable to edit, delete or rename this note - I tried probably 12 or so times spread throughout the day.

Today, I just reopened a suspended session on my workstation, and found that the note was no longer locked - I guess the lock file had been cleaned up overnight .. perhaps!

davidsowerby avatar Mar 25 '23 11:03 davidsowerby

I just had this happen to me as well.

I am using the dockerized netcloud version 27.0.1 with Notes version 4.8.1

modernNeo avatar Aug 06 '23 18:08 modernNeo

Same issue here.

  • Nextcloud Hub 6 (27.1.3)
  • Notes 4.8.1
  • LXC container with Apache + reverse proxy
[notes] Error: OCP\Lock\LockedException: "user/Notes/Weekly Media Prep.md" is locked at <<closure>>

 0. /var/www/nextcloud/lib/private/Files/View.php line 1150
    OC\Files\View->changeLock()
 1. /var/www/nextcloud/lib/private/Files/View.php line 680
    OC\Files\View->basicOperation()
 2. /var/www/nextcloud/lib/private/Files/Node/File.php line 73
    OC\Files\View->file_put_contents()
 3. /var/www/nextcloud/apps/notes/lib/Service/Note.php line 169
    OC\Files\Node\File->putContent()
 4. /var/www/nextcloud/apps/notes/lib/Controller/NotesController.php line 236
    OCA\Notes\Service\Note->setContent()
 5. /var/www/nextcloud/apps/notes/lib/Service/Util.php line 26
    OCA\Notes\Controller\NotesController->OCA\Notes\Controller\{closure}("*** sensitive parameters replaced ***")
 6. /var/www/nextcloud/apps/notes/lib/Controller/Helper.php line 140
    OCA\Notes\Service\Util::retryIfLocked()
 7. /var/www/nextcloud/apps/notes/lib/Controller/NotesController.php line 238
    OCA\Notes\Controller\Helper->handleErrorResponse()
 8. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Notes\Controller\NotesController->update("*** sensitive parameters replaced ***")
 9. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
10. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
11. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
12. /var/www/nextcloud/lib/base.php line 1068
    OC\Route\Router->match()
13. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

Caused by:

OCP\Lock\LockedException: "files/7c70cfad5a328f71dd0c0cd26c90f5f4"("user/Notes/Weekly Media Prep.md") is locked at <<closure>>

 0. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 629
    OC\Files\Storage\Common->changeLock()
 1. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 629
    OC\Files\Storage\Wrapper\Wrapper->changeLock()
 2. /var/www/nextcloud/lib/private/Files/View.php line 1978
    OC\Files\Storage\Wrapper\Wrapper->changeLock()
 3. /var/www/nextcloud/lib/private/Files/View.php line 1150
    OC\Files\View->changeLock()
 4. /var/www/nextcloud/lib/private/Files/View.php line 680
    OC\Files\View->basicOperation()
 5. /var/www/nextcloud/lib/private/Files/Node/File.php line 73
    OC\Files\View->file_put_contents()
 6. /var/www/nextcloud/apps/notes/lib/Service/Note.php line 169
    OC\Files\Node\File->putContent()
 7. /var/www/nextcloud/apps/notes/lib/Controller/NotesController.php line 236
    OCA\Notes\Service\Note->setContent()
 8. /var/www/nextcloud/apps/notes/lib/Service/Util.php line 26
    OCA\Notes\Controller\NotesController->OCA\Notes\Controller\{closure}("*** sensitive parameters replaced ***")
 9. /var/www/nextcloud/apps/notes/lib/Controller/Helper.php line 140
    OCA\Notes\Service\Util::retryIfLocked()
10. /var/www/nextcloud/apps/notes/lib/Controller/NotesController.php line 238
    OCA\Notes\Controller\Helper->handleErrorResponse()
11. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Notes\Controller\NotesController->update("*** sensitive parameters replaced ***")
12. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
13. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
14. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
15. /var/www/nextcloud/lib/base.php line 1068
    OC\Route\Router->match()
16. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

Caused by:

OCP\Lock\LockedException: "files/7c70cfad5a328f71dd0c0cd26c90f5f4" is locked at <<closure>>

 0. /var/www/nextcloud/lib/private/Files/Storage/Common.php line 831
    OC\Lock\DBLockingProvider->changeLock()
 1. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 629
    OC\Files\Storage\Common->changeLock()
 2. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 629
    OC\Files\Storage\Wrapper\Wrapper->changeLock()
 3. /var/www/nextcloud/lib/private/Files/View.php line 1978
    OC\Files\Storage\Wrapper\Wrapper->changeLock()
 4. /var/www/nextcloud/lib/private/Files/View.php line 1150
    OC\Files\View->changeLock()
 5. /var/www/nextcloud/lib/private/Files/View.php line 680
    OC\Files\View->basicOperation()
 6. /var/www/nextcloud/lib/private/Files/Node/File.php line 73
    OC\Files\View->file_put_contents()
 7. /var/www/nextcloud/apps/notes/lib/Service/Note.php line 169
    OC\Files\Node\File->putContent()
 8. /var/www/nextcloud/apps/notes/lib/Controller/NotesController.php line 236
    OCA\Notes\Service\Note->setContent()
 9. /var/www/nextcloud/apps/notes/lib/Service/Util.php line 26
    OCA\Notes\Controller\NotesController->OCA\Notes\Controller\{closure}("*** sensitive parameters replaced ***")
10. /var/www/nextcloud/apps/notes/lib/Controller/Helper.php line 140
    OCA\Notes\Service\Util::retryIfLocked()
11. /var/www/nextcloud/apps/notes/lib/Controller/NotesController.php line 238
    OCA\Notes\Controller\Helper->handleErrorResponse()
12. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Notes\Controller\NotesController->update("*** sensitive parameters replaced ***")
13. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
14. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
15. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
16. /var/www/nextcloud/lib/base.php line 1068
    OC\Route\Router->match()
17. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

PUT /nextcloud/index.php/apps/notes/notes/3944021
from 10.0.3.1 by 26739B44-B12B-49CB-9F9A-82C5FFBD8FC4 at 2023-11-15T22:59:21+00:00

pebkacs avatar Nov 15 '23 23:11 pebkacs