[Desktop 2.0.10] All subprocesses fail on Windows: private runner launched via process.execPath without ELECTRON_RUN_AS_NODE #6884
moonxmboo-eng
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Component:
@deepseek-ai/dsh-subprocess-local@0.1.6-alpha.1Environment: DSH Desktop 2.0.10 (Electron 43.3.0, bundled Node 24.18.1), Windows x64
Symptom
On the packaged desktop build, every subprocess spawn fails. The code-execution tool, the shell tool and plugin installation are all unusable.
The DSH server is hosted in Electron's utility Node process:
Root cause
spawnRunnerInvocation()(lib/runner-launch-*.js) resolves the private runner throughprocess.execPath:Inside Electron's utility Node process
process.execPathisDSH Desktop.exe, so the spawn becomes:This starts a second app instance. It hits the single-instance lock, forwards its argv to the already-running instance and exits immediately with code 0. The parent then observes exactly the three conditions that
settleRange()treats as infrastructure failure:exit code 0, no signal, and the IPC channel disconnected before any
direct-resultmessage arrived.ELECTRON_RUN_AS_NODEis never set anywhere in the package (0 occurrences inlib/index.jsandlib/runner-launch-*.js).Deterministic reproduction outside the app
Regression: 0.1.5-rc.2 already handled this
@deepseek-ai/dsh-subprocess-local@0.1.5-rc.2contained, insiderunnerEnvironment():0.1.6-alpha.1deleted the whole block. Combined with the desktop build moving the server from a standalonenode.exeinto an Electron utility process, the assumption behindprocess.execPath("this is Node") no longer holds.Additional finding: fixing only the runner is not sufficient
The code-execution worker is also spawned as the Electron binary:
so its target environment 鈥?built by
targetEnvironment()(childEnv(spec.env)) and by the directspawnSubprocess()path (controlEnvironment(childEnv(spec.env), ...)) 鈥?needs the flag as well. Without it the failure merely moves one level down:Verified: patching only
runnerEnvironment()reproduces the second error; patching the target environment as well fixes it.Suggested fix
runnerEnvironment().applied at the two places that build a target environment (
targetEnvironment()and the direct branch ofspawnSubprocess()).Impact
Complete loss of a core capability on the packaged Windows desktop build (no shell tool, no code execution, no plugin install). The only workaround is patching files inside
resources\app, which any future update wipes.Found on a standard Windows x64 installation. Happy to provide further detail or to test a patched build.
All reactions