Skip to content

端口转发功能失败:qoder-tunnel 组件缺失导致 ENOENT 错误 #25

Description

@DrShuaiguo

环境信息
操作系统: macOS 26.2 (Build 25C56)
架构: arm64 (Apple Silicon)
VS Code 版本: 1.108.2 (已安装)
Qoder 版本: 最新版(2025年2月13日)
问题描述
在 Qoder 中使用"端口转发"功能时失败,提示无法找到 qoder-tunnel 组件。
复现步骤
打开 Qoder 应用
点击"端口"面板中的"转发端口"按钮
输入要转发的端口号(如 5175)
出现错误提示:spawn /Applications/Qoder.app/Contents/Resources/app/bin/code-tunnel ENOENT
错误日志
2026-02-28 08:41:03.268 [info] [forwarding] starting CLI
2026-02-28 08:41:03.306 [info] [forwarding] [2026-02-28 08:41:03] debug Using file keychain storage
2026-02-28 08:41:03.329 [info] [forwarding] [2026-02-28 08:41:03] debug No code server tunnel found, creating new one
2026-02-28 08:41:03.330 [info] [forwarding] [2026-02-28 08:41:03] trace Found token in keyring
2026-02-28 08:41:05.222 [info] [forwarding] [2026-02-28 08:41:05] error error listing current tunnels: response error: HTTP status 401 Unauthorized
2026-02-28 08:41:05.224 [info] [forwarding] exited with code 1
根本原因分析
检查 /Applications/Qoder.app/Contents/Resources/app/bin/code 脚本发现:
脚本尝试调用 qoder-tunnel 组件(通过 REMOTE_CLI 变量)
但 qoder-tunnel 可执行文件在 Qoder.app 中不存在
code-tunnel 符号链接已正确指向 VS Code 的 code-tunnel
$ ls -la /Applications/Qoder.app/Contents/Resources/app/bin/
-rwxr-xr-x@ 1 jeremy admin 1161 Feb 13 15:21 code
lrwxr-xr-x@ 1 jeremy admin 75 Feb 28 08:26 code-tunnel -> /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code-tunnel
建议修复
在 Qoder.app 中添加缺失的 qoder-tunnel 可执行文件
或修改 code 脚本,使其正确调用 code-tunnel 而不是 qoder-tunnel

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