Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

TUI and web launcher crash with an unhandled 'error' event when the browser opener cannot be spawned

Cerrado
#2,533 1 comentario 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
74/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
node.js, typescript
Área
cli, web-dev

Línea de trabajo

Start with clients/tui/src/utils/openUrl.ts and clients/web/server/web-server-config.ts, then compare their browser-opening paths with the CLI fix in #2531. Trace the ChildProcess returned by open(...) and verify both launchers handle spawn failures without crashing, fall back to asking the user to open the URL manually, and cover the shared behavior if a helper is introduced.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug v2

Problem

Follow-up to #2531, which fixes the CLI. The TUI and the web launcher call open the same way and have the same defect.

open (10.2.0) resolves with the ChildProcess as soon as it has called spawn(). A spawn failure (ENOENT: the opener binary is missing from PATH) arrives afterwards as an 'error' event on that child. open only listens for it with { wait: true }, and on macOS that option adds open -W, which waits for the browser to quit. With nobody listening, the event crashes the process.

  • TUI: clients/tui/src/utils/openUrl.ts awaits open(...) for the OAuth authorization page. A spawn failure crashes the TUI mid-flow.
  • Web launcher: clients/web/server/web-server-config.ts openBrowser() does open(url).catch(...). The .catch covers a rejection but not the child's 'error' event, so a spawn failure crashes the web server at startup whenever auto-open is on.

Expected

Both sites handle a spawn failure the way #2531 makes the CLI handle it: listen on the returned child for 'error'/'spawn', chained directly onto open's promise, then fall back to "open the URL manually". A single shared helper would stop the three copies from drifting apart again.

Likelihood

Low on a normal machine (/usr/bin/open on macOS; open ships its own xdg-open on Linux), but real wherever the opener is missing from PATH: minimal containers, sandboxed or env -i launches.

Lenguaje dominante
TypeScript
Estrellas
11.1k
Forks
1.5k
Merge medio
4 h 32 min
PR fusionados (30 d)
136

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de modelcontextprotocol/inspector

Todos los issues de modelcontextprotocol/inspector

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.