Skip to content

Fix Windows desktop API sidecar EISDIR on verbatim paths - #29

Merged
Modsofthenation merged 1 commit into
mainfrom
cursor/desktop-sidecar-verbatim-path-e5b1
Jul 26, 2026
Merged

Modsofthenation merged 1 commit into
mainfrom
cursor/desktop-sidecar-verbatim-path-e5b1

Conversation

@Modsofthenation

Copy link
Copy Markdown
Owner

Summary

Windows packaged desktop was spawning the API sidecar with Tauri \\?\ verbatim paths. Node’s module loader then crashes immediately with EISDIR: lstat 'C:', so /api/health never comes up and the UI shows “API offline”.

Fix

  • Strip \\?\ / \\?\UNC\ prefixes before spawn
  • Run node.exe prm-api.mjs with cwd = sidecars (relative entry) so Node never sees a verbatim absolute script path
  • Pass stripped paths for PRM_DATA_DIR / PRM_UI_DIR
  • Unit tests for path stripping

Test plan

  • cargo test in apps/desktop/src-tauri (path-strip tests)
  • Install Windows CI artifact and confirm sidecar reaches :8787 (log should show non-\\?\ program/cwd and no EISDIR)
  • Confirm same-origin UI loads after health check
Open in Web Open in Cursor 

Tauri resource_dir() returns \\?\ paths; Node's module loader then
lstats 'C:' and exits before /api/health. Strip the prefix and spawn
with relative prm-api.mjs under the sidecars cwd.

Co-authored-by: Damon van der linde <zord.lack.net@gmail.com>
@Modsofthenation
Modsofthenation marked this pull request as ready for review July 26, 2026 01:22
@Modsofthenation
Modsofthenation merged commit 73f048c into main Jul 26, 2026
1 check passed
@cursor
cursor Bot deleted the cursor/desktop-sidecar-verbatim-path-e5b1 branch August 12, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants