theia icon indicating copy to clipboard operation
theia copied to clipboard

A cmd.exe Console Quickly Pops Up When Starting Theia-Blueprint in Cluster Mode (@parcel/watcher)

Open noneghost opened this issue 9 months ago • 5 comments

Bug Description:

When starting Theia-Blueprint in cluster mode, a cmd.exe window quickly pops up. This issue occurs because @parcel/watcher calls subscribe, which invokes the getSockPath function. Inside getSockPath, popen executes a Watchman command, leading to the brief appearance of the cmd.exe window.

Steps to reproduce(gif file):

Image

getSockPath interface in @parcel/watcher:

https://github.com/parcel-bundler/watcher/blob/664695dbb2488d53f782c3e2b8791c4c114731fb/src/watchman/WatchmanBackend.cc#L43

It is suspected that this issue is caused by popen not hiding the console when opening cmd.exe. In VSCode, the usage of @parcel/watcher is handled by using Node.js's ChildProcess.fork to create a separate worker for IPC communication.

https://github.com/microsoft/vscode/blob/main/src/vs/base/parts/ipc/node/ipc.cp.ts https://github.com/microsoft/vscode/blob/32a41e158d04c9777522dc567574f2a74b8f2bf9/src/vs/platform/files/node/watcher/watcherMain.ts

Additional Information

I am not a native English speaker, so please let me know if anything needs clarification.

  • Operating System: windows 11
  • Theia Version: 1.58.100 in theia-blueprint

noneghost avatar Feb 11 '25 01:02 noneghost