Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Notes undeletable due to lock

未关闭
#1,636 11 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
javascript, php
领域
backend

调研方向

先从 apps/notes/lib/Service/NotesService.php 和 apps/notes/lib/Controller/NotesController.php 中的删除路径开始,然后检查 apps/notes/lib/Service/Util.php 和 apps/notes/lib/Controller/Helper.php 中的 retryIfLocked。使用一条已锁定的笔记重现 DELETE 请求,并跟踪报告的 LockedException。笔记能够在没有锁定错误或编辑会话已过期消息的情况下被删除,即表示完成。

由索引模型根据 Issue 内容生成。

描述

bug need to reproduce

Steps to reproduce

  1. Open Notes on desktop NC using a web browser (or on android Notes)
  2. Select a note and choose delete
  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.'
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:

``` { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "cloud.idl-mp.com" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "31.0.8.1", "overwrite.cli.url": "https:\/\/cloud.idl-mp.com", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "default_language": "fr", "installed": true, "theme": "", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpmode": "smtp", "mail_domain": "***REMOVED SENSITIVE VALUE***", "trashbin_retention_obligation": "auto, 7", "trashbin_auto_expire": true, "versions_retention_obligation": "auto, 7", "degug": false, "loglevel": 2, "cron_log": true, "log_rotate_size": 209715200, "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_sendmailmode": "smtp", "mail_smtpsecure": "ssl", "mail_smtpauth": 1, "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_smtpauthtype": "LOGIN", "maintenance": false, "default_phone_region": "FR", "app_install_overwrite": [ "occweb", "social", "apporder", "mailnotifier", "unsplash" ], "maintenance_window_start": 1, "updater.release.channel": "stable", "mail_smtpport": "465", "updater.secret": "***REMOVED SENSITIVE VALUE***" } }
</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"}}
主要语言
JavaScript
星标
738
派生
162
平均合并
2 小时 40 分钟
30 天内合并 PR
39

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/notes 的其他 Issue

查看 nextcloud/notes 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。