CommandCodeAI / CommandCodeAI/command-code

Login fails on sandboxed WSL instance

オープン
#483 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
言語のデータがありません
スター
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. リポジトリをフォークし、ブランチを切って変更します。
  4. 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 を短くまとめたダイジェスト。