CommandCodeAI / CommandCodeAI/command-code

Login fails on sandboxed WSL instance

Ouverte
#483 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
Aucune donnée de langage
Étoiles
4k
Forks
350
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par reproduire le flux d’authentification de première exécution de cmdc avec les paramètres /etc/wsl.conf indiqués et examinez le point d’entrée qui lance le navigateur ou crée le processus PowerShell. C’est terminé lorsque la connexion peut se poursuivre dans une instance WSL sandboxée sans accès aux chemins Windows montés.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
bash, node.js, powershell
Domaine
authentication, cli, operating-systems
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.