[GH-ISSUE #1321] 无法删除证书 #732

Closed
opened 2026-02-26 12:09:17 +03:00 by kerem · 3 comments
Owner

Originally created by @kailicom on GitHub (Aug 22, 2025).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1321

Describe the bug
删除证书报错:"invalid character '}' after object key"

To Reproduce
Steps to reproduce the behavior:

  1. 证书编辑报错,并且无法删除
  2. 在容器内删除了证书文件夹
  3. 证书仍在UI列表中

Expected behavior
目前证书还会自动执行续期任务,经常提示报错,希望可以先提供一个临时删除的办法。

Screenshots
Image

Info (please complete the following information):

  • Server OS: OS: debian 12.11 (linux 5.15.0-113-generic x86_64)
  • Server Arch: x86_64
  • Nginx UI Version: v2.1.17
  • Your Browser: Edge
Originally created by @kailicom on GitHub (Aug 22, 2025). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1321 **Describe the bug** 删除证书报错:"invalid character '}' after object key" **To Reproduce** Steps to reproduce the behavior: 1. 证书编辑报错,并且无法删除 2. 在容器内删除了证书文件夹 3. 证书仍在UI列表中 **Expected behavior** 目前证书还会自动执行续期任务,经常提示报错,希望可以先提供一个临时删除的办法。 **Screenshots** <img width="1865" height="811" alt="Image" src="https://github.com/user-attachments/assets/3570ce3d-62b7-4585-a826-c9e36611b54a" /> **Info (please complete the following information):** - Server OS: OS: debian 12.11 (linux 5.15.0-113-generic x86_64) - Server Arch: x86_64 - Nginx UI Version: v2.1.17 - Your Browser: Edge
kerem 2026-02-26 12:09:17 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@0xJacky commented on GitHub (Aug 22, 2025):

可以提供一下删除时候的日志吗,docker logs -f 看一下

<!-- gh-comment-id:3213286685 --> @0xJacky commented on GitHub (Aug 22, 2025): 可以提供一下删除时候的日志吗,docker logs -f 看一下
Author
Owner

@kailicom commented on GitHub (Aug 22, 2025):

可以提供一下删除时候的日志吗,docker logs -f 看一下

我截取了一部分,如果需要更多我可以导出文件:

2025/08/22 15:09:34 github.com/uozi-tech/cosy@v1.24.10/delete.go:37 invalid character '}' after object key
[0.151ms] [rows:1] SELECT * FROM certs WHERE certs.id = 1 AND certs.deleted_at IS NULL ORDER BY certs.id LIMIT 1
2025-08-22 15:09:34 ERROR github.com/0xJacky/Nginx-UI/api/certificate/certificate.go:219 invalid character '}' after object key
[GIN] 2025/08/22 - 15:09:34 | 500 | 877.324µs | 113.227.131.140 | DELETE "/api/certs/1"

<!-- gh-comment-id:3213317313 --> @kailicom commented on GitHub (Aug 22, 2025): > 可以提供一下删除时候的日志吗,docker logs -f 看一下 我截取了一部分,如果需要更多我可以导出文件: 2025/08/22 15:09:34 github.com/uozi-tech/cosy@v1.24.10/delete.go:37 invalid character '}' after object key [0.151ms] [rows:1] SELECT * FROM `certs` WHERE `certs`.`id` = 1 AND `certs`.`deleted_at` IS NULL ORDER BY `certs`.`id` LIMIT 1 2025-08-22 15:09:34 ERROR github.com/0xJacky/Nginx-UI/api/certificate/certificate.go:219 invalid character '}' after object key [GIN] 2025/08/22 - 15:09:34 | 500 | 877.324µs | 113.227.131.140 | DELETE "/api/certs/1"
Author
Owner

@0xJacky commented on GitHub (Aug 22, 2025):

2025/08/22 15:09:34 [github.com/uozi-tech/cosy@v1.24.10/delete.go:37](http://github.com/uozi-tech/cosy@v1.24.10/delete.go:37) invalid character '}' after object key
[0.151ms] [rows:1] SELECT * FROM certs WHERE [certs](http://certs.id/)[.](http://certs.id/)[id](http://certs.id/) = 1 AND certs.deleted_at IS NULL ORDER BY [certs](http://certs.id/)[.](http://certs.id/)[id](http://certs.id/) LIMIT 1
2025-08-22 15:09:34 ERROR [github.com/0xJacky/Nginx-UI/api/certificate/certificate.go:219](http://github.com/0xJacky/Nginx-UI/api/certificate/certificate.go:219) invalid character '}' after object key
[GIN] 2025/08/22 - 15:09:34 | 500 | 877.324µs | 113.227.131.140 | DELETE "/api/certs/1"

不太清楚出现这个问题的原因,您可以用 sqlite 数据库编辑工具,修改 database.db 中的 certs 表,删除掉有问题的条目。

<!-- gh-comment-id:3213323127 --> @0xJacky commented on GitHub (Aug 22, 2025): ``` 2025/08/22 15:09:34 [github.com/uozi-tech/cosy@v1.24.10/delete.go:37](http://github.com/uozi-tech/cosy@v1.24.10/delete.go:37) invalid character '}' after object key [0.151ms] [rows:1] SELECT * FROM certs WHERE [certs](http://certs.id/)[.](http://certs.id/)[id](http://certs.id/) = 1 AND certs.deleted_at IS NULL ORDER BY [certs](http://certs.id/)[.](http://certs.id/)[id](http://certs.id/) LIMIT 1 2025-08-22 15:09:34 ERROR [github.com/0xJacky/Nginx-UI/api/certificate/certificate.go:219](http://github.com/0xJacky/Nginx-UI/api/certificate/certificate.go:219) invalid character '}' after object key [GIN] 2025/08/22 - 15:09:34 | 500 | 877.324µs | 113.227.131.140 | DELETE "/api/certs/1" ``` 不太清楚出现这个问题的原因,您可以用 sqlite 数据库编辑工具,修改 database.db 中的 certs 表,删除掉有问题的条目。
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#732
No description provided.