CommandCodeAI / CommandCodeAI/command-code

Login fails on sandboxed WSL instance

未关闭
#483 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
没有语言数据
星标
4k
派生
350
PR 合并指标
30 天内没有已合并 PR

描述

Summary

Command Code immediately quits after launching the first time on an WSL sandboxed image where it does not have access to the host volumes.

Expected Behavior

I disable mounting host volumes in WSL to sandbox my image, install commandcode, and run it to get started. I expect to paste in my API key and go.

Actual Behavior
~$ cmdc

✔  Ready to log in


┌   Command Code Authentication

✖ CRITICAL: Uncaught Exception!
This is an unexpected error. Please file a bug report at https://github.com/CommandCodeAI/command-code/issues/new
✖ ERROR → Error
ℹ REASON → spawn /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe ENOENT
ℹ ERROR STACK ↓
 Error: spawn /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:507:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)

ℹ Trace ID: unknown
  Share this ID with support to help debug your issue.


… Complete login in your browser...

┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ API Key: Paste your API key...                                                                                                                     │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Authorize in browser, or paste API key here

If your browser doesn't open, go to this link:
https://commandcode.ai/studio/auth/cli?callback=rest_of_link

Ctrl+C to cancel

~$
Steps to reproduce the issue
  1. Install WSL
  2. wsl -u root
  3. Disable auto mounting & appending of Windows paths by setting /etc/wsl.conf to the following:
[boot]
systemd=true
[automount]
enabled=false
[interop]
appendWindowsPath=false
  1. wsl --shutdown
  2. wsl
  3. install nvm, then node, then commandcode
  4. run cmdc for the first time.
Command Code Version

0.35.0

Operating System

Windows

Terminal/IDE

PowerShell

Shell

bash

Additional context

No response

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用所示的 /etc/wsl.conf 设置复现 cmdc 的首次运行身份验证流程,并检查启动浏览器或生成 PowerShell 进程的入口点。完成标准是在无法访问已挂载 Windows 路径的沙箱化 WSL 实例中可以继续登录。

由索引模型根据 Issue 内容生成。

评估

技术栈
bash, node.js, powershell
领域
authentication, cli, operating-systems
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。