Repository navigation
Description
Overview
On Windows, the GUI app redirects its own stdout and stderr to %USERPROFILE%\.nodespace\logs\nodespace-app.log and nodespace-app-error.log at startup, so eprintln!/println!/tracing output of a console-less release build is not discarded. When the app is launched from the Start menu, which is how users and the autorun entry launch it, nothing reaches those files. Launched from PowerShell or from the installer's finish screen, the same binary logs normally.
Problem Statement
Observed on the published v0.3.5 release installer and on a build of main containing the models-directory fix, both release builds, on Windows 11 24H2 ARM64 in a virtual machine running the x64 build under emulation.
| Launch | Method | GUI output in nodespace-app.log |
|---|---|---|
| after a fresh v0.3.5 install | installer finish screen | yes (2,091 bytes of INFO lines) |
| three launches after a reboot | Start menu | no |
| after reinstalling a newer build | installer finish screen | yes |
| three relaunches | Start menu | no |
| relaunch after deleting the daemon sidecars | Start menu | no, although the sidecars were re-extracted |
| one launch | PowerShell (& 'C:\Program Files\NodeSpace\nodespace-app.exe') |
yes, startup through shutdown |
| one launch after that | Start menu | no |
In a silent launch the GUI process is running its normal startup (it spawns the daemon one second later), the redirect's two files exist, and an exclusive open of either file fails with a sharing violation while the app runs and succeeds after it quits, so the redirect's handle is held. The println! fired by View → Toggle Sidebar (used from the menu bar) does not land either, so it is not specific to tracing.
Ruled out:
HOMEunset:home_dir()indaemon_setup.rsisdirs::home_dir().- File open mode:
open_daemon_logiscreate(true).append(true). - File state: the files were deleted and recreated, and still received nothing.
- Tracing filter: the default
nodespace_app=infois a string-prefix match that includesnodespace_app_lib. - Sidecar extraction: a launch that re-extracted both sidecars was still silent.
- An OS update: the same OS build produced both logging and silent launches.
- Nothing in the app crates calls
AllocConsole,AttachConsole,FreeConsoleor a secondSetStdHandle.
Not determined: the mechanism, and whether it reproduces on x64 hardware outside a VM and emulation.
Proposed Solution
Find why the standard handles installed by redirect_gui_stdio_to_log_files do not carry output for a process started without inherited standard handles, and make output reach the log files in the Start-menu launch path, which is the one that matters.
Documentation
- installer-distribution.md - how the daemon's log is handed over by the GUI app on Windows and rotated; it does not describe the GUI process's own log files, and should once this is settled
- No ADR found covering the GUI process's own stdio redirect.
Acceptance Criteria
- A release build launched from the Start menu on Windows writes its
tracingoutput and itsprintln!/eprintln!output tonodespace-app.log/nodespace-app-error.log - The same holds for a launch from PowerShell, from the installer's finish screen, and from the autorun entry
- A test or scripted check exercises a launch with no inherited standard handles, the case the earlier verification harness did not cover, and fails against the current code
- The documentation describes where the GUI process's own logs go
Technical Specifications
Reference Files
packages/desktop-app/app-lib/src/daemon_setup.rs(redirect_gui_stdio_to_log_files,redirect_std_handle_to_file,open_daemon_log) - the redirectpackages/desktop-app/app-lib/src/lib.rs(run,run_app) - where the redirect is called, before the tracing subscriber is initializedpackages/desktop-app/src-tauri/src/main.rs-windows_subsystem = "windows"for release builds
Investigation notes
- The original verification used a standalone
windows_subsystem = "windows"program launched withcmd /c start /WAIT, which may inherit handles that a Start-menu launch does not have. - The three launch methods that logged all pass the process standard handles from a parent (a console, or the installer).
Related Issues
- Windows: live-validate daemon stderr-to-file fix (PR #2136) + fix desktop-app GUI console-less stderr #2137 (Windows GUI and daemon stdio log routing)
- Verify SetStdHandle GUI stderr redirect (#2137/PR#2614) doesn't interfere with WebView2/Tauri #2615 (verification that surfaced this)
- Local model management is disabled on Windows because the models directory is resolved from $HOME #3761 (
HOMEmodels-directory bug found in the same run)
Activity
malibio commentedon Oct 13, 2026
Frontend: 5899 passed (326 files)
Write the Windows GUI log to its file directly and stop helper consol…
Write the Windows GUI log to its file directly and stop helper consol…