bug: shouldLaunchBrowser() returns true on WSL2 because WSLg sets DISPLAY/WAYLAND_DISPLAY
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 84/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- authentication, backend
Direzione di ricerca
Inizia da workspace-server/src/utils/secure-browser-launcher.ts, in shouldLaunchBrowser(), quindi esamina il flusso headless introdotto nell’issue #227. Usa le variabili d’ambiente WSL2 descritte nell’issue per verificare che WSL utilizzi il percorso OAuth headless e aggiungi il test corrispondente; il lavoro è completato quando WSL non usa più open() o xdg-open per l’autenticazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
On WSL2 with WSLg enabled (the default on Windows 11), shouldLaunchBrowser() in workspace-server/src/utils/secure-browser-launcher.ts returns true because WSLg pre-populates DISPLAY and WAYLAND_DISPLAY. The server then takes the GUI path and calls open() / xdg-open for OAuth, which from WSL is unreliable — typically no browser the user is actually watching surfaces, and getAuthenticatedClient() ends up stalling until its ~5-minute timeout.
The headless flow added in #227 is the correct path for WSL2, but it is never reached because WSL is misclassified as GUI-capable.
Reproduce
- Run the MCP server inside WSL2 on Windows 11 (WSLg defaults).
- Confirm
echo \$DISPLAYandecho \$WAYLAND_DISPLAYboth return values. - Clear credentials and trigger any tool that requires fresh auth (e.g.
gmail.search). - The server takes the GUI-launch branch and hangs / times out instead of returning the headless OAuth URL.
Proposed fix
In shouldLaunchBrowser(), treat WSL as headless by checking for WSL_DISTRO_NAME or WSL_INTEROP (set by WSL2 but not by native Linux). This routes WSL users through the existing headless flow.
Happy to send a small PR (one function, plus a test) if the maintainers are open to this approach.
Environment
- WSL2 on Windows 11 (WSLg defaults)
- Latest `main`
- Lingua principale
- TypeScript
- Stelle
- 642
- Fork
- 107
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di gemini-cli-extensions/workspace
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
newsAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 25/100
gemini-cli-extensions/workspace#412 · 1 commento ·
Tutte le issue di gemini-cli-extensions/workspace
Issue simili
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
inu-appcenter/memorIN-frontend#106 ·
I maintainer di solito rispondono entro 1 giorno
-
kind/bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 7 giorni
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
fix: CopyFilters ignores tabApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
CSCfi/sd-search-ui#145 ·
I maintainer di solito rispondono entro 1 giorno
-
Add: Cbeebies pl SDApertacheck:passed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno