Skip to content

[Bug] 使用自定义 RSSHub 实例并设置访问密钥时,更新 Radar 规则弹窗报错 "Cannot read properties of undefined (reading 'call')" (v2.2.0) #1177

@Radar5404

Description

@Radar5404

问题描述

将 RSSHub Radar 升级到 v2.2.0 后,在插件中配置自定义 RSSHub 实例并填写了访问密钥(例如 ILoveRSSHub),随后进行 “手动更新 Radar 规则” 操作时,弹窗报错:
Cannot read properties of undefined (reading 'call')
降级到 v2.1.1 后该问题消失。

复现步骤

  1. 安装 RSSHub Radar v2.2.0(来自 Chrome 网上应用店)。
  2. 进入插件设置,将 RSSHub 实例地址改为自建实例(如 https://rsshub.example.com),并填写正确的访问密钥(例如 ILoveRSSHub),并选择密钥格式:
    key={accessKey}
  3. 点击立即更新,执行 “手动更新 Radar 规则” 操作。
  4. 弹窗出现上述错误,控制台输出以下堆栈信息。
Image

控制台错误堆栈

打开 Chrome 开发者工具(F12)→ Console 面板,复现操作后看到:

background.js:197 TypeError: Cannot read properties of undefined (reading 'call')
    at n.ut (background.js:20:66731)
    at n.b (background.js:20:56257)
    at n.d (background.js:20:77506)
    at n (background.js:20:80551)
    at new n (background.js:20:81872)
    at Rd (background.js:197:17040)
    at async fu (background.js:197:21471)
    at async Gd (background.js:197:22131)

环境信息

  • 操作系统:Windows 11
  • 浏览器:Chrome 145.0.7632.11
  • 插件版本:v2.2.0(v2.1.1 正常)
  • RSSHub 实例:自建,启用了访问控制(URL 需携带 ?key=xxx 参数)

补充说明

  • 直接通过浏览器访问自建 RSSHub 实例的接口(如 https://rsshub.example.com/xxx?key=xxx)能正常返回数据,说明实例本身无问题。
  • 如果在插件设置中关闭访问密钥(即使用公开的实例或实例本身无需鉴权),则“手动更新 Radar 规则”操作可以正常完成,无报错。
  • 因此推测问题出在插件处理带鉴权参数的请求的逻辑上,可能是 URL 拼接、请求头处理或响应数据处理环节存在缺陷。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions