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

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

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
68/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
node.js, typescript
Domaine
backend, devtools

Piste de recherche

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.

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

Description

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.

Langage dominant
TypeScript
Étoiles
251
Forks
13
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

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.

Autres issues de callstackincubator/agent-react-devtools

Toutes les issues de callstackincubator/agent-react-devtools

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

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