CommandCodeAI / CommandCodeAI/command-code

Login fails on sandboxed WSL instance

Đang mở
#483 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
4k
Fork
350
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện luồng xác thực lần chạy đầu tiên của cmdc với các cài đặt /etc/wsl.conf được hiển thị và kiểm tra điểm vào khởi chạy trình duyệt hoặc tạo tiến trình PowerShell. Được xem là hoàn tất khi có thể tiếp tục đăng nhập trong một phiên bản WSL được sandbox mà không có quyền truy cập vào các đường dẫn Windows đã mount.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
bash, node.js, powershell
Lĩnh vực
authentication, cli, operating-systems
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.