Windows: daemon IPC listens on a Unix socket path (EACCES); needs a named pipe

オープン
#65 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

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

調査の方向性

Start with getSocketPath() in packages/agent-react-devtools/src/daemon.ts and src/daemon-client.ts, then check the daemon IPC listen and cleanup paths. Verify that Windows uses a named pipe consistently for the daemon and client, while other platforms retain the socket path. Run the daemon and exercise start, status, get tree, and get component on Windows; those commands should work without the EACCES error.

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

説明

Summary

On Windows the daemon cannot start its IPC server. It listens on the file path <stateDir>/daemon.sock; on Windows, net.Server.listen takes only named pipes (\\.\pipe\...) for IPC.

Environment

  • agent-react-devtools 0.5.0 (same code on main @ d25f34b)
  • Node 26.8.1
  • Windows 11 (10.0.26100)

Repro

Run the daemon directly (start does not reach this point on Windows because of https://github.com/callstackincubator/agent-react-devtools/issues/64):

> node node_modules/agent-react-devtools/dist/daemon.js --port=8098 --state-dir=D:\temp\ard\state
Failed to start daemon: Error: listen EACCES: permission denied D:\temp\ard\state\daemon.sock
    at Server.setupListenHandle [as _listen2] (node:net:2306:21)
    at listenInCluster (node:net:2437:12)
    at Server.listen (node:net:2579:5)
    at .../agent-react-devtools/dist/daemon.js:1277:22
    at Daemon.startIpc (.../agent-react-devtools/dist/daemon.js:1250:12)
  code: 'EACCES', syscall: 'listen'

Cause

getSocketPath() in daemon.ts L17 and daemon-client.ts L23 returns path.join(stateDir, 'daemon.sock') on every platform; daemon.ts L136 listens on it.

Fix

On win32, use a named pipe derived from the state dir in both files, for example:

process.platform === 'win32'
  ? `\\\\.\\pipe\\agent-react-devtools-${hash(stateDir)}`
  : path.join(stateDir, 'daemon.sock');

With this change plus fileURLToPath for the script path, start, status, get tree, and get component all work on Windows. The unlinkSync(socketPath) cleanup can be skipped for pipes.

主要言語
TypeScript
スター
251
フォーク
13
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

callstackincubator/agent-react-devtools のほかの issue

callstackincubator/agent-react-devtools の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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