Skip to content

[Bug] 网易云歌单收藏/取消收藏接口返回 403 illegal request #447

Open

Description

@GraduateDust800

检查清单

  • 我已检索仓库中所有的 Issues,确保我没有重复提交问题
  • 我已经找到了可以复现这个问题的方法,并且写在了下面的「具体信息」中
  • 此问题可以在我的设备和当前环境中稳定复现
  • 此问题可以在最新版本 (Latest Release) 中复现
  • 此问题是在我更新到当前版本后才出现的

客户端未更新;同一版本之前正常,2026-11-05 开始稳定出现。

环境信息

客户端版本: 1.2.0
Electron: 44.9.0
Chromium: 152.0.7977.167
OS: Linux x86_64

具体信息

复现步骤

  1. 登录网易云账号
  2. 打开任意非自建歌单
  3. 点击歌单收藏 / 取消收藏

实际行为

操作失败,~/.config/SPlayer-Next/app-data/logs/2026-11-05.log 反复出现:

[2026-11-05 18:14:02.193] [warn]  (core)          [apis] netease.playlist_subscribe failed: NeteaseRequestError: netease 403: illegal request!
    at send (file:///opt/SPlayer-Next/resources/app.asar/out/main/index.js:8445:71)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
    at async run (file:///opt/SPlayer-Next/resources/app.asar/out/main/index.js:8478:17)
    at async file:///opt/SPlayer-Next/resources/app.asar/out/main/index.js:8490:19

预期行为

收藏状态正常切换。

补充排查

  • 同一账号在 Chromium 打开 https://music.163.com/st/webplayer 后,在页面内直接 fetch /weapi/playlist/subscribe / /weapi/playlist/unsubscribe 返回 200,说明账号、Cookie 和接口参数本身正常。
  • 将同一份加密 body、Cookie 和请求头改用 Node 侧 fetch 重放,稳定返回 { code: 403, message: "illegal request!" }。
  • 因此怀疑服务端对请求环境(UA / Sec-Fetch / TLS / HTTP2 指纹 / 主进程 fetch)的校验变严,而不是接口参数或账号问题。
  • 当前 requestWithWebClient 通过 session.fetch 发送,并使用主窗口的 Linux Electron UA;普通 request.ts 路径则使用 macOS Chrome UA。
  • 建议先尝试把 webClient 的 UA 换成 Windows Chrome / 与网页端一致的 UA,并补齐 sec-ch-ua、sec-ch-ua-platform、Sec-Fetch-*、Accept-Language 等浏览器请求头;如果仍无效,可能需要改为在隐藏的 music.163.com 页面内发起请求。
  • 目前只在收藏歌单时观察到;其他 webClient 写接口(红心、关注、歌单增删)未逐一验证。

相关代码

  • electron/main/apis/netease/core/webClient.ts
  • electron/main/apis/netease/modules/playlist_subscribe.ts
  • electron/main/apis/netease/core/request.ts

日志

完整日志:~/.config/SPlayer-Next/app-data/logs/2026-11-05.log

Activity

  1. github-actions commented on Nov 5, 2026

    @github-actions

    👋 @GraduateDust800

    感谢提交 Issue!我们已经收到您的反馈,会尽快确认您的问题。

    Thanks for opening this issue! We have received your report and will review it as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions