Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

クローズ
#2,533 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
node.js, typescript
領域
cli, web-dev

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
11.1k
フォーク
1.6k
平均マージ
4時間 32分
マージ済み PR(30日)
136

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

modelcontextprotocol/inspector のほかの issue

modelcontextprotocol/inspector の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。