What happened / 发生了什么
重载任何插件时,前端弹出报错:
TypeError: Pn.toLowerCase is not a function
原因:插件的 metadata.yaml 中 repo 字段若为非字符串类型(如整数 111),后端序列化时只判断了 None,将非字符串值直接透传给前端。前端在 checkUpdate() 和 checkAlreadyInstalled() 中对 repo 字段直接调用 .toLowerCase(),导致类型错误崩溃。
Reproduce / 如何复现?
- 安装任意一个
metadata.yaml 中 repo 字段为非字符串类型的插件(例如 repo: 111)
- 在插件页面,点击任意插件的「重载插件」按钮
- 前端弹出报错:
TypeError: Pn.toLowerCase is not a function
AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
debian12
OS
Linux
Logs / 报错日志
TypeError: Pn.toLowerCase is not a function
Are you willing to submit a PR? / 你愿意提交 PR 吗?
Code of Conduct
What happened / 发生了什么
重载任何插件时,前端弹出报错:
TypeError: Pn.toLowerCase is not a function原因:插件的
metadata.yaml中repo字段若为非字符串类型(如整数111),后端序列化时只判断了None,将非字符串值直接透传给前端。前端在checkUpdate()和checkAlreadyInstalled()中对repo字段直接调用.toLowerCase(),导致类型错误崩溃。Reproduce / 如何复现?
metadata.yaml中repo字段为非字符串类型的插件(例如repo: 111)TypeError: Pn.toLowerCase is not a functionAstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
debian12
OS
Linux
Logs / 报错日志
TypeError: Pn.toLowerCase is not a function
Are you willing to submit a PR? / 你愿意提交 PR 吗?
Code of Conduct