fix(photon): hide sidecar console window on Windows - #56610
Conversation
The Photon sidecar's subprocess.Popen was missing creationflags=windows_hide_flags(), unlike every other subprocess spawn in the codebase. On Windows, pythonw.exe spawning node.exe without CREATE_NO_WINDOW causes a visible console window to appear on the desktop titled with the node binary path.
Duplicate of #55554 — both add |
|
Thanks for addressing the persistent Photon sidecar window. The Problems
Suggested changes
Automated hermes-sweeper review. |
|
Thanks for the fix — this was a real bug, confirmed on main. It was independently fixed by five contributors; we merged the earliest submission (#54565 by @lEWFkRAD, Jun 29) via PR #65441, which uses the repo's shared |
Summary
The Photon platform adapter spawns a Node sidecar (
node.exe) viasubprocess.Popenbut was missingcreationflags=windows_hide_flags(). Every other subprocess spawn in the codebase uses this flag; the Photon adapter was the only one that missed it.On Windows, when
pythonw.exe(the gateway process) spawnsnode.exewithoutCREATE_NO_WINDOW, Windows allocates a new console for the child process. This console window appears visibly on the user's desktop, titled with the node binary path (e.g.C:\Users\camer\.vite-plus\bin\node.EXE).Fix
Two-line change in
plugins/platforms/photon/adapter.py:windows_hide_flagsfromhermes_cli._subprocess_compat(the same helper used by 20+ other call sites across the codebase).creationflags=windows_hide_flags()to thesubprocess.Popencall at_start_sidecar().Test Plan
node.execonsole window appears on the desktop/healthzcomes up normally