You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
viewer: native host is unreachable when the host.sock path is longer than 107 bytes #376
The native viewer fails to start when the session's viewer/host.sock path is longer than 107 bytes, the Linux limit for a Unix socket path.
The host listens through a short /proc/self/fd capability path, so listen succeeds. Clients connect with the absolute path in host.json: requestNativeViewerHost in packages/desktop-linux/src/viewer-host.ts calls net.connect(host.socket). That path is $PICKFORGE_HOME/sessions/<id>/viewer/host.sock, so it is 40 bytes longer than PICKFORGE_HOME. With a PICKFORGE_HOME longer than 67 bytes, or a default home path longer than 52 bytes, connect fails with EINVAL. findNativeViewerHost treats the error as "not ready", and watch reports "Native viewer host did not report readiness" after the 12 second budget. The host log stays empty. watch then falls back to the browser viewer.
To reproduce:
Set PICKFORGE_HOME to a directory with a path of about 70 bytes.
Create a desktop session and run pickforge-lab watch --session <id> on a graphical display with a matching pickforge-viewer.
watch reports that the native host did not report readiness. node -e 'require("net").connect(process.argv[1]).on("error", e => console.log(e.code))' <host.sock path> prints EINVAL.
Found in the 0.7.0 release device pass. A 111-byte path failed. The same host started in 0.5 s and showed the session when run by hand.
Acceptance criteria
The launcher, watch, MCP, and takeover reach the host for any PICKFORGE_HOME that the rest of Pickforge accepts. For example, connect through a verified directory handle or a short socket path, and keep the identity checks on the socket.
A test covers a session directory whose host.sock path is longer than 107 bytes.
If a path cannot work, the error names the path length, not readiness.
Activity