Notes undeletable due to lock
Steps to reproduce
- Open Notes on desktop NC using a web browser (or on android Notes)
- Select a note and choose delete
- See the error message after a few seconds : 'Deleting note id has failed. Note is locked.' and a bit later 'Editing session has expired. Please reload the page.'
Expected behaviour
The note should be deleted.
Actual behaviour
The note remains in the list.
Server
Please complete the following information.
- Notes app version: 4.12.3 (4.4.2 on android)
- Nextcloud version: 31.0.8
- OS: Linux 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
- Web server: LiteSpeed
- PHP version: 8.3.20
- Database: mysql 10.11.10
Nextcloud configuration:
</details>
## Client
Please complete the following information.
- Browser (incl. version): Brave v1.82.161 or Firefox 142.0.1
- OS: Ubuntu 24.04
## Log files
{"reqId":"dm-4J-ixHQCKq8rreKZbD0Hn","level":3,"time":"2025-09-09T08:53:23+00:00","remoteAddr":"my.ip.address","user":"manu","app":"notes","method":"DELETE","url":"/index.php/apps/notes/notes/267203","message":"Controller failed with OCP\\Lock\\LockedException","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36","version":"31.0.8.1","exception":{"Exception":"OCP\\Lock\\LockedException","Message":"\"/manu/files/Notes/myNote.md\" is locked","Code":0,"Trace":[{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":1200,"function":"changeLock","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":676,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Node/File.php","line":112,"function":"unlink","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Service/NotesService.php","line":152,"function":"delete","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/NotesController.php","line":315,"function":"delete","class":"OCA\\Notes\\Service\\NotesService","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Service/Util.php","line":31,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/Helper.php","line":146,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/NotesController.php","line":314,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller\\Helper","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"destroy","class":"OCA\\Notes\\Controller\\NotesController","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/base.php","line":1061,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","Line":2115,"Previous":{"Exception":"OCP\\Lock\\LockedException","Message":"\"files/960189f562f4bf135d92cb77818401b6\"(\"files/Notes/myNote.md\") is locked","Code":0,"Trace":[{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":310,"function":"changeLock","class":"OC\\Files\\Storage\\Common","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":310,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":2107,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":1200,"function":"changeLock","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":676,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Node/File.php","line":112,"function":"unlink","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Service/NotesService.php","line":152,"function":"delete","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/NotesController.php","line":315,"function":"delete","class":"OCA\\Notes\\Service\\NotesService","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Service/Util.php","line":31,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/Helper.php","line":146,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/NotesController.php","line":314,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller\\Helper","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"destroy","class":"OCA\\Notes\\Controller\\NotesController","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/base.php","line":1061,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Storage/Common.php","Line":696,"Previous":{"Exception":"OCP\\Lock\\LockedException","Message":"\"files/960189f562f4bf135d92cb77818401b6\" is locked","Code":0,"Trace":[{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Storage/Common.php","line":694,"function":"changeLock","class":"OC\\Lock\\DBLockingProvider","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":310,"function":"changeLock","class":"OC\\Files\\Storage\\Common","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":310,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":2107,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":1200,"function":"changeLock","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":676,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Node/File.php","line":112,"function":"unlink","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Service/NotesService.php","line":152,"function":"delete","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/NotesController.php","line":315,"function":"delete","class":"OCA\\Notes\\Service\\NotesService","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Service/Util.php","line":31,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/Helper.php","line":146,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/NotesController.php","line":314,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller\\Helper","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"destroy","class":"OCA\\Notes\\Controller\\NotesController","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/base.php","line":1061,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Lock/DBLockingProvider.php","Line":193}},"message":"Controller failed with OCP\\Lock\\LockedException","exception":{},"CustomMessage":"Controller failed with OCP\\Lock\\LockedException"}}
Maybe helpful, the console display when I try to delete a note:
311522:1 Blocked aria-hidden on an element because its descendant retained focus. The focus must not be hidden from assistive technology users. Avoid using aria-hidden on a focused element or its ancestor. Consider using the inert attribute instead, which will also prevent focus. For more details, see the aria-hidden section of the WAI-ARIA specification at https://w3c.github.io/aria/#aria-hidden.
Element with focus: <button.action-button button-vue focusable>
Ancestor with aria-hidden: <div.v-popper__popper v-popper--theme-dropdown action-item__popper v-popper__popper--hidden v-popper__popper--hide-from#popper_nc0wf53r_clrizw> <div id="popper_nc0wf53r_clrizw" aria-hidden="true" tabindex="0" data-popper-placement="top" class="v-popper__popper v-popper--theme-dropdown action-item__popper v-popper__popper--hidden v-popper__popper--hide-to" style="position: absolute; transform: translate3d(636px, 952px, 0px);">…</div><div class="v-popper__backdrop"></div><div class="v-popper__wrapper">…</div><div class="v-popper__inner" style="height: fit-content;">…</div><div>…</div><div data-v-8859cc6c tabindex="-1" class="resize-observer">…</div></div><div class="v-popper__arrow-container" style="left: 69.5px;">…</div></div></div>
NotesService.js:326 DELETE https://cloud.idl-mp.com/index.php/apps/notes/notes/267203 423 (Locked)
(anonymous) @ xhr.js:195
xhr @ xhr.js:15
ot @ dispatchRequest.js:51
_request @ Axios.js:187
request @ Axios.js:40
(anonymous) @ Axios.js:213
(anonymous) @ bind.js:5
k @ NotesService.js:326
onDeleteNote @ NoteItem.vue:278
await in onDeleteNote
dn @ vue.runtime.esm.js:3033
n @ vue.runtime.esm.js:1832
dn @ vue.runtime.esm.js:3033
(anonymous) @ vue.runtime.esm.js:3732
onClick @ actionText-fFcUPi2g.mjs:77
handleClick @ NcActionButton-CpGK6gSX.mjs:143
dn @ vue.runtime.esm.js:3033
n @ vue.runtime.esm.js:1832
(anonymous) @ vue.runtime.esm.js:7500
NotesService.js:328 $ {message: 'Request failed with status code 423', name: 'AxiosError', code: 'ERR_BAD_REQUEST', config: {…}, request: XMLHttpRequest, …}
k @ NotesService.js:328
await in k
onDeleteNote @ NoteItem.vue:278
await in onDeleteNote
dn @ vue.runtime.esm.js:3033
n @ vue.runtime.esm.js:1832
dn @ vue.runtime.esm.js:3033
(anonymous) @ vue.runtime.esm.js:3732
onClick @ actionText-fFcUPi2g.mjs:77
handleClick @ NcActionButton-CpGK6gSX.mjs:143
dn @ vue.runtime.esm.js:3033
n @ vue.runtime.esm.js:1832
(anonymous) @ vue.runtime.esm.js:7500
3. See the error message after a few seconds : 'Deleting note id has failed. Note is locked.' and a bit later 'Editing session has expired. Please reload the page.'
Is it shared? Maybe locked because someone else was editng it at same time? Or open on another device/tab? Does it work if you try again later? Or after unlocking the file explictly (I believe occ files:scan -all unlocks for files, not sure if it's same for notes too)
Thanks @enjeck No it's not shared, and to be sure I stopped the NC Notes app on my smartphone and tried again to delete a note, for no better. Anyway, this is a clue. I mean could the NC Notes app on my smartphone hold a lock on notes?
I already had tried the "unlock files" occ command, sorry for not mentioning it before.
I found the note line in the oc_notes_meta table, but could not link it to any line in oc_file_locks.
I mean could the NC Notes app on my smartphone hold a lock on notes?
I guess so, if it's currently open at that time.
I wish it could be so, but even when I clear the storage on the smartphone app and stop it, the problem remains the same: still unable do delete a note via the web UI...
Is there actually no way to find out what is locking a note?
Or in other words, how to unlock notes?
Is there actually no way to find out what is locking a note?
Maybe we lock the file before attempting a delete, and if delete fails, the lock is never released? Not sure. Does your nextcloud.log say more
I posted the NC log at the end of my 1st post up here.
Here again:
{"reqId":"dm-4J-ixHQCKq8rreKZbD0Hn","level":3,"time":"2025-09-09T08:53:23+00:00","remoteAddr":"my.ip.address","user":"manu","app":"notes","method":"DELETE","url":"/index.php/apps/notes/notes/267203","message":"Controller failed with OCP\\Lock\\LockedException","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36","version":"31.0.8.1","exception":{"Exception":"OCP\\Lock\\LockedException","Message":"\"/manu/files/Notes/myNote.md\" is locked","Code":0,"Trace":[{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":1200,"function":"changeLock","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":676,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Node/File.php","line":112,"function":"unlink","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Service/NotesService.php","line":152,"function":"delete","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/NotesController.php","line":315,"function":"delete","class":"OCA\\Notes\\Service\\NotesService","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Service/Util.php","line":31,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/Helper.php","line":146,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/NotesController.php","line":314,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller\\Helper","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"destroy","class":"OCA\\Notes\\Controller\\NotesController","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/base.php","line":1061,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","Line":2115,"Previous":{"Exception":"OCP\\Lock\\LockedException","Message":"\"files/960189f562f4bf135d92cb77818401b6\"(\"files/Notes/myNote.md\") is locked","Code":0,"Trace":[{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":310,"function":"changeLock","class":"OC\\Files\\Storage\\Common","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":310,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":2107,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":1200,"function":"changeLock","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":676,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Node/File.php","line":112,"function":"unlink","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Service/NotesService.php","line":152,"function":"delete","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/NotesController.php","line":315,"function":"delete","class":"OCA\\Notes\\Service\\NotesService","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Service/Util.php","line":31,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/Helper.php","line":146,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/NotesController.php","line":314,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller\\Helper","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"destroy","class":"OCA\\Notes\\Controller\\NotesController","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/base.php","line":1061,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Storage/Common.php","Line":696,"Previous":{"Exception":"OCP\\Lock\\LockedException","Message":"\"files/960189f562f4bf135d92cb77818401b6\" is locked","Code":0,"Trace":[{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Storage/Common.php","line":694,"function":"changeLock","class":"OC\\Lock\\DBLockingProvider","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":310,"function":"changeLock","class":"OC\\Files\\Storage\\Common","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":310,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":2107,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":1200,"function":"changeLock","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/View.php","line":676,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Files/Node/File.php","line":112,"function":"unlink","class":"OC\\Files\\View","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Service/NotesService.php","line":152,"function":"delete","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/NotesController.php","line":315,"function":"delete","class":"OCA\\Notes\\Service\\NotesService","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Service/Util.php","line":31,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/Helper.php","line":146,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/apps/notes/lib/Controller/NotesController.php","line":314,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller\\Helper","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"destroy","class":"OCA\\Notes\\Controller\\NotesController","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/base.php","line":1061,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/myuser/domains/cloud.idl-mp.com/public_html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/myuser/domains/cloud.idl-mp.com/public_html/lib/private/Lock/DBLockingProvider.php","Line":193}},"message":"Controller failed with OCP\\Lock\\LockedException","exception":{},"CustomMessage":"Controller failed with OCP\\Lock\\LockedException"}}
Hi, what information is missing to help solve this issue?
What, at the DB level can I do to unlock these locked notes?
Today I ran into the same issue, don't know how, though. I categorized my notes but in the beginning everything was fine.
I could not edit/delete notes via webdav, either. (Looked like it was Nextcloud related.) Creating and editing new notes worked, however. So only "older" notes were affected.
Updated my instance to check, if the problem was fixed, but it still existed.
Nextcloud 10 Hub (31.0.9); Hub 25 Autumn (32.0.0) Nextcloud Notes 4.12.3
I "solved" the problem by flushing the _file_locks table and starting a file check afterwards.
https://help.nextcloud.com/t/file-is-locked-how-to-unlock/1883
Thank you @FpunktBpunkt it also worked for me... til the next time I'm afraid since it does not explain why the notes (their files in fact) were kept locked.
But at least, this workaround frees them.
I don't reckon the workaround is a solution, this is why I won't close this issue.