Skip to content

[Bug]重载任何插件时报错 TypeError: Pn.toLowerCase is not a function #8206

@lingyun14beta

Description

@lingyun14beta

What happened / 发生了什么

重载任何插件时,前端弹出报错:

TypeError: Pn.toLowerCase is not a function

原因:插件的 metadata.yamlrepo 字段若为非字符串类型(如整数 111),后端序列化时只判断了 None,将非字符串值直接透传给前端。前端在 checkUpdate()checkAlreadyInstalled() 中对 repo 字段直接调用 .toLowerCase(),导致类型错误崩溃。

Reproduce / 如何复现?

  1. 安装任意一个 metadata.yamlrepo 字段为非字符串类型的插件(例如 repo: 111
  2. 在插件页面,点击任意插件的「重载插件」按钮
  3. 前端弹出报错: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 吗?

  • Yes!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:webuiThe bug / feature is about webui(dashboard) of astrbot.bugSomething isn't workingfeature:pluginThe bug / feature is about AstrBot plugin system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions