fix(whatsapp): pass CREATE_NO_WINDOW flag on Windows subprocess spawn (#29715) - #29725
Closed
vanhci wants to merge 2 commits into
Closed
fix(whatsapp): pass CREATE_NO_WINDOW flag on Windows subprocess spawn (#29715)#29725vanhci wants to merge 2 commits into
vanhci wants to merge 2 commits into
Conversation
added 2 commits
May 21, 2026 15:08
On Windows, subprocess.Popen spawned the Node.js WhatsApp bridge without creationflags, causing a visible blank node.exe console window to appear. The window has no useful output (stdout/stderr already go to bridge.log) and closing it causes the bridge to exit with status 0xC000013A, triggering the reconnection watcher loop. Fix: pass creationflags=windows_hide_flags() on Windows, the same pattern already used in cron/scheduler.py for the same reason. Fixes #29715
Collaborator
|
Note: This PR also modifies hermes_cli/main.py (adds --system flag to uv pip install in _cmd_update_pip), which is unrelated to the WhatsApp CREATE_NO_WINDOW fix described in the PR title and body. The hermes_cli/main.py change should be split into a separate PR. |
19 tasks
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
On Windows, the WhatsApp bridge Node.js subprocess was spawned without
CREATE_NO_WINDOW, causing a visible blanknode.execonsole window to appear. The window contains no useful output (stdout/stderr already redirected tobridge.log). Closing the window causes the bridge to exit with status0xC000013A, triggering the gateway's reconnection watcher to restart the bridge — creating a loop of blank console windows.Fix
Pass
creationflags=windows_hide_flags()(which returnsCREATE_NO_WINDOW | DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP) when spawning the bridge subprocess on Windows, the same pattern already used incron/scheduler.pyfor the same reason.Files changed:
gateway/platforms/whatsapp.py— importwindows_hide_flags, passcreationflagstosubprocess.PopenFixes #29715