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

Open
#65 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js, typescript
Domain
backend, devtools

Research direction

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.

Written by the indexing model from the issue text.

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.

Dominant language
TypeScript
Stars
251
Forks
13
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from callstackincubator/agent-react-devtools

All issues in callstackincubator/agent-react-devtools

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.